- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I realise whenever i run linearRegression with intel python distrbution i get the following error
File "/home/dc/intel/intelpython3/lib/python3.5/site-packages/sklearn/daal4sklearn/linear.py", line 146, in predict good_shape_for_daal = True if X.ndim == 1 else True if X.shape[0] > X.shape[1] else False IndexError: tuple index out of range
i can simulate this error with the following code
from sklearn.linear_model import LinearRegression
y=[2,5,10,20,30,60] x=np.arange(1,7) model.fit(x[:,np.newaxis],y) y_predict=model.predict(5)
this would work in any other python distribution withh normal sklearn
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for bringing the issue to our attention. We have reproduced the problem. As a work-around you could either use
model.predict([[5]])
or disable optimizations by doing
from sklearn.daal4sklearn import dispatcher dispatcher.disable()
The fix will incorporated in the next update of the package.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page