R, Machine Learning, Nonlinear Regression.
knots=knots),data=train.data) predictions<-model %>% predict(test.data) data.frame( RMSE=RMSE(predictions,test.data$medv), R2=R2(predictions,test.data$medv) ) RMSE R2 1 4.958616 0.6911364 Here, the “quantile” function is used when determining the knots. It is seen that a total of 3 different knots