Experiment with different initializations of the parameter


R code: experiment with different sets of parameters and observe how your model performs. classification.

1. Experiment with different initializations of the parameter used for gradient descent . Clearly mention the initial values of the parameter tried,

1a.Train 2 models, one on the train_0_1 set and another on train_3_5, and report the training and test accuracies.

1b. Repeat a 10 times, i.e. you should obtain 10 train and test accuracies for each set.

Calculate the average train and test accuracies over the 10 runs, and report them., report the average test and train accuracies obtained by using this initialization, mention which is set of initializations is the better.

2.. Experiment with different convergence criteria for gradient descent. Clearly mention the new criteria tried, run the same experiment as 1b using this new criteria, report average test and train accuracies obtained using this criteria, mention which set of criteria is better.

Describe [initial_parameters_baseline, convergence_criteria_baseline] in your first set of results 1b and these will serve as your baseline results.

For 1a, just change the initial parameters and keep the convergence criteria same [initial_parameters_experiment, convergence_criteria_baseline] and obtain the results.

For 1b, just change the convergence criteria and keep parameter initialization same [initial_parameters_baseline, convergence_criteria_experiment] and obtain results. Experiment with ONLY one different initialization and ONLY one different convergence criteria than baseline.

You can either code new functions for question 1 or you can re-use your previous functions with different function arguments if your code is generic and modular.

For e.g. in Gradient Descent function, you can have "theta" as an argument and call it with different initial values instead of creating a new Gradient Descent function for a different initial value of "theta". Implementation details are up to you.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Experiment with different initializations of the parameter
Reference No:- TGS02911335

Expected delivery within 24 Hours