コード例 #1
0
ファイル: test.py プロジェクト: ChihChengLiang/metric_learn
  def test_iris(self):
    num_constraints = 200

    C = LSML.prepare_constraints(self.iris_labels, num_constraints)
    lsml = LSML(self.iris_points, C)
    lsml.fit(verbose=False)

    csep = class_separation(lsml.transform(), self.iris_labels)
    self.assertLess(csep, 0.8)  # it's pretty terrible