--- title: Metrics keywords: fastai sidebar: home_sidebar summary: "Metrics should follow the scikit-learn pattern of accepting two arguments: " ---
%load_ext autoreload %autoreload 2 %matplotlib inline
percent_positive
percent_positive(y_true, y_pred)
y_true
y_pred
Compute the percent of predictions that are positive. This can help us identify when a model is predicting all ones or zeros.
mean_soft_prediction
mean_soft_prediction(y_true, y_score)
y_score
Compute the mean predicted probability.
std_soft_prediction
std_soft_prediction(y_true, y_score)
Compute the standard deviation of the predicted probabilities. This helps us identify if the model is always predicting roughly the same probability.
batch_size
batch_size(y_true, y_pred)
Count the number of items in the current batch.