fynch

Crates.iofynch
lib.rsfynch
version0.1.0
created_at2026-01-18 16:32:00.783863+00
updated_at2026-01-18 16:32:00.783863+00
descriptionDifferentiable sorting and ranking: PAVA, Fenchel-Young losses, and O(n log n) FastSoftSort
homepagehttps://github.com/arclabs561/fynch
repositoryhttps://github.com/arclabs561/fynch
max_upload_size
id2052622
size139,470
Henry Wallace (arclabs561)

documentation

https://docs.rs/fynch

README

fynch

Differentiable sorting and ranking primitives for structured prediction and isotonic regression. Implements PAVA, Fenchel-Young losses, and entropy-regularized operators.

Dual-licensed under MIT or Apache-2.0.

crates.io | docs.rs

use fynch::{entmax, pava, soft_rank};

let theta = [2.0, 1.0, 0.1];
let p = entmax(&theta, 1.5);

let y = [3.0, 1.0, 2.0, 5.0, 4.0];
let isotonic = pava(&y);
let r = soft_rank(&y, 1.0);

println!("p={p:?}\nisotonic={isotonic:?}\nsoft_rank={r:?}");
Commit count: 10

cargo fmt