jasperroebroek / sklearn-quantile

BSD 3-Clause "New" or "Revised" License
18 stars 1 forks source link

IndexError: index 4605838757126685970 is out of bounds for axis 0 with size 12533225 #6

Closed crauh8 closed 6 months ago

crauh8 commented 1 year ago

In general the package works great, but for one sample it always gives the following error message: clf_fitted = qlf.fit(X, Y) File "sklearn_quantile/ensemble/quantile.pyx", line 329, in sklearn_quantile.ensemble.quantile.SampleForestQuantileRegressor.fit IndexError: index 4605838757126685970 is out of bounds for axis 0 with size 12533225

when running

my_list = [round(0.02 * i, 2) for i in range(1, 50)]

qlf = SampleRandomForestQuantileRegressor(max_depth=max_depth,n_estimators=n_estimators,min_samples_split =2,min_samples_leaf=4, q = my_list, random_state=4283)
 clf_fitted = qlf.fit(X, Y)

The same code works for other samples, and subsamples of the given sample.

jasperroebroek commented 1 year ago

Thanks for reaching out. I have updated the code a while ago, and have uploaded it now to PyPI and conda. Could you please run your example with the newest version (v0.0.29) installed and let me know if it worked?

crauh8 commented 1 year ago

Solved! Thanks so much