| Crates.io | fynch |
| lib.rs | fynch |
| version | 0.1.0 |
| created_at | 2026-01-18 16:32:00.783863+00 |
| updated_at | 2026-01-18 16:32:00.783863+00 |
| description | Differentiable sorting and ranking: PAVA, Fenchel-Young losses, and O(n log n) FastSoftSort |
| homepage | https://github.com/arclabs561/fynch |
| repository | https://github.com/arclabs561/fynch |
| max_upload_size | |
| id | 2052622 |
| size | 139,470 |
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.
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:?}");