get best modelpredict and evaluate performance rs_best random_search best_estimator_ rs_y_pred rs_best predict(x_testmeu get_metrics(true_labels=y_testpredicted_labels=rs_y_predaccuracy precision recall score in this examplewe are getting the values of parameter and gamma from an exponential distribution and we are controlling the number of iterations of model search by the parameter n_iter while the overall model performance is similar to grid searchthe intent is to be aware of the different strategies in model tuning odel interpretation the objective of data science or machine learning is to solve real-world problemsautomate complex tasksand make our life easier and better while data scientists spend huge amount of time buildingtuningand deploying modelsone must ask the questions"what is this going to be used for?and "how does this really work?and the most important question"why should trust your model? business or organization will be more concerned about business objectivegenerating profitsand minimizing losses by leveraging analytics and machine learning hence often there is disconnect between analytics teams and key stakeholderscustomersclientsor management in trying to explain how models really work most of the timeexplaining complex theoretical and mathematical concepts can be really difficult to non-experts who may not have an idea orworsemight not be interested in knowing all the gory details this brings us back to the main objective"can we explain and interpret machine learning models in an easy to understand way"such that anyone even without thorough knowledge of machine learning can understand them the benefit of this would be two-fold--machine learning models will not just stop at being research projects or proofof-concepts and it will pave the way for higher adoption of machine learning based solutions in enterprises some machine learning models use interpretable algorithmsfor example decision tree will give you the importance of all the variables as an output also the prediction path of any new data point can be analyzed using decision tree hence we can learn what variable played crucial role for prediction unfortunatelythis can' be said for lot of modelsespecially for the ones who have no notion of variable importance some machine learning models are interpretable in nature by default generative model such as bayesian rule listletham et al (models such as simple decision trees could be made interpretable by using the feature importance as an output alsothe prediction path for single tree from the root of the tree to its leaves can be visualized capturing the contribution of the feature to the estimators decision policies butthis intuitiveness may not be possible for complex non-linear models random forestdeep neural networks convolutional neural networks (cnns)recurrent neural networks (rnnsthe lack of understanding of the complex nature of machine learned decision policies makes predictive models to be still viewed as black boxes model interpretations can help data scientist and an end user in variety of ways it will help bridge the gap that often exists between the technology teams and the business for exampleit can help identify the reason why particular prediction is being made and it can be verified using the domain knowledge of the end user by leveraging that easy to understand interpretation it can also help the data scientists understand the interactions among features that can lead to better feature engineering and enhanced performance it can also help in model comparisons and explaining the results better to the business stakeholders