'Transform unconstrained parameters used by the optimizer to constrained
parameters used in likelihood evaluation
Parameters
unconstrained : array_like
Array of unconstrained parameters used by the optimizer, to be
transformed.
Returns
constrained : array_like
Array of constrained parameters which may be used in likelihood
evalation.'

def transform_params(self, unconstrained):

    constrained = super(MarkovAutoregression, self).transform_params(unconstrained)
    for i in range(self.k_regimes):
        s = self.parameters[(i, 'autoregressive')]
        constrained[s] = constrain_stationary_univariate(unconstrained[s])
    return constrained
