Question: Q4. Read the data file ModelSelection.csv, which contains 1500 pairs of (x, y). These data are acquired from a model in the form y =

Q4. Read the data file ModelSelection.csv, which contains 1500 pairs of (x, y). These data are acquired from a model in the form y = Bo + Bix"1 + Bar"? + B3.x"3. (10) We neither know the quantities Bo, B1, B2, B3, nor know the exponents n1, 12, 13. All we know are the following: Bo, B1, B2, B3 are real numbers ni, N2, N3 are integers not less than 1 and no greater than 10. In other words: Ni E {1,2,3,... 10}, i=1,2,3 Read the data and split it into two sets. Set 1 includes the first 1000 rows of the data (do not count the row associated with the x, y names), and set 2, which includes the last 500 rows of the data. Name the first set train and the second set test. Using the linear model function in R (or the counterpart in Python), write a program that explores all the models in the form (10), trains them on the train and tests them on test. The output of your program should be the values Bo, B1, B2, B3 and 11, 12, N3 which correspond to the model with the best (i.e., minimum) MSE value. Please provide your code and the values Bo, B1, B2, B3 and n1, n2, n3 that your code returns
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
