def test_calc_local_params(self):
    LP = dict(resp=self.trueresp)
    SS = self.hmodel.get_global_suff_stats(self.Data, LP)
    self.hmodel.update_global_params(SS)
    LP = self.hmodel.calc_local_params(self.Data)
    # respError : N x 1 vector, maximum error in responsibility across all dataitems
    respError = np.max(np.abs(self.trueresp - LP['resp']), axis=1)
    # verify that for most points, the error in resp computation is very low
    assert np.percentile(respError, 50) < 0.005
    assert np.percentile(respError, 90) < 0.05
:return: The same instance of this class every time
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/tests/paramestimation/Test-MixModel-ZMGauss-EM.py/TestMixZMEM_4Class2D.test_calc_local_params--crossover with--dataset/ETHPy150Open algorhythms/LintCode/Singleton.py/Solution_unsafe.getInstance