model evaluation typically model evaluation is done based on some holdout or validation dataset that is different from the training dataset to prevent overfitting or biasing the model since this is an example on toy datasetlet' evaluate the performance of our model on the training data using the following snippet in [ ]simple evaluation on training data pred_labels model predict(training_featuresactual_labels np array(outcome_labels['recommend']evaluate model performance from sklearn metrics import accuracy_score from sklearn metrics import classification_report print('accuracy:'float(accuracy_score(actual_labelspred_labels))* '%'print('classification stats:'print(classification_report(actual_labelspred_labels)accuracy classification statsprecision recall -score support no yes avg total thus you can see the various metrics that we had mentioned earlierlike accuracyprecisionrecalland score depicting the model performance we talk about these metrics in detail in "buildingtuningand deploying modelsmodel deployment we built our first supervised learning modeland to deploy this model typically in system or serverwe need to persist the model we also need to save the scalar object we used to scale the numerical features since we use it to transform the numeric features of new data samples the following snippet depicts way to store the model and scalar objects in [ ]from sklearn externals import joblib import os save models to be deployed on your server if not os path exists('model')os mkdir('model'if not os path exists('scaler')os mkdir('scaler'joblib dump(modelr'model/model pickle'joblib dump(ssr'scaler/scaler pickle'these files can be easily deployed on server with necessary code to reload the model and predict new data sampleswhich we will see in the upcoming sections