In this project, you will apply k-nearest neighbors, decision tree, random forest and bagging on the tumor prediction data set. The data set contains information about patient measurements. The output

Decision Tree, Random Forest and Bagging Assignment

In this project, you will apply k-nearest neighbors, decision tree, random forest and bagging on the

tumor prediction data set.

The data set contains informa tion about patient measurements. The output label is either 'M' for

malignant tumor or 'B' for benign tumor .

Implement k-nearest neighbor decision tree, random forest, bagging with knn or decision tree to predict

a patient have a benign or ma lignant tumor. Evaluate each machine learning algorithm mentioned

previously by f inding the score of each method and display the best score for each machine one.

The output label column 'diagnosis' has two values 'M' or 'B'. You may need to change the output label

column 'diagnosis' column from the 'M' and 'B' to 0 and 1, respectively. There are many ways to do that,

one way is as follows:

data["diagnosis"] = [1 if i.strip() == "M" else 0 for i in data["diagnosis"]]

Where 'data ' is the data frame that stores the data set from pd.read_csv ('data.csv ')

You have provided with the .ipynb file, fill the cells with the correct code for each cell.

What to submit:

1) [LastName]_ Assignment .ipy nb with the correct code .