LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Parallel Programming with Dask in Python

Kurs anzeigen

Anleitung zur Übung

  • 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.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# 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)
Code bearbeiten und ausführen