eobox.ml.clf_extension¶
-
eobox.ml.clf_extension.predict_extended(df, clf)[source]¶ Derive probabilities, predictions, and condfidence layers.
- Parameters
df (pandas.DataFrame) – DataFrame containing the data matris X to be predicted with
clf.clf (sklearn.Classifier) – Trained sklearn classfifier with a
predict_probamethod.
- Returns
DataFrame with the same number of rows as
dfand n_classes + 3 columns. THe columns contain the class predictions, confidence clayers (max. probability and the difference between the max. and second highest probability), and class probabilities.- Return type
pandas.DataFrame