'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(MarkovRegression, self).transform_params(unconstrained)
    constrained[self.parameters['exog']] = unconstrained[self.parameters['exog']]
    constrained[self.parameters['variance']] = (unconstrained[self.parameters['variance']] ** 2)
    return constrained
