Jan-18-2018, 02:00 PM
Sparkz_alot thanks for the correction. You right I was using the "'" to comment like VBA, but It has to be #. I fix it.
Posted the error code.
Thanks for your time
Posted the error code.
Thanks for your time
#Random Forest rf=RandomForestClassifier(n_estimators=100) rf.fit(x_train,y_train) Traceback (most recent call last): File "<ipython-input-77-12afa76ba01c>", line 1, in <module> rf.fit(x_train,y_train) File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\ensemble\forest.py", line 247, in fit X = check_array(X, accept_sparse="csc", dtype=DTYPE) File "C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\validation.py", line 433, in check_array array = np.array(array, dtype=dtype, order=order, copy=copy) ValueError: could not convert string to float: 'YARIS SPORT'