A classification report summarizes predictive performance for each class with measures such as precision, recall, and F1 score. It helps assess whether a machine-learning model predicts classes reliably. section 9.3.6
Generate the report from test labels and model predictions with scikit-learn. Compare class-level results rather than relying only on overall accuracy, especially when class sizes differ. section 9.3.6
Predicting streamer languages
A random forest predicts stream languages from node2vec embeddings. Calling classification_report(y_test, y_pred) produces the report; the test set contains 384 English, 54 French, and 19 Italian examples. The F1 score and weighted F1 score are both 0.91, supporting the hypothesis that shared audiences often connect streams using the same language. section 9.2 section 9.3.6
Pair the report with a confusion matrix to inspect actual-versus-predicted classes and identify which classes are confused. In the language example, errors occur between English and other languages, not between Korean and Portuguese. section 9.3.6
Listing 9.13 Producing the classification report
from sklearn.metrics import classification_report y_pred = rfc.predict(X_test) print(classification_report(y_test,y_pred))
Use the executable listing to generate a classification report from test labels and predictions. section 9.3.6
Inspect the rendered report produced for the streamer-language classifier. section 9.3.6

