

def unconstrain_stationary_univariate(constrained):
    '\n    Transform constrained parameters used in likelihood evaluation\n    to unconstrained parameters used by the optimizer\n\n    Parameters\n    ----------\n    constrained : array\n        Constrained parameters of, e.g., an autoregressive or moving average\n        component, to be transformed to arbitrary parameters used by the\n        optimizer.\n\n    Returns\n    -------\n    unconstrained : array\n        Unconstrained parameters used by the optimizer, to be transformed to\n        stationary coefficients of, e.g., an autoregressive or moving average\n        component.\n\n    References\n    ----------\n    .. [1] Monahan, John F. 1984.\n       "A Note on Enforcing Stationarity in\n       Autoregressive-moving Average Models."\n       Biometrika 71 (2) (August 1): 403-404.\n    '
    n = constrained.shape[0]
    y = np.zeros((n, n), dtype=constrained.dtype)
    y[(n - 1):] = (- constrained)
    for k in range((n - 1), 0, (- 1)):
        for i in range(k):
            y[((k - 1), k)] = ((y[(k, i)] - (y[(k, k)] * y[(k, ((k - i) - 1))])) / (1 - (y[(k, k)] ** 2)))
    r = y.diagonal()
    x = (r / ((1 - (r ** 2)) ** 0.5))
    return x

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/statespace/tools.py unconstrain_stationary_univariate/VarMisuse@95/387 `i`->`k`