2173 Salk Avenue, Suite 250 Carlsbad, CA

support@assignmentprep.info

Which column(s) represent the dependent variable (i.e. the one we want to predict)?

June 16, 2021
Christopher R. Teeple

I need the answers for this assignment , there is already same assignment attachment but the answers are not correct only got %27 overall.DSCI 352 Assignment 5 -Predicting Breast CancerIn this assignment you will be applying machine learning to try to predict breast cancer from a set of biological attributes in a tissue sample. Specifically, you will be constructing, evaluating, and comparing three different classification models.As this is an online assignment, it is imperative that you CAREFULLY READ AND FOLLOW ALL DIRECTIONS.Failure to do so may result in points lost unnecessarily.This assignment is to be entirely your own work -by submitting you certify that this is true.To begin, please download the following data file:https://drive.google.com/file/d/1JUfmGe_3Tr_3hkM55…-rAYCBuTizIsX/view?usp=sharingPREREQUISITES -Getting Set UpFirst, set your working directory to the folder where you downloaded the data file above.Second, add the following two lines to your code file AS THE FIRST TWO LINES (if you are using a code file), or else copy them into your R console BEFORE DOING ANYTHING ELSE (if you are working directly in the command line):olibrary(caret)oset.seed(32343)The first command imports the caret library for machine learning, and the set.seed method will ensure that everyone gets the same answer when using randomized methods such as random forests. YOU MUST MAKE SURE TO DO THESE TWO STEPS BEFORE PROCEEDING OR YOUR ANSWERS WILL NOT BE CORRECT.1.In this assignment we are going to build predictive models which will use cell/tissue sample information to predict whether the sample is normal or or breast cancer.To begin, read in the above data set and use head to inspect the first few rows. Which column(s) represent the dependent variable (i.e. the one we want to predict)?(1 point)☐Patient.ID☐Clump.Thickness☐Size.Uniformity☐Shape.Uniformity☐Marginal.Adhesion☐Epithelial.Cell.Size☐Bare.Nuclei☐Bland.Chromatin☐Normal.Nuclei☐Mitosis☐Diagnosis2.Looking at the data above, which column(s) represent the independent variable(s) (i.e. the one(s) which may conceivably have a predictive relationship with what we are trying to predict)?(1 point)☐Patient.ID☐Clump.Thickness☐Size.Uniformity☐Shape.Uniformity☐Marginal.Adhesion☐Epithelial.Cell.Size☐Bare.Nuclei☐Bland.Chromatin☐Normal.Nuclei☐Mitosis☐Diagnosis3.How many benign cases are found in this data? (Enter only a number)*Hint: Use subsetting to find this(1 point)4.How many malignant cases are found in this data? (Enter only a number)(1 point)5.Is this data set balanced?(1 point)◯Yes, it is approximately balanced◯No, it is slightly imbalanced (i.e. one class is no more than twice the size of the other)◯No, it is moderately imbalanced (one class is between 2 to 5 times the size of the other)◯No, it is highly imbalanced (one class is more than 5 times the size of the other)INSTRUCTIONS:Please carry out the following steps to prepare your data for further analysis before proceeding to the next questions:1.Use data slicing to get rid of any columns in the data set which are neither dependent nor independent variables as you specified above.2.Split the data into training and test sets. The training set should contain exactly 70% of the dataand thetest set should contain the remaining 30%.MODEL 1 -Logistic Regression:Construct a logistic regression model to predict the dependent variable identified above from the independent variables you identified (in questions 1 and 2 above). DO NOT USE ANY SCALING OR OTHER PREPROCESSING.Train your model on the training data and test/evaluate its performance using the test data. When evaluating your results, make sure to set the positive class to ‘Malignant’. You will use the results of this model evaluation to answer the next 8 questions.6.What is the accuracy of this model? (Enter a number only, no rounding)(1 point)7.What is the precision of this model? (Enter a number only, no rounding)(1 point)8.What is the recall of this model? (Enter a number only, no rounding)(1 point)9.What is the balanced accuracy of this model? (Enter a number only, no rounding)(1 point)10.How many cases in the test data did this model correctly predict as benign? (Enter only a number, no rounding)(1 point)11.How many cases in the test data did this model correctly predict as malignant? (Enter only a number, no rounding)(1 point)12.How many cases in the test data did this model incorrectly predict as benign (i.e. how many false negatives)? (Enter only a number, no rounding)(1 point)13.How many cases in the test data did this model incorrectly predict as malignant (i.e. how many false positives)? (Enter only a number, no rounding)(1 point)MODEL 2 -Naive Bayes:Construct a Naive Bayes model to predict the dependent variable identified above from the independent variables you identified (in questions 1 and 2 above). DO NOT USE ANY SCALING OR OTHER PREPROCESSING.Train your model on the training data and test/evaluate its performance using the test data. When evaluating your results, make sure to set the positive class to ‘Malignant’. You will use the results of this model evaluation to answer the next 8 questions.14.What is the accuracy of this model? (Enter a number only, no rounding)(1 point)15.What is the precision of this model? (Enter a number only, no rounding)(1 point)16.What is the recall of this model? (Enter a number only, no rounding)(1 point)17.What is the balanced accuracy of this model? (Enter a number only, no rounding)(1 point)18.How many cases in the test data did this model correctly predict as benign? (Enter only a number, no rounding)(1 point)19.How many cases in the test data did this model correctly predict as malignant? (Enter only a number, no rounding)(1 point)20.How many cases in the test data did this model incorrectly predict as benign (i.e. how many false negatives)? (Enter only a number, no rounding)(1 point)21.How many cases in the test data did this model incorrectly predict as malignant (1 point)(i.e. how many false positives)? (Enter only a number, no rounding)MODEL 3 -Random Forest:Construct a Random Forest model to predict the dependent variable identified above from the independent variables you identified (in questions 1 and 2 above). DO NOT USE ANY SCALING OR OTHER PREPROCESSING.Train your model on the training data and test/evaluate its performance using the test data. When evaluating your results, make sure to set the positive class to ‘Malignant’. You will use the results of this model evaluation to answer the next 8 questions.22.What is the accuracy of this model? (Enter a number only, no rounding)(1 point)23.What is the precision of this model? (Enter a number only, no rounding)(1 point)24.What is the recall of this model? (Enter a number only, no rounding)(1 point)25.What is the balanced accuracy of this model? (Enter a number only, no rounding)(1 point)26.How many cases in the test data did this model correctly predict as benign? (Enter only a number, no rounding)(1 point)27.How many cases in the test data did this model correctly predict as malignant? (Enter only a number, no rounding)(1 point)28.How many cases in the test data did this model incorrectly predict as benign (i.e. how many false negatives)? (Enter only a number, no rounding)(1 point)29.How many cases in the test data did this model incorrectly predict as malignant (i.e. how many false positives)? (Enter only a number, no rounding)(1 point)Model Comparison: Use the results from your three models above to answer the remaining questions.30.Based on the three models you constructed and the results, can we make good predictions about a tissue sample being breast cancer or normal?(1 point)◯No, accuracy was below 60% in all models◯No, balanced accuracy was below 60% for all models◯No, accuracy, precision, recall, and balanced accuracy were below 60% for all models◯This depends on the model, in some cases accuracy and precision were below 60%◯Yes, accuracy was above 90% in all cases◯Yes, accuracy, precision, recall, and balanced accuracy were above 90% in all models.31.Suppose we want to select the model with the least chance of missing a case of breast cancer (i.e. missing a positive instance). Which metric should we use to compare models?(1 point)◯Prevalance◯Specificity◯Detection Prevalence◯Sensitivity◯Balanced Accuracy◯Neg Pred Value◯Pos Pred Value◯Detection Rate◯Kappa32.Suppose we want to select the model in which we can have the greatest certainty that if the predicted outcome is positive (i.e. predicted as malignant), this is in fact correct. Which metric should we use to compare models?(1 point)◯Sensitivity◯Prevalance◯Detection Rate◯Detection Prevalence◯Pos Pred Value◯Balanced Accuracy◯Kappa◯Specificity◯Neg Pred Value33.By the criteria chosen above, which model would be the worst?(1 point)◯Logistic Regression◯Naive Bayes◯Random Forest

Struggling With a Similar Paper? Get Reliable Help Now.

Delivered on time. Plagiarism-free. Good Grades.

What is this?

It’s a homework service designed by a team of 23 writers based in Carlsbad, CA with one specific goal – to help students just like you complete their assignments on time and get good grades!

Why do you do it?

Because getting a degree is hard these days! With many students being forced to juggle between demanding careers, family life and a rigorous academic schedule. Having a helping hand from time to time goes a long way in making sure you get to the finish line with your sanity intact!

How does it work?

You have an assignment you need help with. Instead of struggling on this alone, you give us your assignment instructions, we select a team of 2 writers to work on your paper, after it’s done we send it to you via email.

What kind of writer will work on my paper?

Our support team will assign your paper to a team of 2 writers with a background in your degree – For example, if you have a nursing paper we will select a team with a nursing background. The main writer will handle the research and writing part while the second writer will proof the paper for grammar, formatting & referencing mistakes if any.

Our team is comprised of native English speakers working exclusively from the United States. 

Will the paper be original?

Yes! It will be just as if you wrote the paper yourself! Completely original, written from your scratch following your specific instructions.

Is it free?

No, it’s a paid service. You pay for someone to work on your assignment for you.

Is it legit? Can I trust you?

Completely legit, backed by an iron-clad money back guarantee. We’ve been doing this since 2007 – helping students like you get through college.

Will you deliver it on time?

Absolutely! We understand you have a really tight deadline and you need this delivered a few hours before your deadline so you can look at it before turning it in.

Can you get me a good grade? It’s my final project and I need a good grade.

Yes! We only pick projects where we are sure we’ll deliver good grades.

What do you need to get started on my paper?

* The full assignment instructions as they appear on your school account.

* If a Grading Rubric is present, make sure to attach it.

* Include any special announcements or emails you might have gotten from your Professor pertaining to this assignment.

* Any templates or additional files required to complete the assignment.

How do I place an order?

You can do so through our custom order page here or you can talk to our live chat team and they’ll guide you on how to do this.

How will I receive my paper?

We will send it to your email. Please make sure to provide us with your best email – we’ll be using this to communicate to you throughout the whole process.

Getting Your Paper Today is as Simple as ABC

No more missed deadlines! No more late points deductions!

}

You give us your assignments instructions via email or through our order page.

Our support team selects a qualified writing team of 2 writers for you.

l

In under 5 minutes after you place your order, research & writing begins.

Complete paper is delivered to your email before your deadline is up.

Want A Good Grade?

Get a professional writer who has worked on a similar assignment to do this paper for you