sklearn-pandas icon indicating copy to clipboard operation
sklearn-pandas copied to clipboard

Dataframe for non-matrix classification metrics

Open fkromer opened this issue 5 years ago • 1 comments

It would be valuable to have some mapping functionality which takes y_true, y_pred, y_score, pred_decision (output of estimator.decision_function()), x (AUC only), y (AUC only) and converts it into a standardized pandas DataFrame ("non-matrix classification metric dataframe") which could look like follows for a single estimator:

metric accuracy_score auc ... jaccard_score zero_one_loss
estimator
LogisticRegression float or int float float or [float, ..., float] float or int

... could include as well:

  • cohen_kappa_score (float)
  • dcg_score (float)
  • f1_score (float or [float, ..., float])
  • hamming_loss (float or int)
  • hinge_loss (float)
  • log_loss (float)
  • ...

In case an estimator does not support one or several metrics the cells could contain either NaN

A dataframe containing several estimators could look like e.g.:

metric accuracy_score auc ... zero_one_loss
estimator
LogisticRegression float or int float float or int
RidgeClassifier float or int float float or int

fkromer avatar Apr 24 '20 15:04 fkromer

This sounds interesting. Could be a good addition to the repo. Can I take it up?

QuadV avatar Mar 06 '22 21:03 QuadV