Using Slices In Python
I use the dataset from UCI repo: http://archive.ics.uci.edu/ml/datasets/Energy+efficiency Then doing next: from pandas import * from sklearn.neighbors import KNeighborsRegressor fr
Solution 1:
I think that I had a similar problem before! Try to convert your data to numpy arrays before feeding them to sklearn
estimators. It most probably solve the hashing problem. For instance, You can do:
Xtrn_array = Xtrn.as_matrix()
Ytrn_array = Ytrn.as_matrix()
and use Xtrn_array and Ytrn_array when you fit your data to estimators.
Post a Comment for "Using Slices In Python"