We can perform the same analysis using R in a notebook. The functions are different for the different language, but the functionality is very close.
We use the same algorithm:
- Load the dataset
- Split the dataset into training and testing partitions
- Develop a model based on the training partition
- Use the model to predict from the testing partition
- Compare predicted versus actual testing
The coding is as follows:
#load in the data set from uci.edu (slightly different from other housing model) housing <- read.table("http://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data") #assign column names colnames(housing) <- c("CRIM", "ZN", "INDUS", "CHAS", "NOX", "RM", "AGE", "DIS", "RAD", "TAX", "PRATIO...