I am just curious, and I wanted to know if it is possible to get the score of each prediction in a Multiclass Classification model. If it is possible, how can I implement this to make predictions on my original datasets and not the test_data and output the score of each prediction in a new column.
I made predictions on my original dataset to have the prediction columns named [predictions_final] I also want to make predictions on the original dataset to get the score or probabilities score to be in another column side by side with the prediction and my original dataset
######## BELOW IS THE CODE from sklearn.multiclass import OneVsRestClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import roc_curve, auc import scikitplot as skplt import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split(X3,y1, test_size=0.2, random_state=10) RFc = OneVsRestClassifier(RandomForestClassifier(max_features=0.2)) RFc.fit(X_train, y_train) y_pred = RFc.predict(X_test) pred_prob = RFc.predict_proba(X_test) skplt.metrics.plot_roc_curve(y_test, pred_prob) plt.show() y_pred = RFc.predict(X_test) from sklearn.metrics import classification_report,confusion_matrix print(classification_report(y_test,y_pred)) preded = RFc.predict(X_test) RFc.predict_proba(X_test) Final = RFc.predict(X3) X3['predictions_final']=Final ```