R, Machine Learning, Nonlinear Regression.
create a model according to the 6th degree and look at the results: model<-lm(medv~poly(lstat,6),data=train.data) summary(model) Polynomial Regression Summary Output (6th degree) When we look at the output, we can say that it makes sense for the first 5 degrees. We see that the 6th degree is