2
$\begingroup$

I plotted a learning curve below. There is a thick red band around the top portion of my training score. Why is it so high at the beginning?

enter image description here

Below is a snippet of the code used:

train_sizes, train_scores, test_scores = learning_curve(
        estimator, X, y, cv=cv, n_jobs=n_jobs, train_sizes=train_sizes, scoring= 'neg_brier_score')
    train_scores_mean = np.mean(train_scores, axis=1)
    train_scores_std = np.std(train_scores, axis=1)
    test_scores_mean = np.mean(test_scores, axis=1)
    test_scores_std = np.std(test_scores, axis=1)
    plt.grid()

    plt.fill_between(train_sizes, train_scores_mean - train_scores_std,train_scores_mean + train_scores_std, alpha=0.1,
                     color="r")
    plt.fill_between(train_sizes, test_scores_mean - test_scores_std,
                     # + test_scores_std, alpha=0.1, color="g")
    plt.plot(train_sizes, train_scores_mean, 'o-', color="r",
             label="Training brier score")
    plt.plot(train_sizes, test_scores_mean, 'o-', color="g",
             label="Cross-validation brier score")
$\endgroup$
0
$\begingroup$

I only have a guess, but I suspect it could be simply due to random initialisation. This would mean that after few training samples the models would still be very different. After 400k training samples the models all converge to the same learning path. I could be wrong of course!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.