

def _unconstrain_sv_less_than_one(constrained, order=None, k_endog=None):
    '\n    Transform matrices with singular values less than one to arbitrary\n    matrices.\n\n    Parameters\n    ----------\n    constrained : list\n        The partial autocorrelation matrices. Should be a list of length\n        `order`, where each element is an array sized `k_endog` x `k_endog`.\n    order : integer, optional\n        The order of the autoregression.\n    k_endog : integer, optional\n        The dimension of the data vector.\n\n    Returns\n    -------\n    unconstrained : list\n        Unconstrained matrices. A list of length `order`, where each element is\n        an array sized `k_endog` x `k_endog`.\n\n    Notes\n    -----\n    Corresponds to the inverse of Lemma 2.2 in Ansley and Kohn (1986). See\n    `unconstrain_stationary_multivariate` for more details.\n\n    '
    from scipy import linalg
    unconstrained = []
    if (order is None):
        order = len(constrained)
    if (k_endog is None):
        k_endog = constrained[0].shape[0]
    eye = np.eye(k_endog)
    for i in range(order):
        P = constrained[i]
        (B_inv, lower) = linalg.cho_factor((eye - np.dot(P, P.T)), lower=True)
        unconstrained.append(linalg.solve_triangular(B_inv, P, lower=lower))
    return unconstrained

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/statespace/tools.py _unconstrain_sv_less_than_one/original