mne.simulation.metrics.recall_score(stc_true, stc_est, threshold='90%', per_sample=True)[source]#

Compute the recall.

The recall is the ratio tp / (tp + fn) where tp is the number of true positives and fn the number of false negatives. The recall is intuitively the ability of the classifier to find all the positive samples.

The best value is 1 and the worst value is 0.

Threshold is used first for data binarization.

stc_trueinstance of (Vol|Mixed)SourceEstimate

The source estimates containing correct values.

stc_estinstance of (Vol|Mixed)SourceEstimate

The source estimates containing estimated values e.g. obtained with a source imaging method.

thresholdfloat | str

The threshold to apply to source estimates before computing the recall. If a string the threshold is a percentage and it should end with the percent character.


If True the metric is computed for each sample separately. If False, the metric is spatio-temporal.

metricfloat | array, shape (n_times,)

The metric. float if per_sample is False, else array with the values computed for each time point.


New in v1.2.

Examples using mne.simulation.metrics.recall_score#

Compare simulated and estimated source activity

Compare simulated and estimated source activity