Question: This assignment asks you to examine the k - NN and Logistic algorithms for classification. Provide your answers to the questions in a Word document

This assignment asks you to examine the k-NN and Logistic algorithms for classification. Provide your answers to the questions in a Word document named Assign1-1_LastName.doc along with your source code saved as Assign1-1_LastName. If you plan to use R-Markdown, please save it as Assign1-1_LastName. Then click the Assignment 1-1 link above, upload the files, and submit.
Use the attached Wisconsin Breast Cancer Data Set,(wisc_bc_data.csv) which originates from UCI Machine Learning Repository, to answer the following questions:
Question 1: Explore and prepare data by using the str() function. Display the probability of the attributes (benign and malignant) of the variable named diagnosis that we plan to use for prediction. (20 pts)
Ive provided this video: Assignment 1 for the prepressing of data for the prediction, which you can take a look at before answering the next question.
Question 2: Create datasets for training and testing the model, and develop the model using the knn classifier algorithm. Evaluate the model with different k, and propose the best value of k.
Split the dataset into training and testing. The proportions of training and testing dataset will be 7:3.(20 pts)
Develop the model using the knn classifier algorithm. (20 pts)
Evaluate the model's performance for different K, and suggest the best model. (20 pts)
Question 3: Using logistic regression, develop the diagnostic machine learning algorithm to assist the medical team in determining whether the tumor is malignant or not. Provide a detailed explanation of the output. (20 pts)
Tip) When building a logistic regression model, you need to recode the dependent variable ('diagnosis') in this dataset. To do so, you can use recode() in the 'car' package to recode values. Here is an example of using recode() for this assignment.
yourData$diagnosis<-recode(BCL$diagnosis, "'M'=1")
yourData$diagnosis<-recode(BCL$diagnosis, "'B'=0")
wisc_bc_data.csv

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!