critband: A Python Package for Critical Bandwidth Analysis of Multimodal Distributions
Ruiyu Zhang, Qihao Wang

TL;DR
critband is a Python package that efficiently detects bimodality in multimodal distributions using Silverman's kernel density approach, filling a gap in the Python ecosystem.
Contribution
It introduces a comprehensive Python tool for critical bandwidth bimodality detection with advanced features and improved performance over existing R tools.
Findings
Stable bimodality detection for well-separated cases
Expected instability in boundary cases
3-10 times faster than R's modetest()
Abstract
Multimodal density estimation is a fundamental problem in scientific computing. Determining the number of modes in a distribution is a core numerical challenge with applications across ecology, economics, genomics, and astronomy. While the R ecosystem provides mature tools through the multimode package, the Python ecosystem has lacked an equivalent cohesive implementation. We present critband, a Python package for critical bandwidth bimodality detection based on Silverman's kernel density approach. The package implements critical bandwidth search with a robust bracketed mode-count solver and FFT-accelerated KDE, and provides additional features including k-mode detection, component decomposition, bimodality strength quantification, and excess mass estimation. Validation against twelve benchmark cases spanning separation regimes, unequal variances, unequal weights, and small sample sizes…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
