dask / dask-searchcv

dask-searchcv is now part of dask-ml: https://github.com/dask/dask-ml
BSD 3-Clause "New" or "Revised" License
240 stars 43 forks source link

Support lazy evaluation #19

Closed mrocklin closed 7 years ago

mrocklin commented 7 years ago

I was trying to see the graph produced by DaskGridSearchCV.fit. My first attempt was to add a compute=False keyword. Looking at the code it's not clear that this is possible. Is this difficult to support?

jcrist commented 7 years ago

Lazy evaluation conflicts with scikit-learn's api, and is tricky to support here in a way that is both intuitive and robust. For some configurations there is also the need to call get multiple times, which prevents lazy evaluation.

After calling fit, both the graph and the keys are stored on the grid search object as dask_graph_ and dask_keys_. You can also use the visualize method on the search object to view the graph:

>>> est.fit(X, y)
>>> est.visualize()
mrocklin commented 7 years ago

Oh great. Thanks for the explanation.