Home /
Expert Answers /
Other /
a-3pt-two-engineers-were-independently-testing-a-cubic-polynomial-regression-model-on-the-same-datas

a. (3pt.) Two engineers were independently testing a cubic polynomial regression model on the same dataset. Both of them used leave-one-out cross-validation. They had almost identical R code, except that one of the engineers had setaseed(3) on the first line of his R code, while the other one had setaseed(7). Would these engineers end up with different results? Why? b. (3pt.) If one of the two engineers in Problem la used the validation set approach, while the other one used 10-fold cross-validation. Both of them performed the test multiple times with different seed numbers. What would you expect to see in terms of the mean square errors? Why? c. (4pt., three points on the code and one point on the answer.) In this question, you will analyze the Default data set. Perform logistics regression to predict default using 2 models. • default-balanse student defaultzbalanse*student Use 10-fold cross-validation to evaluate the model. Also check whether the predictors are significant. Which model is the best? Explain. Please use set.seed(1) on the first line of your R code. You will need to put cost function as a parameter for healmc) in order to get the logistic regression error rate. See the example on cxalm page. You need to declare cost function as following: cost=function(arrobs) { pred=rep (e. length(Y)) pred[probs>.5151 mean(predb=Y) Show transcribed image text a. (3pt.) Two engineers were independently testing a cubic polynomial regression model on the same dataset. Both of them used leave-one-out cross-validation. They had almost identical R code, except that one of the engineers had setaseed(3) on the first line of his R code, while the other one had setaseed(7). Would these engineers end up with different results? Why? b. (3pt.) If one of the two engineers in Problem la used the validation set approach, while the other one used 10-fold cross-validation. Both of them performed the test multiple times with different seed numbers. What would you expect to see in terms of the mean square errors? Why? c. (4pt., three points on the code and one point on the answer.) In this question, you will analyze the Default data set. Perform logistics regression to predict default using 2 models. • default-balanse student defaultzbalanse*student Use 10-fold cross-validation to evaluate the model. Also check whether the predictors are significant. Which model is the best? Explain. Please use set.seed(1) on the first line of your R code. You will need to put cost function as a parameter for healmc) in order to get the logistic regression error rate. See the example on cxalm page. You need to declare cost function as following: cost=function(arrobs) { pred=rep (e. length(Y)) pred[probs>.5151 mean(predb=Y)

Answer to a. (3pt.) Two engineers were independently testing a cubic polynomial regression model on the same dataset. Both of them...