with the help of following codewe can run the classifier on the mesh gridoutput classifier predict(np c_[x_vals ravel()y_vals ravel()]output output reshape(x_vals shapeplt figure(plt pcolormesh(x_valsy_valsoutputcmap=plt cm grayplt scatter( [: ] [: ] =ys= edgecolors='black'linewidth= cmap=plt cm pairedthe following line of code will specify the boundaries of the plot plt xlim(x_vals min()x_vals max()plt ylim(y_vals min()y_vals max()plt xticks((np arange(int( [: min( )int( [: max( ) ))plt yticks((np arange(int( [: min( )int( [: max( ) ))plt show(nowafter running the code we will get the following outputlogistic regression classifier