we will do this by hand herebut we'll introduce the standardscaler to do this automatically in in[ ]compute the mean value per feature on the training set mean_on_train x_train mean(axis= compute the standard deviation of each feature on the training set std_on_train x_train std(axis= subtract the meanand scale by inverse standard deviation afterwardmean= and std= x_train_scaled (x_train mean_on_trainstd_on_train use the same transformation (using training mean and stdon the test set x_test_scaled (x_test mean_on_trainstd_on_train mlp mlpclassifier(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 convergencewarningstochastic optimizermaximum iterations reached and the optimization hasn' converged yet the results are much better after scalingand already quite competitive we got warning from the modelthoughthat tells us that the maximum number of iterations has been reached this is part of the adam algorithm for learning the modeland tells us that we should increase the number of iterationsin[ ]mlp mlpclassifier(max_iter= 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 supervised machine learning algorithms