R, Machine Learning, Nonlinear Regression.
library(tidyverse) library(caret) library(ggplot2) library(splines) library(mgcv) Now we can start our analysis. First, let’s separate our data set as 80% of the training data set and 20% of the test data set. The R codes for this are shown below: set.seed(123) training.samples<-Boston$medv %>%