Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are you curious about regarding Erica?

Answered: 1 week ago