torchcell.losses.multi_dim_nan_tolerant.isotonic_l2_pav
- isotonic_l2_pav(y: Tensor, weights: Tensor | None = None) Tensor[source]
Solve isotonic regression using the PAV (Pool Adjacent Violators) algorithm.
Finds argmin_{v_1 >= v_2 >= … >= v_n} 0.5 * ||v - y||^2_2
- Parameters:
y – Input values (1D tensor)
weights – Optional weights (1D tensor)
- Returns:
Solution to isotonic regression