Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import the function that plots learning curves from sklearn.
ML Python
from sklearn.model_selection import [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to generate training and validation scores for a model using learning_curve.
ML Python
train_sizes, train_scores, test_scores = learning_curve(estimator, X, y, cv=[1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to correctly compute the mean training scores.
ML Python
mean_train_scores = train_scores.[1](axis=1)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to plot training and validation scores against training sizes.
ML Python
plt.plot(train_sizes, mean_train_scores, label='[1]') plt.plot(train_sizes, mean_test_scores, label='[2]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to complete the code that plots learning curves with labels and axis titles.
ML Python
plt.xlabel('[1]') plt.ylabel('[2]') plt.title('[3]')
Drag options to blanks, or click blank then click option'
Attempts:
3 left