Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

model.predict Decision Tree Model

#Building the Decision Tree Model on our dataset
from sklearn.tree import DecisionTreeRegressor
DT_model = DecisionTreeRegressor(max_depth=5).fit(X_train,Y_train)
DT_predict = DT_model.predict(X_test) #Predictions on Testing data
print(DT_predict)
Source by www.askpython.com #
 
PREVIOUS NEXT
Tagged: #Decision #Tree #Model
ADD COMMENT
Topic
Name
9+5 =