Kernel regression

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In statistics, kernel regression is a non-parametric technique to estimate the conditional expectation of a random variable. The objective is to find a non-linear relation between a pair of random variables X and Y. In any nonparametric regression, the conditional expectation of a variable Y relative to a variable X may be written: : \operatorname{E}(Y \mid X) = m(X) where m is an unknown function.

In statistics, kernel regression is a non-parametric technique to estimate the conditional expectation of a random variable. The objective is to find a non-linear relation between a pair of random variables X and Y. In any nonparametric regression, the conditional expectation of a variable Y relative to a variable X may be written: \operatorname{E}(Y \mid X) = m(X) where m is an unknown function. \widehat{m}_h(x)=\frac{\sum_{i=1}^n K_h(x-x_i) y_i}{\sum_{i=1}^nK_h(x-x_i)} where K_h(t) = \frac{1}{h}K\left(\frac{t}{h}\right) is a kernel with a bandwidth h such that K(\cdot) is of order at least 1, that is \int_{-\infty}^\infty u K(u) \, du = 0 . \operatorname{E}(Y \mid X=x) = \int y f(y\mid x) \, dy = \int y \frac{f(x,y)}{f(x)} \, dy we estimate the joint distributions f(x,y) and f(x) using kernel density estimation with a kernel K: \hat{f}(x,y) = \frac{1}{n}\sum_{i=1}^n K_h(x-x_i) K_h(y-y_i), \hat{f}(x) = \frac{1}{n} \sum_{i=1}^n K_h(x-x_i), We get: \begin{align} \operatorname{\hat E}(Y \mid X=x) &= \int y \frac{\hat{f}(x,y)}{\hat{f}(x)} \, dy,\\[6pt] &= \int y \frac{\sum_{i=1}^n K_h(x-x_i) K_h(y-y_i)}{\sum_{j=1}^n K_h(x-x_j)} \,dy,\\[6pt] &= \frac{\sum_{i=1}^n K_h(x-x_i) \int y \, K_h(y-y_i) \,dy}{\sum_{j=1}^n K_h(x-x_j)},\\[6pt] &= \frac{\sum_{i=1}^n K_h(x-x_i) y_i}{\sum_{j=1}^n K_h(x-x_j)}, \end{align} which is the Nadaraya–Watson estimator. \widehat{m}_{PC}(x) = h^{-1} \sum_{i=2}^n (x_i - x_{i-1}) K\left(\frac{x-x_i}{h}\right) y_i where h is the bandwidth (or smoothing parameter). \widehat{m}_{GM}(x) = h^{-1} \sum_{i=1}^n \left[\int_{s_{i-1}}^{s_i} K\left(\frac{x-u}{h}\right) \, du\right] y_i where s_i = \frac{x_{i-1} + x_i}{2}. install.packages("np") library(np) # non parametric library data(cps71) attach(cps71) m

Text derived from https://en.wikipedia.org/w/index.php?oldid=1304219114 under CC BY-SA 4.0; modifications have been made.