Пример #1
0
 def test_cohn(self):
     cols = ['nuncen_above', 'nobs_below', 'ncen_equal', 'prob_exceedance']
     cohn = ros.cohn_numbers(self.df, self.rescol, self.cencol)
     pdtest.assert_frame_equal(
         cohn[cols],
         self.expected_cohn[cols],
         check_less_precise=True,
     )
Пример #2
0
 def test_cohn(self):
     cols = ['nuncen_above', 'nobs_below', 'ncen_equal', 'prob_exceedance']
     cohn = ros.cohn_numbers(self.df, self.rescol, self.cencol)
     # Use round in place of the deprecated check_less_precise arg
     assert_frame_equal(
         np.round(cohn[cols], 3),
         np.round(self.expected_cohn[cols], 3),
     )
Пример #3
0
 def test_cohn(self):
     cols = [
         'nuncen_above', 'nobs_below',
         'ncen_equal', 'prob_exceedance'
     ]
     cohn = ros.cohn_numbers(self.df, self.rescol, self.cencol)
     pdtest.assert_frame_equal(
         cohn[cols],
         self.expected_cohn[cols],
         check_less_precise=True,
     )
Пример #4
0
 def test_no_NDs(self):
     _df = self.df.copy()
     _df['qual'] = False
     result = ros.cohn_numbers(_df, observations='conc', censorship='qual')
     assert result.shape == (0, 6)
Пример #5
0
 def test_baseline(self):
     result = ros.cohn_numbers(self.df, observations='conc', censorship='censored')
     pdtest.assert_frame_equal(result, self.expected_baseline)
Пример #6
0
 def test_no_NDs(self):
     _df = self.df.copy()
     _df['qual'] = False
     result = ros.cohn_numbers(_df, observations='conc', censorship='qual')
     ntools.assert_tuple_equal(result.shape, (0, 6))
Пример #7
0
 def test_no_NDs(self):
     result = ros.cohn_numbers(self.df.assign(qual=False), result='conc', censorship='qual')
     ntools.assert_tuple_equal(result.shape, (0, 6))
Пример #8
0
 def test_no_NDs(self):
     _df = self.df.copy()
     _df['qual'] = False
     result = ros.cohn_numbers(_df, observations='conc', censorship='qual')
     ntools.assert_tuple_equal(result.shape, (0, 6))
Пример #9
0
 def test_no_NDs(self):
     result = ros.cohn_numbers(self.df.assign(qual=False),
                               result='conc',
                               censorship='qual')
     ntools.assert_tuple_equal(result.shape, (0, 6))