Histogram Meets Topic Model: Density Estimation by Mixture of Histograms

Kim Hideaki, Hiroshi SawadaarXiv 2015 · DOI

Abstract

The histogram method is a powerful non-parametric approach for estimating the probability density function of a continuous variable. But the construction of a histogram, compared to the parametric approaches, demands a large number of observations to capture the underlying density function. Thus it is not suitable for analyzing a sparse data set, a collection of units with a small size of data. In this paper, by employing the probabilistic topic model, we develop a novel Bayesian approach to alleviating the sparsity problem in the conventional histogram estimation. Our method estimates a unit's density function as a mixture of basis histograms, in which the number of bins for each basis, as well as their heights, is determined automatically. The estimation procedure is performed by using the fast and easy-to-implement collapsed Gibbs sampling. We apply the proposed method to synthetic data, showing that it performs well.

Introduction

Estimating the probability density function (PDF) of a continuous variable is a cornerstone of statistical analysis. While parametric models like Gaussian distributions are common, they often fail to capture complex, multi-modal, or non-standard shapes. The histogram offers a flexible, non-parametric alternative. However, histograms are notoriously "data-hungry." For sparse datasets—where individual units (e.g., users, sensors) have very few observations—traditional histogram methods fail because there isn't enough data to reliably determine bin heights.

Methodology: The HistLDA Framework

The authors propose HistLDA (Histogram Latent Dirichlet Allocation), a Bayesian framework that adapts the principles of topic modeling to continuous density estimation. The key innovation is treating a unit's density function as a mixture of shared "basis histograms."

Figure 1: (A) Decomposition of a histogram into multinomial and uniform components. (B) Probabilistic graphical model of HistLDA.

1. Basis Histograms as Topics

In standard LDA, documents are mixtures of topics (distributions over words). In HistLDA, a unit's PDF is a mixture of basis histograms. These bases are shared across the entire dataset, allowing sparse units to "borrow strength" from better-represented units to learn the underlying shapes.

2. Generative Process and Automatic Binning

To generate a data point $t_j$ for a unit, the model first selects a basis histogram $k$ according to unit-specific mixture weights $\theta$. It then draws a value from that specific histogram. Crucially, HistLDA treats the number of bins $W_k$ for each basis as a random variable, allowing the model to automatically optimize the resolution (bin width) based on the data.

3. Inference via Collapsed Gibbs Sampling

The model uses Collapsed Gibbs Sampling for inference. This MCMC approach is efficient because it marginalizes out the bin heights and mixture weights, focusing only on the latent assignments of data points to bases and the optimal number of bins.

Experimental Evaluation

The model was tested on synthetic datasets consisting of 100 units, where each unit's true PDF was a mixture of Normal, Exponential, and Uniform distributions. The authors varied the number of observations per unit ($m$) from 50 to 300 to test performance under different levels of sparsity.

Key Results

  • Superior Accuracy: HistLDA consistently achieved lower Integrated Squared Error (ISE) than baselines, including Knuth’s Bayesian binning, the Birgé-Rozenholc method, and Gaussian Mixture Models (GMM).
  • Robustness to Sparsity: The performance advantage was most pronounced at $m=50$. While traditional methods struggled with the lack of data, HistLDA leveraged shared patterns to produce accurate estimates.
  • Non-Parametric Flexibility: Unlike GMMs, which tend to over-smooth sharp edges (like those in Uniform or Exponential distributions), HistLDA maintained the flexibility to fit these shapes accurately.

Conclusion

HistLDA successfully bridges the gap between the flexibility of non-parametric histograms and the robustness of hierarchical Bayesian models. By sharing basis histograms across units, it enables high-quality density estimation even for extremely sparse data. Future work may explore methods for automatically determining the number of bases ($K$) and applying the model to high-dimensional real-world datasets.

Summary updated

BibTeX
@misc{hideaki2015histogram,
  author = {Kim Hideaki and Hiroshi Sawada},
  title = {{Histogram Meets Topic Model: Density Estimation by Mixture of Histograms}},
  year = {2015},
  eprint = {1512.07960},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1512.07960},
}
Figure