English

Conditional Mean and Variance Estimation via \textit{k}-NN Algorithm with Automated Variance Selection

Methodology 2025-10-28 v2 Machine Learning Computation Machine Learning

Abstract

We introduce a novel \textit{k}-nearest neighbor (\textit{k}-NN) regression method for joint estimation of the conditional mean and variance. The proposed algorithm preserves the computational efficiency and manifold-learning capabilities of classical non-parametric \textit{k}-NN models, while integrating a data-driven variable selection step that improves empirical performance. By accurately estimating both conditional mean and variance regression functions, the method effectively reconstructs the conditional distribution and density functions for multiple families of scale-and-localization generative models. We show that our estimator can achieve fast convergence rates, and we derive practical rules for selecting the smoothing parameter~kk that enhance the precision of the algorithm in finite sample regimes. Extensive simulations for low, moderate and large-dimensional covariate spaces, together with a real-world biomedical application, demonstrate that the proposed method can consistently outperform the conventional \textit{k-NN} regression algorithm while being more interpretable in the model output.

Keywords

Cite

@article{arxiv.2402.01635,
  title  = {Conditional Mean and Variance Estimation via \textit{k}-NN Algorithm with Automated Variance Selection},
  author = {Marcos Matabuena and Juan C. Vidal and Oscar Hernan Madrid Padilla and Jukka-Pekka Onnela},
  journal= {arXiv preprint arXiv:2402.01635},
  year   = {2025}
}
R2 v1 2026-06-28T14:36:15.635Z