Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer the following three parts in R!!! Reference are following: Reference: (DO NOT NEED TO DO) (c) Apply the Parzen window approach of Problem
Please answer the following three parts in R!!! Reference are following:
Reference: (DO NOT NEED TO DO)
(c) Apply the Parzen window approach of Problem A.2 using the in-sample observations to estimate the responses associated with a uniform grid of predictors from 2 to 2 with step size 0.01. In the same plot, show the scattered in-sample data and the predictions associated with the grid of predictors for D=0.1 and D=0.5. All these objects should be visualized in the same plot. (d) Consider a uniform grid of values of D from 0.05 to 1 , with step size 0.05. For all these values of D compute the corresponding in-sample MSE and out-of-sample MSE and visualize the corresponding curves in the same plot. (e) Select the best value of D (automatically, not manually). Explain the criterion behind your choice. Recall that the KNN method identifies a fixed number of neighbors K to construct a local neighborhood N0 to a new set of predictors x0. A related approach called Parzen window fixes the maximal distance from a given point to be included in a neighborhood instead of fixing the number of nearest neighbors. Given D0, the Parzen window approach constructs a local neighborhood around a point x0 as W0={i:xix02D} The response at x0 is then estimated as y^0=W01iW0yi where W0 denotes the cardinality of W0. In the same setting as Problem A.1, use the Parzen window approach to compute y^0 using D=2,3
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