we definitely see two distinct clusters but there is more overlap as compared to the -means method between the two clusters and we have more mislabeled instances howeverdo take note of the label numbershere we have and as the label values this is just to reinforce the fact that the label values are just to distinguish the clusters and don' mean anything the advantage of this method is that you do not need to input the number of clusters beforehand and the model tries to find it from the underlying data model evaluation we have seen the process of data retrievalprocessingwrangling and modeling based on various requirements logical question that follows is how we can make the judgment whether model is good or badjust because we have developed something fancy using renowned algorithmdoesn' guarantee its performance will be great model evaluation is the answer to these questions and is an essential part of the whole machine learning pipeline we have mentioned it quite number of times in that past about how model development is an iterative process model evaluation is the defining part of the iterative process which makes it iterative in nature based on model evaluation and subsequent comparisons we can take call whether to continue our efforts in model enhancement or cease them and which model should be selected as the final model to be used\deployed model evaluation also helps us in the very important process of tuning the hyperparameters of the model and also deciding scenarios likeif the intelligent feature that we just developed is adding any value to our model or not combining all these arguments makes compelling case for having defined process for model evaluation and what metrics can be used to measuring and evaluating models so how can we evaluate modelhow can we make decision whether model is better or model performs betterthe ideal way is to have some numerical measure or metric of model' effectiveness and use that measure to rank and select models this will be one of the primary ways for us to evaluate models but we should also keep in mind that lot of times these evaluation metrics may not capture the required success criteria of the problem we are trying to solve in these caseswe will be required to become imaginative and adapt these metrics to our problem and use things like business constraints and objectives model evaluation metrics are highly dependent on the type of model we haveso metrics for regression models will be different from the classification models or clustering models considering this dependency we will break this section down in three sub-sections we cover the major model evaluation metrics for three categories of models evaluating classification models classification models are one of the most popular models among machine learning practitioners due to their popularityit is essential to know how to build good qualitygeneralized models they have varied set of metrics that can be used to evaluate classification models in this sectionwe target small subset of those metrics that are essential we use the models that we developed in the previous section to illustrate them in detail for thislet' first prepare train and test datasets to build our classification models we will be leveraging the and variables from beforewhich holds the data and labels for the breast cancer dataset observations from sklearn model_selection import train_test_split x_trainx_testy_trainy_test train_test_split(xytest_size= random_state= print(x_train shapex_test shape( (