DT Implementation Steps: 1 to 4

We will start to get familiarized with the implementation steps (1-4) of decision trees.

1) Import libraries

While decision trees can solve regression or classification problems, we will use the classification version of the algorithm as we will be predicting a discrete variable. Using the DecisionTreeClassifier algorithm from Scikit-learn, we will attempt to predict the dependent variable Clicked on Ad (0 or 1). The performance of the model will be evaluated using a classification report and a confusion matrix.

Get hands-on with 1400+ tech skills courses.