Kernel Regression (Nadaraya-Watson and Local Polynomial)
Kernel regression estimates the mean of an outcome as a smooth function of one predictor by locally weighted averaging (Nadaraya-Watson) or local polynomial fitting, without assuming a parametric shape.
커널 회귀는 국소 가중평균(Nadaraya-Watson)이나 국소다항 적합으로 결과변수의 평균을 한 설명변수의 매끄러운 함수로 추정하며, 특정 함수 형태를 가정하지 않습니다.
How does my outcome change with age if I do not want to assume a straight line or a particular curve?
직선이나 특정 곡선을 가정하지 않고 나이에 따라 결과변수가 어떻게 변하는지 보려면 어떻게 하나요?
Fit a local constant, linear or quadratic regression at each point using kernel weights, choosing the bandwidth by leave-one-out cross-validation or a corrected AIC. Report the fitted curve on a grid with wild-bootstrap pointwise bands and the effective degrees of freedom.
When to use Kernel Regression (Nadaraya-Watson and Local Polynomial)
- You want a data-driven curve for one continuous predictor.
- You need to check the shape of a relationship before choosing a parametric form.
- You have enough observations to estimate a curve locally.
When to use something else
- You have several predictors to smooth jointly; use a generalized additive model.
- You need a simple smoother for display only; LOESS smoothing regression is enough.
Assumptions and requirements
- Only the first feature is used as x.
- Bandwidth selection uses a 1,500-row random subsample when n is larger, rescaled by the n^(-1/5) rule; at most 20,000 rows are allowed.
- Bootstrap bands describe sampling variation around the fit and do not correct smoothing bias.
What the analysis reports
- Fitted curve on a grid
- Selected bandwidth and selection rule
- Pointwise wild-bootstrap bands
- Effective degrees of freedom and R-squared
How to report it
A local linear regression with a Gaussian kernel (bandwidth = [value], chosen by cross-validation) used [value] effective degrees of freedom; the fitted curve rose until [x value] and levelled off thereafter.
Common variants
자주 쓰는 설정
The same analysis with settings already chosen. Each runs Kernel Regression (Nadaraya-Watson and Local Polynomial) itself, at the same price.
- Multivariate kernel regression (npregress-style) — multivariate set to “on”
- Local linear smoother with rule-of-thumb bandwidth — bandwidth set to “rot”; degree set to “1”
Related methods
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with statsmodels and direct computations (formulas, enumeration or simulation).
독립 계산. statsmodels·직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Kernel Regression (Nadaraya-Watson and Local Polynomial) on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.