Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose you work for a wine company as a data mining expert. You are to build a k-nearest neighbor algorithm to predict the quality of

Suppose you work for a wine company as a data mining expert. You are to build a k-nearest neighbor algorithm to predict the quality of wine from different factors. Download the dataset calledwinequality-red.csv(Links to an external site.)

from Module 4 and then perform the following tasks. The data description is provided in the file calleddescription-winequality-red.docx(Links to an external site.)

.

  1. Provide the summary statistics for all the variables from the dataset. Explain some of the key aspects of the dataset.
  2. Examine the SAS code frommod4knn.sas(Links to an external site.)
  3. file and for each SAS statement, provide the explanation of the code as SAS comments. Put this part in the Appendix of your report.
  4. Perform the k-NN using k = 1, 2, and 3. For each case, explain the SAS output and give interpretation(s).
  5. Which case (k = 1, 2, or 3) provides the best model? Explain why using the output from part c.

Take the screenshots of SAS output and paste them into a Word document. Include all relevant calculations and your responses to all items (1, 2, 3, and 4) and submit the document to Canvas for grading. Clearly label all elements in your submission. In addition, provide a short description of any challenge(s) you faced during this

assignment.

MIS450MOD4kn.sas

/*Students need to modify this code accordingly*/ /*Randomly choose 50% of data to fit the model*/ proc surveyselect data=work.IMPORT3 out=wine samprate=0.5 method =srs outall; run; /*Number of k neighbors*/ %let k=1; /*Perform knn algorithm*/ proc discrim data=wine(where=(selected=1)) test=wine(where=(selected=0)) testout=winetestout method=NPAR k=&k listerr crosslisterr; class quality; var fixed_acidity volatile_acidity citric_acid residual_sugar chlorides free_sulfur_dioxide total_sulfur_dioxide density pH sulphates alcohol; title 'Using KNN on Wine Data'; run; 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Probability And Statistical Inference

Authors: Robert V. Hogg, Elliot Tanis, Dale Zimmerman

10th Edition

013518939X, 978-0135189399

More Books

Students also viewed these Mathematics questions

Question

7. How can an interpreter influence the utterer (sender)?

Answered: 1 week ago

Question

8. How can an interpreter influence the message?

Answered: 1 week ago