Skip to content

Custom Metrics

dprime

[src]

import numpy as np
from indl.metrics import dprime


y_true = np.array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0])
y_pred = np.array([1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1])
dprime(y_true, y_pred)
(1.4847266404679265, 1.5839845538068775, 33.333333333333336)