Optimal Density Estimation via Shimazaki-Shinomoto Method

Implements the Shimazaki-Shinomoto method for optimizing the bin width of histograms and the bandwidth of kernel density estimators. The framework minimizes the expected Mean Integrated Squared Error (MISE) and supports both 1D and 2D distributions, fixed and locally adaptive estimators, bootstrap confidence intervals, and 'OpenMP'-accelerated 'C++' 'backends'. Ideally suited for time-dependent rate estimation and identifying intrinsic data structures. For more details see Shimazaki and Shinomoto (2007) and Shimazaki and Shinomoto (2010) .


CRAN status CRAN downloads CRAN downloads CRAN downloads CRAN downloads Ask DeepWiki

sshist: Optimal Density Estimation via Shimazaki-Shinomoto Method

The sshist package implements state-of-the-art algorithms for optimal non-parametric density estimation based on the framework developed by Hideaki Shimazaki and Shigeru Shinomoto (2007, 2010). The core optimization principle is to find the parameters that minimize the expected Mean Integrated Squared Error (MISE) between the estimated density and the true, unknown underlying distribution.

By utilizing purely data-driven optimization, this package avoids subjective choices for bin widths or kernel bandwidths, making it highly robust—especially for data with complex, multimodal, or heavy-tailed structures.

Key Features

  • Data-Driven Optimization: Replaces subjective "rules of thumb" (like Sturges' or Freedman-Diaconis' rules) with objective minimizers of the MISE cost function.
  • Multi-Dimensional Support: Provides full capability for both 1D univariate and 2D bivariate distributions.
  • Fixed and Variable Estimators: Offers both classical global estimators and advanced locally adaptive variable bandwidth selectors (based on Abramson's scaling method).
  • High Performance: Designed to evaluate cost functions efficiently, leveraging analytical formulations and fast backend calculations.

Summary of Available Functions

Function Estimator Type Dimension Bandwidth / Bin Selection
sshist Histogram 1D Fixed (single optimal bin width)
sshist_2d Histogram 2D Fixed independent bin width per axis
sskernel Kernel Density 1D Fixed global bandwidth
ssvkernel Kernel Density 1D Locally adaptive variable bandwidth
sskernel2d Kernel Density 2D Fixed global isotropic bandwidth
ssvkernel2d Kernel Density 2D Locally adaptive bivariate bandwidth

Installation

You can install the stable version of sshist from CRAN:

install.packages("sshist")

Alternatively, you can install the development version directly from GitHub using devtools:

# install.packages("devtools")
devtools::install_github("celebithil/sshist")

References

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sshist")

0.2.4 by Daniil Popov, 3 months ago


https://github.com/celebithil/sshist, https://www.neuralengine.org/res/histogram.html


Report a bug at https://github.com/celebithil/sshist/issues


Browse source code at https://github.com/cran/sshist


Authors: Daniil Popov [aut, cre]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports graphics, grDevices, Rcpp, stats

Suggests boot, ggplot2, knitr, patchwork, rmarkdown, testthat

Linking to Rcpp


See at CRAN