Question: For this assignment, you are to determine which model is best for prediction, report the right hyperparameters, and the resulting accuracy for the Digit Recognition

For this assignment, you are to determine which model is best for prediction, report the right hyperparameters, and the resulting accuracy for the Digit Recognition data set that was used in the Homework 1. As before, create a PDF of your notebook showing your steps and include the table below as mentioned. Attach both a Jupyter notebook and the PDF version. Also, be sure to include your name at the start of the notebook and at the top of the PDF. Specifically, you are to test the following models Steps are as follows: 1. Separate your data into training and testing. We will use cross-validation over the training set to select the right parameters a. Use train_test_split to create a separate training and test set. x_train, x test, y _train, y _test = train_test_split (x, y, stratify = True, test_size =0.20 ) b. For the training set, you have two choices to perform hyperparameter selection. i. Use cross-validation to evaluate each model variant and select the best hyperparameters (standard practice, most recommended) ii. Create a hold-out validation set and train on one portion of the data and use the accuracy on the hold-out validation set to pick the right hyperparameters (also valid) 2. Steps to turn in for the assignment (Deliverables): a. Train the four models with their default parameters. Report the resulting accuracy of each model using the default parameters. b. For each of the four models, find the hyperparameters giving the highest accuracy on the validation set by performing an exhaustive grid search. Report the hyperparameter values and accuracy on the validation set. i. Consider using sklearn.model_selection.GridSearchCV ii. For the models with two hyperparameters, you will need to search both simultaneously to find the optimum combination c. Now apply the highest accuracy trained models to the test set. Report the accuracy of each model. Fill the following table with the information
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
