There is no NaN in my dataset, I checked it carefully. Any reason I get this error when trying to pick up my classifier? Some of the numbers in the data set are quite large, and some decimal places come out of ten decimal places, but I would not cause the error. I have included some of my pandas DataFrame data below, as well as the error itself. Any ideas?
<class 'pandas.core.frame.DataFrame'> DatetimeIndex: 6244 entries, 1985-02-06 00:00:00 to 2009-11-05 00:00:00 Data columns (total 86 columns): dtypes: float64(86) clf = RandomForestClassifier(n_estimators=100,min_samples_split=4) clf.fit(train, train_target) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-150-fa4acb362bc6> in <module>() 1 clf = RandomForestClassifier(n_estimators=100,min_samples_split=4) ----> 2 clf.fit(train, train_target) 3 clf.score(test, test_target) C:\Anaconda\lib\site-packages\sklearn\ensemble\forest.pyc in fit(self, X, y, sample_weight) 255
source share