Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2) [25 pnts] The manager of the marketing department of Supersale Groceries believes that the male customers are buying in larger quantities compared to

  

2) [25 pnts] The manager of the marketing department of Supersale Groceries believes that the male customers are buying in larger quantities compared to the female customers. Also the manager thinks the age of customers, and average price of products bought by each customer are different. In order to evaluate the claim, the manager asks you to build necessary SQL tables including average sale quantities for each male and female customers respectively for all product ids as well as average prices of products bought by customers. a. Please build the necessary SQL Code to obtain this table from the database. b. Using gender as a class variable, consider kNN algorithm with the following independent variables: average sale quantitiy, age, average product price bought by each customer using k=4. c. Evaluate the accuracy of the predictions from kNN algorithm using the following ratio: # of true estimates total # of estimates d. Consider k=3, k-5, k=6, and k-7 for the KNN algorithm and calculate the same ratio. Which value generates better estimations?

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

Business Statistics A Decision Making Approach

Authors: David F. Groebner, Patrick W. Shannon, Phillip C. Fry

9th Edition

013302184X, 978-0133021844

More Books

Students also viewed these Programming questions

Question

what is one benefit of manageability in the cloud

Answered: 1 week ago