cutcutcodec.core.edit.factor.proba.inv_cumhist

cutcutcodec.core.edit.factor.proba.inv_cumhist(min_: Real, max_: Real, cumhist: Tensor) list[source]

Reverse the histogram of the estimation of the proba repartition function.

Parameters

min_numbers.Real

The minimum value of the reversed repartition function.

max_numbers.Real

The minimum value of the reversed repartition function.

cumhisttorch.Tensor

The strictely growing repartition function between 0 and 1. Only y values are represented like a 1d torch vector. The x axis is implicitely a linspace betwen 0 and 1.

Return

invreptorch.Tensor

An estimation of the inverse function (1d vector). The dimension is choose to be the same as the input histogram len.

Examples

>>> from cutcutcodec.core.edit.factor.proba import compute_cumhist, inv_cumhist
>>> min_, max_, cum = compute_cumhist("1 + x1 + x2")
>>> inv_cumhist(min_, max_, cum)
tensor([0.9985, 1.0814, 1.1181, 1.1462, 1.1699, 1.1908, 1.2096, 1.2270, 1.2432,
        1.2583, 1.2727, 1.2863, 1.2994, 1.3119, 1.3239, 1.3356, 1.3468, 1.3577,
        1.3683, 1.3785, 1.3885, 1.3983, 1.4079, 1.4172, 1.4263, 1.4352, 1.4440,
        1.4526, 1.4610, 1.4693, 1.4775, 1.4855, 1.4933, 1.5011, 1.5087, 1.5163,
        1.5237, 1.5310, 1.5382, 1.5453, 1.5524, 1.5593, 1.5662, 1.5730, 1.5797,
        1.5863, 1.5929, 1.5994, 1.6058, 1.6121, 1.6184, 1.6246, 1.6308, 1.6369,
        1.6429, 1.6489, 1.6549, 1.6608, 1.6666, 1.6724, 1.6781, 1.6838, 1.6894,
        1.6950, 1.7006, 1.7061, 1.7116, 1.7170, 1.7223, 1.7277, 1.7330, 1.7383,
        1.7435, 1.7487, 1.7538, 1.7590, 1.7641, 1.7691, 1.7741, 1.7791, 1.7841,
        1.7890, 1.7939, 1.7988, 1.8036, 1.8084, 1.8132, 1.8180, 1.8227, 1.8274,
        1.8321, 1.8367, 1.8414, 1.8459, 1.8505, 1.8551, 1.8596, 1.8641, 1.8686,
        1.8730, 1.8775, 1.8819, 1.8863, 1.8906, 1.8950, 1.8993, 1.9036, 1.9079,
        1.9122, 1.9164, 1.9206, 1.9248, 1.9290, 1.9332, 1.9374, 1.9415, 1.9456,
        1.9497, 1.9538, 1.9578, 1.9619, 1.9659, 1.9699, 1.9739, 1.9779, 1.9819,
        1.9860, 1.9905, 1.9947, 1.9986, 2.0025, 2.0065, 2.0105, 2.0145, 2.0185,
        2.0225, 2.0266, 2.0306, 2.0347, 2.0388, 2.0429, 2.0470, 2.0512, 2.0554,
        2.0596, 2.0638, 2.0680, 2.0722, 2.0765, 2.0808, 2.0851, 2.0894, 2.0938,
        2.0981, 2.1025, 2.1069, 2.1114, 2.1158, 2.1203, 2.1248, 2.1293, 2.1339,
        2.1384, 2.1430, 2.1477, 2.1523, 2.1570, 2.1617, 2.1664, 2.1712, 2.1760,
        2.1808, 2.1856, 2.1905, 2.1954, 2.2003, 2.2053, 2.2102, 2.2153, 2.2203,
        2.2254, 2.2306, 2.2357, 2.2409, 2.2461, 2.2514, 2.2567, 2.2620, 2.2674,
        2.2728, 2.2783, 2.2838, 2.2894, 2.2950, 2.3006, 2.3063, 2.3120, 2.3178,
        2.3236, 2.3295, 2.3354, 2.3414, 2.3475, 2.3536, 2.3598, 2.3660, 2.3723,
        2.3786, 2.3850, 2.3915, 2.3981, 2.4047, 2.4114, 2.4182, 2.4251, 2.4320,
        2.4390, 2.4462, 2.4534, 2.4607, 2.4681, 2.4757, 2.4833, 2.4911, 2.4989,
        2.5069, 2.5151, 2.5234, 2.5318, 2.5404, 2.5492, 2.5581, 2.5672, 2.5765,
        2.5861, 2.5959, 2.6059, 2.6161, 2.6267, 2.6376, 2.6488, 2.6605, 2.6725,
        2.6850, 2.6981, 2.7117, 2.7261, 2.7412, 2.7574, 2.7748, 2.7936, 2.8145,
        2.8382, 2.8663, 2.9030, 2.9909])
>>>