recall_score#
- mobgap.utils.evaluation.recall_score( ) float[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. Intuitively speaking, the recall is the ability of the classifier to find all the positive samples.
The best value is 1 and the worst value is 0. Recall can be also referred to as sensitivity, hit rate, or true positive rate (TPR).
- Parameters:
- matches_df
A 3 column dataframe. Currently supported are dataframes resulting either from the evaluation of gait sequence detection algorithms (results from
categorize_intervals_per_sample), or from the evaluation of initial contact detection algorithms (results fromcategorize_ic_list). To be handled like a gait sequence detection evaluation dataframe, thematches_dfmust have columns “start”, “end”, and “match_type”. To be handled like an initial contact detection evaluation dataframe, thematches_dfmust have columns “ic_id_detected”, “ic_id_reference”, “match_type”. Thematch_typecolumn indicates the type of match: “tp” (true positive), “fp” (false positives), or “fn” (false negative) or “tn” (true negative). Any “tn” matches are ignored in the initial contact match dataframe, since they are not meaningful and normally not reported in this application.- zero_division“warn”, 0 or 1, default=”warn”
Sets the value to return when there is a zero division. If set to “warn”, this acts as 0, but warnings are also raised.
- Returns:
- recall_score: float
Value between 0 and 1.