Chapter 4: Early Stopping
- Langage dominant
- Jupyter Notebook
- Étoiles
- 30k
- Forks
- 13.1k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
In the book is not mentioned to use the method ravel in the y_train, but if I don't use it the code crushes. The variables X_train, x_val, y_train and y_val, I created them with the method split.
X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2)
for epoch in range(1000):
sgd_reg.fit(X_train_poly_scaled, y_train.ravel()) # continues where it left off
y_val_predict = sgd_reg.predict(X_val_poly_scaled)
val_error = mean_squared_error(y_val, y_val_predict)
if val_error < minimum_val_error:
minimum_val_error = val_error
best_epoch = epoch
best_model = deepcopy(sgd_reg)
If I'm doing something wrong please can anyone tell me what I'm doing wrong!!
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.