I using two different classifiers to predict a binary target (Random Forests and Decision Trees). Now I want to evaluate my model creating a confusion matrix. For example, for predicting the binary value using random forests I've:
training_features, test_features, training_target, test_target, = train_test_split(df.drop(['score_goal'], axis=1), df['score_goal'], test_size = .3, random_state=12) clf_rf = RandomForestClassifier(n_estimators=25, random_state=12) clf_rf.fit(training_features, training_target) print("Accuracy using Random Forest Classifier is ", clf_rf.score(test_features, test_target)*100)
I'm confusing because I don't know how I can compare the predicted values to identify how many False Positives, etc. I have.
Anyone knows how can I build that function?