Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using R studio and following library / data library(MASS) data(Boston) 1. For Boston Housing case study, continue using 12201408 as the seed. Randomly sample a

Using R studio and following library / data

library(MASS)

data(Boston)

1. For Boston Housing case study, continue using 12201408 as the seed. Randomly sample a training data set that contains 80% of the original data and set the rest 20% aside as testing data. Build a random forest model. You may use ">library(randomForest)" and default options from ">randomForest()".

Using your random forest model, what is your out-of-sample mean (average) squared prediction error (MSPE) for your 20% testing data? (Note. Testing data should NOT be used in building the model nor finding the tuning parameters. Hence, generally, out-of-sample MSPE is a better criterion for model comparison.) Please keep two decimals. (e.g. 11.73)

.

2. For Boston Housing case study, build a boosting model on your 80% training data. You may use ">library(gbm)" and default options from ">gbm()". Using your boosting model, what is your out-of-sample mean (average) squared prediction error (MSPE) for your 20% testing data? (Note. Testing data should NOT be used in building the model nor finding the tuning parameters. Hence, generally, out-of-sample MSPE is a better criterion for model comparison.) Please keep two decimals. (e.g. 14.53).

please report your out-of-sample MSPE for your 20% testing sample for Boston Housing case using 12201408 as the seed for

  1. a) random forests
  2. b) boosting example( MSPE rf=11.73; MSPE boosting=14.53)

3. What are the top two important variables according to your random forest model?

a. crim and zn

b. indus and lstat

c. lstat and rm

d. crim and nox

.

4. What are the top two most important variables according to boosting trees using "relative influence"

a. crim and zn

b. indus and lstat

c. lstat and rm

d. crim and nox

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linear Algebra A Modern Introduction

Authors: David Poole

3rd edition

9781133169574 , 978-0538735452

More Books

Students also viewed these Mathematics questions

Question

What does the personal loan process involve?

Answered: 1 week ago

Question

=+b) What would you recommend doing next to help improve the model?

Answered: 1 week ago