Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Predicting housing median prices. The file BostonHousing.xls contains information on over 500 census t racts in Boston, where for each tract 14 variables are recorded.

Predicting housing median prices.

The file BostonHousing.xls contains information on over 500 census tracts in Boston, where for each tract 14 variables are recorded. The last column (CAT.MEDV) was derived from MEDV, such that it obtains the value 1 if MEDV>30 and 0 otherwise. Consider the goal of predicting the median value (MEDV) of a tract, given the information in the first 13 columns. Partition the data into training (60%) and validation (40%) sets. (For interpretation of the column names in BostonHousing.xls, please make reference to Table 2.2 on page 27 of the textbook)

a) Perform a k-nearest neighbors prediction with all 13 predictors (the CAT.MEDV column is the outcome or decision variable), trying values of k from 1 to 10. Make sure to normalize the data (click normalize input data"). What is the best k chosen? What does it mean? (10 points)

b) Why is the validation data error overly optimistic compared to the error rate when applying this kNNpredictor to new data? (10 points)

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago