Chapter 5 exercise 5

Log in om je oplossingen te testen.
# convert the dependent variable to a numeric variable Default$default <- as.numeric(Default$default == "Yes") # 1 ... # 2 ## 1. Split the sample set into a training set and a validation set. set.seed(1) ... ## 2. Fit a multiple logistic regression model using only the training observations. ... ## 3. Obtain a prediction of default status for each individual in the validation dataset. ... ## 4. Compute the validation set error. ... # 3 ... for (i in 1:3) { set.seed(i) ... } # 4 set.seed(1) ...
Je kunt zo vaak indienen als je wenst. Er wordt enkel rekening gehouden met je laatst ingediende oplossing.
Log in om je oplossingen te testen.