Skip to main content

Crate fenwick_mmd

Crate fenwick_mmd 

Source
Expand description

§fenwick-mmd

Formally verified, sub-quadratic minimax-optimal kernel two-sample testing (MMD) via compressed multidimensional Fenwick trees and orthantwise separable kernels.

Based on Choi, Pandey, & Sarkar (2026), “Minimax-Optimal Kernel Two-sample Testing in Sub-quadratic Time” (arXiv:2612.05470).

Re-exports§

pub use fenwick::CompressedFenwick;
pub use fenwick::MultiChannelFenwick;
pub use kernels::Kernel1D;
pub use kernels::ProductKernel;
pub use kernels::PsTerm1D;
pub use mmd::aggregated_mmd_test;
pub use mmd::fast_lower_triangular_sum;
pub use mmd::median_bandwidths;
pub use mmd::mmd_squared_exact_quadratic;
pub use mmd::mmd_squared_fast;
pub use mmd::pca_mmd_test;
pub use mmd::permutation_test;
pub use mmd::AggregatedTestResult;
pub use mmd::MmdError;
pub use mmd::PermutationTestResult;
pub use mmd::Rng;

Modules§

fenwick
Compressed multidimensional Fenwick tree (Binary Indexed Tree)
kernels
Characteristic 1D and product kernels with Piecewise Separable (PS) and Almost Piecewise Separable (APS) decompositions.
mmd
Sub-quadratic MMD computation, finite-sample permutation testing, multi-bandwidth aggregation, and sample-splitting PCA-MMD.