Question
Split data set into 80:20 train and test data with the name BostonTraining and BostonTest respectively Your answer here In the Boston data set, medv
In the Boston data set, medv is the target.
Please construct a simple linear regression of medv by rm using BostonTraining Your answer here
Use this model to predict medv in BostonTest and calculate MAE and MSE. Your answer here
Multiple Linear Regression
Please construct a multiple linear regression of medv by all features in BostonTraining Your answer here
Use this model to predict medv in BostonTest and calculate MAE and MSE Your answer here
Subset Selection Linear Regression Model
Forward Stepwise
Please construct a forward stepwise regression with BostonTraining.
Your answer here
Use this model to predict medv in BostonTesting and calculate MAE and MSE. Your answer here
Backward Stepwise
Please construct a backward stepwise regression with BostonTraining. Your answer here
Use this model to predict medv in BostonTesting and calculate MAE and MSE. Your answer here
Model Assessment
Compare all the linear regression models. You can use plots, assessment measures (R2, RSS, MAE, MSE,etc.) Which one is better? Explain your answer.
Boston dataset : https://r-data.pmagunia.com/system/files/datasets/dataset-70319.csv
Load the Boston data set
# import packages library(MASS) library(MLmetrics)
#load data data(Boston)
Check the number of observations and features using dim Your answer here
checking correlation between numerical variables and indicate highly correlated variables (features) Your answer here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started