I am following this tutorials: https://www.datacamp.com/community/tutorials/random-forests-classifier-python on using Scikit-learn with random forests. However, the current code only shows the test accuracy whereas I want to know the training accuracy as well since may dataset is very small.
The code to get the test accuracy is:
from sklearn import metrics
print("Accuracy:", metrics.accuracy_score(y_test, y_pred))
How would I modify this to get the training accuracy?