Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Problem

Predicting Housing Median Prices. The file BostonHousing.csv contains information on over 500 census tracts in Boston, where for each tract multiple 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 12 columns. Partition the data into training (60%) and validation (40%) sets.

a. Perform a k-NN prediction with all 12 predictors (ignore the CAT.MEDV column), trying values of k from 1 to 5. Make sure to normalize the data and choose function knn() from package class rather than package FNN. To make sure R is using the class package (when both packages are loaded), use class: knn(). What is the best k? What does it mean?

b. Predict the MEDV for a tract with the following information, using the best k:

1692_information-table.jpg

c. If we used the above k-NN algorithm to score the training data, what would be the error of the training set?

d. Why is the validation data error overly optimistic compared to the error rate when applying this k-NN predictor to new data?

e. If the purpose is to predict MEDV for several thousands of new tracts, what would be the disadvantage of using k-NN prediction? List the operations that the algorithm goes through in order to produce each prediction.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92764692

Have any Question?


Related Questions in Computer Engineering

Section 26 in the smith textbook elementary information

Section 2.6 in the Smith textbook ( elementary information security 2nd edition) offers a list of 6 high-level security controls. Pick two of them and describe how you personally experience those controls in use on perso ...

Question synchronization barriers are a common paradigm in

Question : Synchronization barriers are a common paradigm in many parallel applications. A barrier is supposed to block a calling thread until all N threads have reached the barrier. (Parallel applications often divide u ...

Are us executives paid too much particularly compared to

Are U.S. Executives paid too much particularly compared to the average worker in their organization?

42 of the cars in a dealer lot are red 21 are black and 10

42% of the cars in a dealer lot are red, 21% are black and 10% are white. The remainder are some other unspecified color. Salespersons randomly shows three cars to three different customers. What is the probability the f ...

Suppose a consumer is trying to make a choice over the

Suppose a consumer is trying to make a choice over the consumption of two goods: x and y. Px = 3, Py = 4 and the income is equal to 50. Assume that the government distributes some stamps that are good to buy 5 units of g ...

Identify at least two 2 factors that have led to the

Identify at least two (2) factors that have led to the explosive growth of digital crime over the past a few decades. Next, describe the most common forms of digital crime, and give your opinion as to why those forms you ...

Question suppose we have a disk with capacity 98304 gb if

Question : Suppose we have a disk with capacity 98.304 GB, if number of platters 16, an average of 300 sectors per track and 20,000 tracks per surface. Then calculate the number of bytes per sector.

Use state-transition testing to solve the following testing

Use state-transition testing to solve the following testing problem. In a course registration system, students can register for a given course when the course is in the open state. At the end of the registration period, ...

If a html or pdf full text link to an article is shown can

If a HTML or PDF Full Text link to an article is shown, can you access that source by clicking on the full text link?

What are the minimum numbers of keys and pointers in btree

What are the minimum numbers of keys and pointers in Btree (i) interior nodes and (ii) leaves, when: a) n = 10; i.e., a block holds 10 keys and 11 pointeis. b) n = 11; i.e., a block holds 11 keys and 12 pointers.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As