bigframes.ml.metrics.recall_score#
- bigframes.ml.metrics.recall_score(y_true:DataFrame|Series,y_pred:DataFrame|Series,*,average:str|None='binary')→Series[source]#
Compute the recall.
The recall is the ratio
tp/(tp+fn), wheretpis the number oftrue positives andfnthe number of false negatives. The recall isintuitively the ability of the classifier to find all the positive samples.The best value is 1 and the worst value is 0.
Examples:
>>>importbigframes.pandasasbpd>>>importbigframes.ml.metrics
>>>y_true=bpd.DataFrame([0,1,2,0,1,2])>>>y_pred=bpd.DataFrame([0,2,1,0,0,1])>>>recall_score=bigframes.ml.metrics.recall_score(y_true,y_pred,average=None)>>>recall_score0 11 02 0dtype: int64
- Parameters:
y_true (Series orDataFrame ofshape (n_samples,)) – Ground truth (correct) target values.
y_pred (Series orDataFrame ofshape (n_samples,)) – Estimated targets as returned by a classifier.
average ({'micro','macro','samples','weighted','binary'} orNone,default='binary') – This parameter is required for multiclass/multilabel targets.Possible values are ‘None’, ‘micro’, ‘macro’, ‘samples’, ‘weighted’, ‘binary’.Only average=None is supported.
- Returns:
- Recall
of the positive class in binary classification or weightedaverage of the recall of each class for the multiclass task.
- Return type:
float (if average is not None) orSeries offloat of shape n_unique_labels,)