Home / Expert Answers / Finance / 1-randomly-shuffle-your-data-again-2-define-which-rows-belong-to-which-fold-hint-1-you-can-use-pa393

(Solved): 1. Randomly shuffle your data again. 2. Define which rows belong to which fold. Hint 1: You can use ...



student submitted image, transcription available belowstudent submitted image, transcription available below
1. Randomly shuffle your data again. 2. Define which rows belong to which fold. Hint 1: You can use the function cut on any vector to split it into equally sized folds Hint 2: You may not cut the data into parts directly. Instead you may want to cut the row indices (1: data 3. Foreach of the 10 folds (write a loop using for or sapply): (a) Define the test set. Hint: you can use the function which, to define which rows are included in the test set. Sometimes, a minimal example helps to understand how the function works. testingstuff which(testingstuff (b) Define the training set. Hint: the "-" Operator might be helpful. testingstuff (c) Run your models on the training data. (d) Make prediction on the test data and compute the MSEs. (e) Save them in a vector. 4. Average the MSE over runs. Which model is better? Information and annotation - Please complete the tasks listed below in - Please get together in groups of 3 persons, maximum, and hand in one assignment per group - Please send us the finished assignments via email (philipp.kugler@iaw.edu or martin.kroczek@iaw.edu) - Your assignment solution should be a single, run-able R script file, which we will re-run (we will adjust the working directory in your code, accordingly) - Please comment your code to make it comprehensible - Tasks that require an answer in text form should be answered in comments in the code - Please state the names and matriculation numbers of all group members in your code - This assignment is due by November, , end of day - Grading will be based on - Whether the script runs correctly - Whether the produced results are correct - Whether the comments are concise and helpful - Whether both script and notes are generally helpful and concise


We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe