Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

decision tree classifier example

# Create Decision Tree classifer object
clf = DecisionTreeClassifier()

# Train Decision Tree Classifer
clf = clf.fit(X_train,y_train)

#Predict the response for test dataset
y_pred = clf.predict(X_test)
Source by www.datacamp.com #
 
PREVIOUS NEXT
Tagged: #decision #tree #classifier
ADD COMMENT
Topic
Name
5+9 =