def test_Age_Adjusted_Smoother(self): ar = sm.Age_Adjusted_Smoother(self.e1, self.b1, self.kw, self.s) exp = [ 0.10519625, 0.08494318, 0.06440072, 0.06898604, 0.06952076, 0.05020968 ] self.assertEquals(list(ar.r.round(8)), exp)
def test_Age_Adjusted_Smoother_tabular(self): dfb = self.dfb kr = sm.Age_Adjusted_Smoother(dfb.e, dfb.b, s=dfb.s, w=self.kw) self.assertIsInstance(kr.r, np.ndarray) np.testing.assert_allclose(kr.r, self.ageadj_exp) kr = sm.Age_Adjusted_Smoother.by_col(dfb, 'e', 'b', w=self.kw, s='s') answer = np.array([ 0.10519625, 0.08494318, 0.06440072, 0.06898604, 0.06952076, 0.05020968 ]) colname = 'e-b_age_adjusted_smoother' np.testing.assert_allclose(kr[colname].values, answer, rtol=RTOL, atol=ATOL)
def test_Age_Adjusted_Smoother(self): ar = sm.Age_Adjusted_Smoother(self.e1, self.b1, self.kw, self.s) np.testing.assert_allclose(ar.r, self.ageadj_exp)