2

Is there a way I can attach some sort of confidence with my predictions from Decision Tree Regression output in python?

from sklearn.tree import DecisionTreeRegressor
dt = DecisionTreeRegressor(random_state=0, criterion="mae")
dt_fit = dt.fit(X_train, y_train)

y_pred = dt_fit.predict(X_test)
Community
  • 1
  • 1
ayadav
  • 75
  • 8
  • I think you might have a better chance of getting a response by adding an sklearn tag to your question. People providing answers also frequently would like to see a little code, perhaps the code that you're using now to generate your predictions. – Ben Oct 28 '19 at 21:07

2 Answers2

0

df_fit.predict_prob() is for classification problem.

-1

you can use dt_fit.predict_proba(X_test)