'In-sample prediction, conditional on the current regime
Parameters
params : array_like
Array of parameters at which to perform prediction.
Returns
predict : array_like
Array of predictions conditional on current, and possibly past,
regimes'

def predict_conditional(self, params):

    params = np.array(params, ndmin=1)
    predict = np.zeros((self.k_regimes, self.nobs), dtype=params.dtype)
    for i in range(self.k_regimes):
        if (self._k_exog > 0):
            coeffs = params[self.parameters[(i, 'exog')]]
            predict[i] = np.dot(self.exog, coeffs)
    return predict[:, None, :]
