Skip to content
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
This repository was archived by the owner on Jul 16, 2021. It is now read-only.

Using RandomizedCV with xgboost #21

@dma092

Description

@dma092

Hi all,

I am trying to use randomized cross validation on dask-xgboost.
Here is the snippet of code I am trying to get to work:

from dask_ml.model_selection import RandomizedSearchCV
from dask_ml.datasets import make_classification
from scipy.stats import uniform

X, y = make_classification(chunks=50)

model=dxgboost.XGBClassifier()
client=Client()
metric="f1"
data=X
target=y
bounds={"base_score": uniform(0.3, 0.7), "max_depth": uniform(3, 40), "learning_rate": uniform(0.05, 0.4),
                       "n_estimators": uniform(50, 200), "gamma": uniform(0, 10)}
results=RandomizedSearchCV(model, bounds,cv=3,scoring=metric,scheduler=client.scheduler).fit(data,target).best_estimator_

While running this code, I get the error TypeError: 'Future' object does not support indexing.
I think that I am misusing the api. If somebody can confirm that and point me to the right direction, I will be gratefull.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions