'Compute likelihoods conditional on the current period\'s regime'

def _conditional_likelihoods(self, params):

    resid = self._resid(params)
    variance = params[self.parameters['variance']].squeeze()
    if self.switching_variance:
        variance = np.reshape(variance, (self.k_regimes, 1, 1))
    conditional_likelihoods = (np.exp((((-0.5) * (resid ** 2)) / variance)) / np.sqrt(((2 * np.pi) * variance)))
    return conditional_likelihoods
