Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
419 B
0
Indexable
Never
RFmodel = RandomForestClassifier(random_state=1234,n_estimators=100, class_weight='balanced')
RFmodel.fit(features_train,target_train)
RFpredic_valid = RFmodel.predict(features_valid)
RFprob_valid = RFmodel.predict_proba(features_valid)

print('Precision:',precision_score(target_valid,RFpredic_valid))
print('Recall:',recall_score(target_valid,RFpredic_valid))
print('F1 Score:', f1_score(target_valid,RFpredic_valid))
Leave a Comment