tant when considering more features let' analyze linearlogistic in more detail on the breast cancer datasetin[ ]from sklearn datasets import load_breast_cancer cancer load_breast_cancer(x_trainx_testy_trainy_test train_test_splitcancer datacancer targetstratify=cancer targetrandom_state= logreg logisticregression(fit(x_trainy_trainprint("training set score{ }format(logreg score(x_trainy_train))print("test set score{ }format(logreg score(x_testy_test))out[ ]training set score test set score the default value of = provides quite good performancewith accuracy on both the training and the test set but as training and test set performance are very closeit is likely that we are underfitting let' try to increase to fit more flexible modelin[ ]logreg logisticregression( = fit(x_trainy_trainprint("training set score{ }format(logreg score(x_trainy_train))print("test set score{ }format(logreg score(x_testy_test))out[ ]training set score test set score using = results in higher training set accuracyand also slightly increased test set accuracyconfirming our intuition that more complex model should perform better we can also investigate what happens if we use an even more regularized model than the default of = by setting = in[ ]logreg logisticregression( = fit(x_trainy_trainprint("training set score{ }format(logreg score(x_trainy_train))print("test set score{ }format(logreg score(x_testy_test))out[ ]training set score test set score supervised machine learning algorithms