Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: shift in python 
Python :: python if file exists append else create 
Python :: repl.it secret 
Python :: extract numbers from list of strings python using regex 
Python :: pandas loop over chunk of rows 
Python :: python edit item in list 
Python :: Python Tkinter MenuButton Widget 
Python :: password protected cmd python 
Python :: pandas remove multi header from dataframe 
Python :: how to run python file in when windows startup 
Python :: lenet 5 keras 
Python :: mergesort python 
Python :: numpy roll 
Python :: hash function in python 
Python :: python date time 
Python :: export postgres database to heroku 
Python :: Reverse an string Using Loop in Python 
Python :: how to perform group by with django orm 
Python :: different types f python loops 
Python :: how to add values in python 
Python :: dataframe, groupby, select one 
Python :: dynamic footer in django 
Python :: python herencia 
Python :: how to compare list and int in python 
Python :: check package is installed by conda or pip environment 
Python :: linux python 
Python :: python index for all matches 
Python :: what does the combinations itertools in python do 
Python :: continue statement in python 
Python :: += in python 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =