Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
455 B
1
Indexable
Never
for threshold in np.arange(0, 0.62,0.02):
    predicted_valid = prob_one_valid > threshold
    precision = precision_score(target_valid,predicted_valid)
    recall = recall_score(target_valid,predicted_valid)
    f1 = f1_score(target_valid,predicted_valid)

    print(
        	'Threshold = {:.2f} | Precision = {:.3f}, Recall = {:.3f}'.format(
            	threshold, precision, recall
        	)
    	)
RFpredic_valid=RFmodel.predict(features_valid)    
Leave a Comment