Make predictions using X_test.

Responsive Centered Red Button

Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.

Question 11
Train a knn model where k is 3 using the training dataset.
Make predictions using the test dataset
Compute accuracy and save as accuracy
Hints:
You need to use the KNeighborsClassifier function. Instantiate a knn object and pass the number of neighbors to the function. Train the model using the X_train and y_train. Then make predictions using X_test. Then compute the accuracy using the predicted values and y_test.
Check Module 6d: Model Performance and _Module 5c: Classification
Question 12
Train a Random Forests model where the number of estimators is 100 using the training dataset.
Make predictions using the test dataset
Compute accuracy and save as accuracy
Hints:
You need to use the RandomForestClassifier function. Instantiate a RandomForestClassifier object and pass the number of estimators to the function. Train the model using the X_train and y_train. Then make predictions using X_test. Then compute the accuracy using the predicted values and y_test.
Check Module 6d: Model Performance and _Module 5c: Classification

How to create Testimonial Carousel using Bootstrap5

Clients' Reviews about Our Services