the generalization performance stillthe model is performing quite well as there is some gap between the training and the test performancewe might try to decrease the model' complexity to get better generalization performance herewe choose to increase the alpha parameter (quite aggressivelyfrom to to add stronger regularization of the weightsin[ ]mlp mlpclassifier(max_iter= alpha= random_state= mlp fit(x_train_scaledy_trainprint("accuracy on training set{ }formatmlp score(x_train_scaledy_train))print("accuracy on test set{ }format(mlp score(x_test_scaledy_test))out[ ]accuracy on training set accuracy on test set this leads to performance on par with the best models so far while it is possible to analyze what neural network has learnedthis is usually much trickier than analyzing linear model or tree-based model one way to introspect what was learned is to look at the weights in the model you can see an example of this in the scikit-learn example gallery for the breast cancer datasetthis might be bit hard to understand the following plot (figure - shows the weights that were learned connecting the input to the first hidden layer the rows in this plot correspond to the input featureswhile the columns correspond to the hidden units light colors represent large positive valueswhile dark colors represent negative valuesin[ ]plt figure(figsize=( )plt imshow(mlp coefs_[ ]interpolation='none'cmap='viridis'plt yticks(range( )cancer feature_namesplt xlabel("columns in weight matrix"plt ylabel("input feature"plt colorbar( you might have noticed at this point that many of the well-performing models achieved exactly the same accuracy of this means that all of the models make exactly the same number of mistakeswhich is four if you compare the actual predictionsyou can even see that they make exactly the same mistakesthis might be consequence of the dataset being very smallor it may be because these points are really different from the rest supervised learning