示例#1
0
 def test_distance_threshold(self):
     with self.assertRaisesRegex(
             TypeError, "type 'function' is not JSON serializable"):
         _ = (FeatureAgglomeration(distance_threshold=0.5,
                                   n_clusters=None,
                                   compute_full_tree=True) >>
              LogisticRegression())
示例#2
0
 def test_with_defaults(self):
     trainable = FeatureAgglomeration() >> LogisticRegression()
     trained = trainable.fit(self.train_X, self.train_y)
     _ = trained.predict(self.test_X)