Learn Before
Concept

Local Regression Algorithm At X = x0x_0

  1. Gather the fraction s = kn\frac{k}{n} of training points whose XiX_i are closest to X0X_0.
  2. Assign a weight Ki0=K(xi,x0)K_{i0}=K(x_i,x_0) to each point in this neighborhood, so that the point furthest from X0X_0 has weight zero, and the closest has highest weight. All but these k nearest neighbors get weight zero.
  3. Fit a weighted least squares regression of the yiy_i on the xix_i using the aforementioned weights, by finding β0^\hat{\beta _0} and β1^\hat{\beta _1} that minimize i=1nKi0(yiβ0β1xi)2\sum^n _{i=1} K_{i0}(y_i-\beta_0-\beta_1 x_i)^2.
  4. The fitted value at x0x_0 is given by f(x0)^=β0^+β1^x0\hat{f(x_0)}=\hat{\beta_0}+\hat{\beta_1}x_0.

0

0

Updated 2020-06-22

Tags

Data Science