This is a list of commands and tricks to fit and evaluate machine learning models using sci-kit learn.
Most of them are notes from this great video series by Kevin Markham: http://www.dataschool.io/machine-learning-with-scikit-learn/
from sklearn import metrics print metrics.accuracy_score(y, y_pred);