Answered step by step
Verified Expert Solution
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 kNN and Logistic algorithms for classification. Provide your answers to the questions in a Word document named AssignLastName.doc along with your source code saved as AssignLastName. If you plan to use RMarkdown, please save it as AssignLastName. Then click the Assignment link above, upload the files, and submit.
Use the attached Wisconsin Breast Cancer Data Set,wiscbcdata.csv which originates from UCI Machine Learning Repository, to answer the following questions:
Question : 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. pts
Ive provided this video: Assignment for the prepressing of data for the prediction, which you can take a look at before answering the next question.
Question : 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 : pts
Develop the model using the knn classifier algorithm. pts
Evaluate the model's performance for different K and suggest the best model. pts
Question : 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. 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$diagnosisrecodeBCL$diagnosis, M
yourData$diagnosisrecodeBCL$diagnosis, B
wiscbcdata.csv
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started