Beispiel #1
0
    def test_remove_columns(self):
        X = np.random.rand(6, 5)
        X[:, (1, 3)] = 5
        X[3, 1] = np.nan
        X[1, 1] = np.nan
        X[:, 4] = np.nan
        data = Table(X)
        d = RemoveConstant()(data)
        self.assertEqual(len(d.domain.attributes), 2)

        pp_rc = RemoveConstant()
        d = pp_rc(data)
        self.assertEqual(len(d.domain.attributes), 2)
Beispiel #2
0
 def test_nothing_to_remove(self):
     data = Table("iris")
     d = RemoveConstant()(data)
     self.assertEqual(len(d.domain.attributes), 4)