I got ValueError when predicting test data using a RandomForest model.
clf = RandomForestClassifier(n_estimators=10, max_depth=6, n_jobs=1, verbose=2)
clf.fit(X_fit, y_fit)
df_test.fillna(df_test.mean())
X_test = df_test.values
y_pred = clf.predict(X_test)
error:
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
If you want to unleash your potential in this competitive field, please visit the Machine Learning course page for more information, where you can find the Machine Learning tutorials and Machine Learning frequently asked interview questions and answers as well.