def test_below_theta_truncate_mode_using_percentile(self): """ :return: """ data = viz.TruncateData(self.data, mode='percent', theta=50) expected = [4, 6] actual = list(data['test_model'].shape)
def test_below_theta_truncate_mode_using_ranks(self): """ :return: """ data = viz.TruncateData(self.data, mode='ranks', theta=1) expected = [1, 6] actual = list(data['test_model'].shape) self.assertListEqual(expected, actual)
def test_below_theta_truncate_mode_using_below(self): """ :return: """ ##get best rank returns a series, not a dataframe data = viz.TruncateData(self.data, mode='below_theta', theta=100) expected = [4, 6] actual = list(data['test_model'].shape)
def test_below_theta_truncate_mode_using_ranks(self): """ :return: """ ##get best rank returns a series, not a dataframe data = viz.TruncateData(self.data, mode='ranks', theta=1) expected = 6 actual = data['test_model'].shape[0] self.assertEqual(expected, actual)