Question: CSV IS IN GOOGLE DRIVE LINK PLEASE HELP (CSV ) https://drive.google.com/file/d/1-mG7igIec5HIuS2hMlqSKuAKrQmDYN_1/view?usp=sharing Modify the code provided, in the following ways: X = dataset.iloc[:, [a, s]].values (use

CSV IS IN GOOGLE DRIVE LINK PLEASE HELP

(CSV ) https://drive.google.com/file/d/1-mG7igIec5HIuS2hMlqSKuAKrQmDYN_1/view?usp=sharing

Modify the code provided, in the following ways:

X = dataset.iloc[:, [a, s]].values (use age and estimated salary columns)

y = dataset.iloc[:, p].values. (use purchased column)

Change the name of the csv file being read into the dataset, to match the file provided in d2l.

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0) (change the code to use 80% for the training set)

Change the value of K to run the code to produce fourconfusion matrices for K 3, 5, 7, 9. Make sure to include the confusion matrices for the test set when you run for each value of K

For each value of K:

1. Paste the classification map (for the training set).

2. Paste the confusion matrices in the spaces provided.

The value of K is specified using: n_neighbors = K(KNN)

K = 1

K = 2

K = 3

K = 4

K = 5

3. Which value of K produces the lowest number of errors (false positives and false negatives) in the confusion matrix?

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 Databases Questions!