We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to test the predict function but it raises the following error:
AttributeError: 'RandomForestRegressor' object has no attribute 'n_outputs_'.
AttributeError: 'RandomForestRegressor' object has no attribute 'n_outputs_'
Yet it seems that actually it has when checking the sklearn webpage.
Here is the full error message:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-101-56bf611044fd> in <module> 1 # checking the performance of training data itselfz ----> 2 prediction, bias, contributions = ti.predict(rf, numpy_df_train) 3 idx = pd.date_range(train_start_date, train_end_date) 4 predictions_df1 = pd.DataFrame(data=prediction[0:], index = idx, columns=['prices']) 5 predictions_df1.plot() C:\ProgramData\Anaconda3\lib\site-packages\treeinterpreter\treeinterpreter.py in predict(model, X, joint_contribution) 193 """ 194 # Only single out response variable supported, --> 195 if model.n_outputs_ > 1: 196 raise ValueError("Multilabel classification trees not supported") 197 AttributeError: 'RandomForestRegressor' object has no attribute 'n_outputs_'
The text was updated successfully, but these errors were encountered:
Did you fit the RandomForestRegressor before using ti.predict? the n_outputs_ attribute is created only once the model is fitted.
RandomForestRegressor
ti.predict
n_outputs_
Sorry, something went wrong.
No branches or pull requests
I'm trying to test the predict function but it raises the following error:
AttributeError: 'RandomForestRegressor' object has no attribute 'n_outputs_'
.Yet it seems that actually it has when checking the sklearn webpage.
Here is the full error message:
The text was updated successfully, but these errors were encountered: