8000 DOC: fixup plot in "Pipelining: chaining a PCA and a logistic regress… · glemaitre/scikit-learn@622a7d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 622a7d6

Browse files
MarcoGorelliadrinjalali
authored andcommitted
DOC: fixup plot in "Pipelining: chaining a PCA and a logistic regression" example (scikit-learn#28345)
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
1 parent c193a88 commit 622a7d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/compose/plot_digits_pipe.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@
6868
best_clfs = results.groupby(components_col)[
6969
[components_col, "mean_test_score", "std_test_score"]
7070
].apply(lambda g: g.nlargest(1, "mean_test_score"))
71-
72-
best_clfs.plot(
73-
x=components_col, y="mean_test_score", yerr="std_test_score", legend=False, ax=ax1
71+
ax1.errorbar(
72+
best_clfs[components_col],
73+
best_clfs["mean_test_score"],
74+
yerr=best_clfs["std_test_score"],
7475
)
7576
ax1.set_ylabel("Classification accuracy (val)")
7677
ax1.set_xlabel("n_components")

0 commit comments

Comments
 (0)
0