XGB
XGB

Reputation: 367

'DataFrame' object has no attribute 'to_delayed'?

I am using randomforest model from scikit learn and BlockwisevottingRegressor from dask. Code: enter image description here

Error: enter image description here

Upvotes: 0

Views: 606

Answers (1)

SultanOrazbayev
SultanOrazbayev

Reputation: 16561

The problem stems from the lines:

Xs = X.to_delayed()
ys = y.to_delayed()

The .to_delayed() method is defined for dask DataFrames and dask Arrays, but not for pandas or numpy objects. It's likely that the labels X and y are associated with a pandas DataFrame.

In the error traceback image, the AttributeError suggests that the object is a pandas DataFrame (possibly another library's DataFrame, but most likely a pandas one).

Not much more can be derived from the image posted.

Upvotes: 2

Related Questions