I am trying to import sklearn.neighbors
in Python, and from there import KNeighborsClassifier
. When I try to execute it in Python, I get a ValueError
:
ValueError(u"Invalid mode, expected 'c' or 'fortran', got f\x00o\x00r\x00t",) in <module 'threading' from '/home/sjain55/anaconda/lib/python2.7/threading.pyc'> ignored' .
A little gist of the code :
from sklearn.neighbors import KNeighborsClassifier
neigh = KNeighborsClassifier(n_neighbors=10)
selected_features = X[:, idx[0:num_fea]]
neigh.fit(selected_features[train], y[train]) //this is the line giving me the above error.
I've tried searching, but wasn't able to find why I am receiving such an error. Does anyone have any idea why I'm receiving this error?
Data printed on verbose
s1 : 18863
s : 11062
check2
I was called with 2464 arguments:
(1440, 1)
check
ck1
{'fisher_score': True, 'y': array([ 1, 1, 1, ..., 20, 20, 20], dtype=uint8), 'neighbor_mode': 'supervised'}
/home/sjain55/Desktop/FS_Package_DMML-master/FS_package/function/similarity_based/fisher_score.py:47: RuntimeWarning: divide by zero encountered in divide score = 1.0/lap_score - 1
Exception ValueError: ValueError(u"Invalid mode, expected 'c' or 'fortran', got f\x00o\x00r\x00t",) in ignored