print("x_test shape{}format(x_test shape)print("y_test shape{}format(y_test shape)out[ ]x_test shape( y_test shape( ,first things firstlook at your data before building machine learning model it is often good idea to inspect the datato see if the task is easily solvable without machine learningor if the desired information might not be contained in the data additionallyinspecting your data is good way to find abnormalities and peculiarities maybe some of your irises were measured using inches and not centimetersfor example in the real worldinconsistencies in the data and unexpected measurements are very common one of the best ways to inspect data is to visualize it one way to do this is by using scatter plot scatter plot of the data puts one feature along the -axis and another along the -axisand draws dot for each data point unfortunatelycomputer screens have only two dimensionswhich allows us to plot only two (or maybe threefeatures at time it is difficult to plot datasets with more than three features this way one way around this problem is to do pair plotwhich looks at all possible pairs of features if you have small number of featuressuch as the four we have herethis is quite reasonable you should keep in mindhoweverthat pair plot does not show the interaction of all of features at onceso some interesting aspects of the data may not be revealed when visualizing it this way figure - is pair plot of the features in the training set the data points are colored according to the species the iris belongs to to create the plotwe first convert the numpy array into pandas dataframe pandas has function to create pair plots called scatter_matrix the diagonal of this matrix is filled with histograms of each featurein[ ]create dataframe from data in x_train label the columns using the strings in iris_dataset feature_names iris_dataframe pd dataframe(x_traincolumns=iris_dataset feature_namescreate scatter matrix from the dataframecolor by y_train grr pd scatter_matrix(iris_dataframec=y_trainfigsize=( )marker=' 'hist_kwds={'bins' } = alpha cmap=mglearn cm first applicationclassifying iris species