Skip to content

Commit aa14a5e

Browse files
committed
Pushing the docs to dev/ for branch: main, commit deeda9736a64496cebcc897b7eab7925841d1a8e
1 parent 77c24bc commit aa14a5e

File tree

1,222 files changed

+4409
-4397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,222 files changed

+4409
-4397
lines changed
Binary file not shown.

dev/_downloads/57163227aeb4c19ca4c69b87a8d1949c/plot_learning_curve.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,16 @@ def plot_learning_curve(
159159
axes[1].set_title("Scalability of the model")
160160

161161
# Plot fit_time vs score
162+
fit_time_argsort = fit_times_mean.argsort()
163+
fit_time_sorted = fit_times_mean[fit_time_argsort]
164+
test_scores_mean_sorted = test_scores_mean[fit_time_argsort]
165+
test_scores_std_sorted = test_scores_std[fit_time_argsort]
162166
axes[2].grid()
163-
axes[2].plot(fit_times_mean, test_scores_mean, "o-")
167+
axes[2].plot(fit_time_sorted, test_scores_mean_sorted, "o-")
164168
axes[2].fill_between(
165-
fit_times_mean,
166-
test_scores_mean - test_scores_std,
167-
test_scores_mean + test_scores_std,
169+
fit_time_sorted,
170+
test_scores_mean_sorted - test_scores_std_sorted,
171+
test_scores_mean_sorted + test_scores_std_sorted,
168172
alpha=0.1,
169173
)
170174
axes[2].set_xlabel("fit_times")

0 commit comments

Comments
 (0)