In this lab exercise, you will learn a popular machine learning algorithm, Decision Tree. You will use this classification algorithm to build a model from historical data of patients, and their respond to different medications. Then you use the trained decision tree to predict the class of a unknown patient, or to find a proper drug for a new patient.
Import the Following Libraries:
- numpy (as np)
- DecisionTreeClassifier from sklearn.tree
import numpy as np
import pandas as pd
from sklearn.tree import DecisionTreeClassifier
my_data = pd.read_csv(“drug200.csv”, delimiter=”,”)