Question: rmd file and Knitted HTML or pdf document 144 145 **Question 2: Interpret the multiple regression analysis results by answering these questions: 146 147 (a)

rmd file and Knitted HTML or pdf document 144 145rmd file and Knitted HTML or pdf document

144 145 **Question 2: Interpret the multiple regression analysis results by answering these questions: 146 147 (a) Is this a valid model? Explain why or why not. ( 148 149 (b) Is this a good fit? Explain why or why not. 150 151 (c) which predictors have a significant impact on sales from second store onward? Explain why, 152 153 (d) According to this model, does the real time message increase the sales from second store orward? Is this impact the same for consumers with different loyalty status? Explain. 154 155 156 ADD YOUR RESPONSE HERE 157 158 159 160 161 - ## Task 3: Classification 162 In this task, you are asked to use the shopco data set to develop classifiers that classify consumers into loyalty classes lon (1) and high (0). 163 First, create train and test data sets. Then, develop KNN classifiers. 164 165. *** Task 3.1: Create training and testing set 166 Use 80:20 split ratio to divide the data into train and test sets. Please set seed to 1234. 167 168 - Er traintest) 169 170 set. seed (1234) 171 172 #use 80:20 split ratio (most common) which means 80% of the data would be in train set and 20% would be in test set 173 + Hint: You can use sample similar to the Week 8 R Lab. 174 175. 176 177 178. *** Task 3.2: Developing a KNN model - 179 use age, gender and fron_second_store_sales to develop a KNN model to classify consumer into low and high loyalty status for different values of k. Choose k to be equal to 1 and 40. Please set seed 180 181 - ++ k = 1 182 183-{r kn 184 185 set. seed (1234)# used when we want to reproduce results. # 186 187 188 + krn classifier for k=1 189 # Hint: In order to only use variables age, gender and from_second_store_sales make sure you use the subsets of train and test sets like this: 190 #trainc,c('age, gender, 'from second store sales')] rest.c('age', 'gender', 'from second store sales')] 191 192 193 # Confusion matrix 194 195 196 + accuracy 197 198 199 # ROC curve # 200 201 202. 203 204 205 - ++ K = 40 206 202 Note that you need to also compute the sensitivity and specificity for k - 40. 209. * r kno) 210 211 set. seed (1234)# used when we want to reproduce results. . 212 213 # knn classifier for 40 214 215 216 # Confusion matrix 217 218 # accuracy 219 220 ** True high or O loyalty status (positive) rate (sensitivity or recall): TP / (TP + FN) 221 222 ** True low or i loyalty status (negative) rate (specificity): TN / (TN + FP) 223 1:1 Bam2 Script Answers 207 20 144 145 **Question 2: Interpret the multiple regression analysis results by answering these questions: 146 147 (a) Is this a valid model? Explain why or why not. ( 148 149 (b) Is this a good fit? Explain why or why not. 150 151 (c) which predictors have a significant impact on sales from second store onward? Explain why, 152 153 (d) According to this model, does the real time message increase the sales from second store orward? Is this impact the same for consumers with different loyalty status? Explain. 154 155 156 ADD YOUR RESPONSE HERE 157 158 159 160 161 - ## Task 3: Classification 162 In this task, you are asked to use the shopco data set to develop classifiers that classify consumers into loyalty classes lon (1) and high (0). 163 First, create train and test data sets. Then, develop KNN classifiers. 164 165. *** Task 3.1: Create training and testing set 166 Use 80:20 split ratio to divide the data into train and test sets. Please set seed to 1234. 167 168 - Er traintest) 169 170 set. seed (1234) 171 172 #use 80:20 split ratio (most common) which means 80% of the data would be in train set and 20% would be in test set 173 + Hint: You can use sample similar to the Week 8 R Lab. 174 175. 176 177 178. *** Task 3.2: Developing a KNN model - 179 use age, gender and fron_second_store_sales to develop a KNN model to classify consumer into low and high loyalty status for different values of k. Choose k to be equal to 1 and 40. Please set seed 180 181 - ++ k = 1 182 183-{r kn 184 185 set. seed (1234)# used when we want to reproduce results. # 186 187 188 + krn classifier for k=1 189 # Hint: In order to only use variables age, gender and from_second_store_sales make sure you use the subsets of train and test sets like this: 190 #trainc,c('age, gender, 'from second store sales')] rest.c('age', 'gender', 'from second store sales')] 191 192 193 # Confusion matrix 194 195 196 + accuracy 197 198 199 # ROC curve # 200 201 202. 203 204 205 - ++ K = 40 206 202 Note that you need to also compute the sensitivity and specificity for k - 40. 209. * r kno) 210 211 set. seed (1234)# used when we want to reproduce results. . 212 213 # knn classifier for 40 214 215 216 # Confusion matrix 217 218 # accuracy 219 220 ** True high or O loyalty status (positive) rate (sensitivity or recall): TP / (TP + FN) 221 222 ** True low or i loyalty status (negative) rate (specificity): TN / (TN + FP) 223 1:1 Bam2 Script Answers 207 20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!