A fully grown tree builds branches for single rows. min_samples_leaf stops that: every leaf must hold at least that many training rows.
Write leaf_size_scores(leaf_sizes) for the breast cancer data.
load_breast_cancer(return_X_y=True, as_frame=True) and split it with train_test_split(X, y, test_size=0.25, random_state=0, stratify=y).leaf_sizes, in order, fit DecisionTreeClassifier(min_samples_leaf=value, random_state=0) on the training rows.Return a list with one [value, train_score, test_score] per value, with both scores rounded to 3 places.