CommencerCommencer gratuitement

Making lazy predictions

The model you trained last time was good, but it could be better if you passed through the training data a few more times. Also, it is a shame to see a good model go to waste, so you should use this one to make some predictions on a separate dataset from the one you train on.

An unfitted version of the model you created in the last exercise is available in your environment as dask_model. Dask DataFrames of training data are available as dask_X and dask_y.

Cet exercice fait partie du cours

Parallel Programming with Dask in Python

Afficher le cours

Instructions

  • Create a for loop and use it to train dask_model on dask_X and dask_y 5 times.
  • Use the fitted model to make predictions for the input variables dask_X.
  • Compute these predictions using the default scheduler.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Loop over the training data 5 times
____:
	dask_model.____

# Use your model to make predictions
y_pred_delayed = ____

# Compute the predictions
y_pred_computed = ____

print(y_pred_computed)
Modifier et exécuter le code