Abstract
Classical density estimation assumes that data follows a continuous distribution. However, real-world data often contains a mixture of continuous values and discrete "atoms" (repeated exact values). Standard methods like Kernel Density Estimation (KDE) fail in these scenarios, producing biased results. This paper introduces a simple "wrapper" approach: treat data points appearing exactly once as continuous and repeated observations as discrete. This method achieves theoretical consistency and superior empirical performance without requiring prior knowledge of the data's composition.
The Problem: When Distributions Collide
In statistics and machine learning, we often assume data is either entirely continuous or entirely discrete. Mixed discrete-continuous data—where a continuous distribution is punctuated by point masses—breaks this assumption. For instance, a sensor might provide continuous measurements but output exactly 0.0 during an error state.
Standard KDE algorithms struggle with such data because they attempt to fit a smooth curve to discrete spikes. This leads to severe bias and prevents the estimator from converging to the true underlying density. Existing robust alternatives often require knowing the proportion of discrete data beforehand or sacrifice performance when the data is purely continuous.
The "Unique-Point" Wrapper
The authors propose a remarkably simple heuristic based on a fundamental property of probability: in a continuous distribution, the chance of drawing the same value twice is zero. Therefore, any observation that repeats in a dataset is almost certainly part of a discrete component.
The proposed method works as a wrapper for any continuous density estimator:
- Filter: Separate the dataset into unique observations ($U_n$) and repeated observations. As shown in the example table above, identical rows are flagged as discrete.
- Estimate: Apply the standard continuous estimator (like KDE) only to the unique set $U_n$.
- Functional Estimation: Adapt existing estimators for entropy or divergence to operate on these filtered sets.
This approach offers a "free lunch": if the data is purely continuous, no points repeat, and the method performs identically to standard estimators. It requires no prior knowledge of atom locations or mixing proportions.
Empirical Performance
The method's effectiveness is demonstrated through simulations on mixed datasets. Theoretical results prove that this filtering step achieves minimax optimal convergence rates for the continuous component.
As shown in the comparison plots above, the "Usual KDE" (green line) fails by creating massive artificial spikes at discrete atom locations (marked by 'x'). In contrast, the proposed wrapper ("Our KDE", blue line) accurately recovers the "True Continuous Density" (dotted line). As the sample size $n$ increases from 100 to 10,000, the estimation of both the continuous density and the discrete masses (red dots) converges toward the truth.
Conclusion
By simply distinguishing between unique and repeated observations, this paper provides a robust framework for density and functional estimation in mixed-data scenarios. The wrapper approach is highly generalizable and can be applied to various non-parametric frameworks, such as $k$-nearest neighbor estimation, making existing statistical tools more resilient to real-world data complexities.
Summary updated