August 2019
Intermediate to advanced
342 pages
9h 35m
English
The classification report for the RandomForestClassifier metrics is shown in the following code:
print('classification report')print(metrics.classification_report(ytest, ypredrf))print('Accuracy : %f' % (metrics.accuracy_score(ytest, ypredrf)))print('Area under the curve : %f' % (metrics.roc_auc_score(ytest, ypredrf)))classification report precision recall f1-score support 0 1.00 1.00 1.00 17030 1 0.96 0.73 0.83 33avg / total 1.00 1.00 1.00 17063Accuracy : 0.999414Area under the curve : 0.863607
Read now
Unlock full access