fynch 0.3.0

Differentiable sorting and ranking: PAVA, Fenchel-Young losses, and O(n log n) FastSoftSort
Documentation
{
 "source": "google-research/fast-soft-sort numpy_ops (Blondel et al. 2020, arXiv:2002.08871)",
 "cases": [
  {
   "input": [
    3.0,
    1.0,
    2.0
   ],
   "regularization_strength": 0.1,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    3.0,
    1.0,
    2.0
   ],
   "soft_sort": [
    1.0,
    2.0,
    3.0
   ]
  },
  {
   "input": [
    3.0,
    1.0,
    2.0
   ],
   "regularization_strength": 1.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    3.0,
    1.0,
    2.0
   ],
   "soft_sort": [
    1.0,
    2.0,
    3.0
   ]
  },
  {
   "input": [
    3.0,
    1.0,
    2.0
   ],
   "regularization_strength": 10.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    2.1,
    1.9000000000000001,
    2.0
   ],
   "soft_sort": [
    1.8999999999999997,
    1.9999999999999998,
    2.0999999999999996
   ]
  },
  {
   "input": [
    1.0,
    2.0,
    3.0,
    4.0
   ],
   "regularization_strength": 0.1,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    1.0,
    2.0,
    3.0,
    4.0
   ],
   "soft_sort": [
    1.0,
    2.0,
    3.0,
    4.0
   ]
  },
  {
   "input": [
    1.0,
    2.0,
    3.0,
    4.0
   ],
   "regularization_strength": 1.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    1.0,
    2.0,
    3.0,
    4.0
   ],
   "soft_sort": [
    1.0,
    2.0,
    3.0,
    4.0
   ]
  },
  {
   "input": [
    1.0,
    2.0,
    3.0,
    4.0
   ],
   "regularization_strength": 10.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    2.3500000000000005,
    2.4500000000000006,
    2.5500000000000007,
    2.6500000000000004
   ],
   "soft_sort": [
    2.35,
    2.45,
    2.55,
    2.65
   ]
  },
  {
   "input": [
    5.0,
    -2.0,
    0.0,
    3.5,
    -2.0
   ],
   "regularization_strength": 0.1,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    5.0,
    1.5,
    3.0,
    4.0,
    1.5
   ],
   "soft_sort": [
    -2.0,
    -2.0,
    -0.0,
    3.5,
    5.0
   ]
  },
  {
   "input": [
    5.0,
    -2.0,
    0.0,
    3.5,
    -2.0
   ],
   "regularization_strength": 1.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    5.0,
    1.5,
    3.0,
    4.0,
    1.5
   ],
   "soft_sort": [
    -1.1,
    -0.10000000000000009,
    0.8999999999999999,
    1.9,
    2.9
   ]
  },
  {
   "input": [
    5.0,
    -2.0,
    0.0,
    3.5,
    -2.0
   ],
   "regularization_strength": 10.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    3.41,
    2.71,
    2.91,
    3.2600000000000002,
    2.71
   ],
   "soft_sort": [
    0.7,
    0.7999999999999999,
    0.8999999999999999,
    1.0,
    1.0999999999999999
   ]
  },
  {
   "input": [
    0.1,
    0.2,
    0.15,
    0.4,
    0.35,
    0.05,
    0.25
   ],
   "regularization_strength": 0.1,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    2.857142857142857,
    3.857142857142857,
    3.357142857142857,
    5.857142857142858,
    5.357142857142858,
    2.357142857142857,
    4.357142857142858
   ],
   "soft_sort": [
    0.04999999999999716,
    0.10000000000000142,
    0.14999999999999858,
    0.20000000000000284,
    0.25,
    0.3500000000000014,
    0.40000000000000036
   ]
  },
  {
   "input": [
    0.1,
    0.2,
    0.15,
    0.4,
    0.35,
    0.05,
    0.25
   ],
   "regularization_strength": 1.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    3.8857142857142857,
    3.9857142857142858,
    3.9357142857142855,
    4.185714285714286,
    4.135714285714285,
    3.8357142857142854,
    4.035714285714286
   ],
   "soft_sort": [
    0.04999999999999982,
    0.09999999999999964,
    0.15000000000000036,
    0.20000000000000018,
    0.25,
    0.3500000000000001,
    0.3999999999999999
   ]
  },
  {
   "input": [
    0.1,
    0.2,
    0.15,
    0.4,
    0.35,
    0.05,
    0.25
   ],
   "regularization_strength": 10.0,
   "regularization": "l2",
   "direction": "ASCENDING",
   "soft_rank": [
    3.988571428571428,
    3.998571428571428,
    3.9935714285714283,
    4.018571428571428,
    4.013571428571428,
    3.983571428571428,
    4.003571428571428
   ],
   "soft_sort": [
    0.050000000000000044,
    0.09999999999999998,
    0.15000000000000002,
    0.20000000000000007,
    0.25000000000000006,
    0.35000000000000003,
    0.4
   ]
  }
 ]
}