Page 1 of 1

a. Question 2. Consider the kNN algorithm k=4 for the training set in the first question. Calculate precision value for

Posted: Wed Apr 27, 2022 3:34 pm
by answerhappygod
A Question 2 Consider The Knn Algorithm K 4 For The Training Set In The First Question Calculate Precision Value For 1
A Question 2 Consider The Knn Algorithm K 4 For The Training Set In The First Question Calculate Precision Value For 1 (39.84 KiB) Viewed 44 times
first question is
A Question 2 Consider The Knn Algorithm K 4 For The Training Set In The First Question Calculate Precision Value For 2
A Question 2 Consider The Knn Algorithm K 4 For The Training Set In The First Question Calculate Precision Value For 2 (135.16 KiB) Viewed 44 times
I want the solution of the question 2. Thanks.
a. Question 2. Consider the kNN algorithm k=4 for the training set in the first question. Calculate precision value for k € {1,..,10} and choose the best k value. b. Compare logistic regression with the best kNN method by building an ROC curve. Calculate Area Under Curve value for both methods. Explain which one is better. e.
Question 1. 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, average daily quantity of products, and average price of products bought by each customer are different between genders. 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 products, average prices of products bought by customers as well as ages. a. Please build the necessary SQL Code to obtain this table from the database. b. Using this dataset and gender as a class variable, build a logistic regression model and specify which variables are significant for gender. Support your statements using box plots, where gender is given in x-axis. c. By using 0.25, 0.5 and 0.75 as threshold values, calculate class predictions. d. To measure the performance of logistic regression, split data into two equal-size subsets, training and test sets, using random sampling. Re-calculate the logistic regression parameters and build confusion matrices for each threshold value. Provide True Positive Rate, False Positive Rate and Precision metrics.