Ques%on 3.1
Using the same data set (credit_card_data.txt or credit_card_data-headers.txt) as in Ques%on 2.2, use the ksvm or kknn
func%on to find a good classifier:
I started by installing and running the “kknn” package. I then loaded the credit card data in to the “cd_info” variable.
I then proceeded with the cross valida<on process using the “train.kknn” func<on with a “k” value of “30”. (I had a small error,
but was then able to run the code). I ended up with a mean squared error: “0.1081193”.
This study source was downloaded by 100000850872992 from CourseHero.com on 04-11-2023 00:20:09 GMT -05:00
https://www.coursehero.com/file/78314760/ISYE-6501-Week-2-Homework-Finalpdf/
, The next “k” value I use was “25”. The mean squared error was: “0.1086863”
For a “k” value of “15”, I ended up with a mean squared error: “01117159”. Then I wanted to experiment with a higher value of
“k”, so I fit the model with a value of “90”. For the last value, the results were a mean squared error: “0.1073792” and it seems
the model was recommending a “k” value of “58”.
This study source was downloaded by 100000850872992 from CourseHero.com on 04-11-2023 00:20:09 GMT -05:00
https://www.coursehero.com/file/78314760/ISYE-6501-Week-2-Homework-Finalpdf/