Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

anyone who knows R programming? actually i need to develop Knn model for 3 predictors age, gender01 and from_second_store_sales. I have converted the colums into

anyone who knows R programming? actually i need to develop Knn model for 3 predictors age, gender01 and from_second_store_sales. I have converted the colums into numerical but still im getting error.

image text in transcribed
### Task 3.3: Developing a KNN model Use age, gender and from_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, 10 and 40. Please set seed to 1234. Note that the KnC) function only takes numeric variables. Make sure you make necessary transformations before using KnnC). ## k = 1 I4 \"'{r knnl} set.seed(1234) # used when we want to reproduce results. #transformation of column into numeric shopco$gender01

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

Step: 3

blur-text-image

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

Mathematical Analysis For Quantitative Finance

Authors: Daniele Ritelli, Giulia Spaletta

1st Edition

1351245104, 9781351245104

More Books

Students also viewed these Mathematics questions

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago