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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started