How can I do the following in the language R given datasets DATA_TEST.csv and DATA_TRAINING.csv: Split the
Fantastic news! We've Found the answer you've been seeking!
Question:
How can I do the following in the language R given datasets DATA_TEST.csv and DATA_TRAINING.csv:
- Split the data set into a training set and a test set.
- Fit a linear model using least squares on the training set and report the test error obtained.
- Fit a ridge regression model on the training set, with chosen by cross-validation.
- Report the test error obtained. You may choose the number of folds you wish or use LOO Cross-Validation.
- Fit a LASSO model on the training set, with chosen by cross-validation. Report the test error obtained. EDIT: modified the premise + added a screenshot of part of my test and training dataset Posted Date: