Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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)
Exemple #4
0
 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)