Skip to main content

Module stats

Module stats 

Source
Expand description

Pure statistical computation — no plotters dependency.

Everything a chart type needs to know what to draw (quartiles, KDE curves, ROC/PR points, AUC) is computed here and unit-tested against hand-computed reference values, independently of any rendering. The series layer consumes these outputs and turns them into draw calls.

Re-exports§

pub use calibration::calibration_curve;
pub use calibration::CalibrationBin;
pub use correlation::correlation_matrix;
pub use correlation::pearson;
pub use correlation::rank;
pub use correlation::spearman;
pub use correlation::CorrelationMethod;
pub use ecdf::dkw_epsilon;
pub use ecdf::ecdf;
pub use ecdf::Ecdf as EcdfData;
pub use gain::gain_curve;
pub use gain::GainPoint;
pub use histogram::histogram;
pub use histogram::BinRule;
pub use histogram::Histogram;
pub use kde::kde_curve;
pub use kde::silverman_bandwidth;
pub use kde::KdeCurve;
pub use normal::norm_ppf;
pub use precision_recall::precision_recall_curve;
pub use precision_recall::PrCurve;
pub use precision_recall::PrPoint;
pub use quartiles::quartiles;
pub use quartiles::Quartiles;
pub use roc::roc_curve;
pub use roc::RocCurveData;
pub use roc::RocPoint;

Modules§

calibration
Calibration (reliability) binning for probabilistic classifiers.
correlation
Pearson and Spearman correlation, and correlation matrices.
ecdf
Empirical cumulative distribution function (ECDF) and its DKW confidence band.
gain
Cumulative gain and lift curves for ranking/classification evaluation.
histogram
Histogram binning with several standard bin-count rules.
kde
Gaussian kernel density estimation, used to shape violin plots.
normal
Standard-normal inverse CDF (quantile function), for theoretical quantiles on Q–Q plots.
precision_recall
Precision–recall curve: threshold sweep producing (recall, precision) points and average precision (AP).
quartiles
Quartiles, IQR, and Tukey whisker/outlier bounds for box plots.
roc
ROC curve: threshold sweep producing (FPR, TPR) points, and AUC via trapezoidal integration.

Enums§

StatsError
Errors returned by the statistics routines for inputs where a metric is undefined, rather than letting NaN propagate silently into a chart.