viser-metrics 0.8.0

Metric-vs-metric correlation and divergence analysis for viser
Documentation

Metric-vs-metric correlation and divergence analysis for the viser video-encoding-optimizer workspace.

Where [viser_quality] computes each metric, this crate compares the metrics against each other: how strongly PSNR, SSIM, VMAF, SSIMULACRA2 and butteraugli agree on the same content — via Pearson, Spearman (SROCC) and Kendall tau-b (KROCC) — and which samples they most disagree about (divergence detection).

A "sample" is whatever the aligned series share: per-frame scores within one clip, or one aggregate score per encode across a ladder. The core functions are metric-agnostic and operate on &[f64]; [series_from_frames] is a convenience bridge from [viser_quality::FrameResult].

use viser_metrics::{MetricSeries, correlation_matrix};
let series = vec![
    MetricSeries::new("vmaf", vec![80.0, 85.0, 90.0], true),
    MetricSeries::new("psnr", vec![37.0, 38.0, 40.0], true),
];
let m = correlation_matrix(&series);
assert!((m.spearman[0][1] - 1.0).abs() < 1e-9); // perfectly monotonic