Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2 Compare the performances of different ML algorithms a ) Randomly select two supervised learning modelling algorithms to test against one another by running
Part Compare the performances of different ML algorithms
a Randomly select two supervised learning modelling algorithms to test against
one another by running the following code. Make sure you enter your student ID
into the command set.seed Your ML approaches are given by myModels.
set.seedEnter your student ID
models.list cLogistic Ridge Regression",
"Logistic LASSO Regression",
"Logistic ElasticNet Regression"
models.list cClassification Tree",
"Bagging Tree",
"Random Forest"
myModels csamplemodelslist size
samplemodelslist size
myModels data.frame
For each of your two ML modelling approaches, you will need to:
b Run the ML algorithm in R on the two training sets with Classification as the
outcome variable.
c Perform hyperparameter tuning to optimise the model:
Outline your hyperparameter tuningsearching strategy for each of the ML
modelling approaches. Report on the search ranges for hyperparameter
tuning, which fold CV was used, and the number of repeated CVs if
applicable and the final optimal tuning parameter values and relevant CV
statistics ie CV results, tables and plots where appropriate. If you are
using repeated CVs a minimum of repeats are required.
If your selected tree model is Bagging, you must tune the nbagg, cp and
minsplit hyperparameters, with at least values for each.
P a g e
If your selected tree model is Random Forest, you must tune the num.trees
and mtry hyperparameters, with at least values for each.
Be sure to set the randomisation seed using your student ID
d Evaluate the predictive performance of your two ML models, derived from the
balanced and unbalanced training sets, on the testing set. Provide the confusion
matrices and report and interpret the following measures in the context of the
project:
Overall Accuracy
Precision
Recall
Fscore
Make sure you define each of the above metrics in the context of the study. Hint:
Use the help menu in R Studio on the confusionMatrix function to see how one
can obtain the precision, recall and Fscore metrics.
e Provide a brief statement on your final recommended model and why you have
chosen it This includes explaining which metrics you have used in making this
decision and why. Parsimony, and to a lesser extent, interpretability maybe
taken into account if the decision is close. You may outline your penalised model
estimates in the Appendix if it helps with your argument
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