Пример #1
0
 def test_softmax(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce(["foo", "bar"], normalize_weights="softmax", mode="dist")
     except ValueError:
         pass
     finally:
         mocker.assert_called_once()
Пример #2
0
 def test_row_normalize(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce(["foo", "bar"], mode="scale")
     except ValueError:
         pass
     finally:
         mocker.assert_called_once()
Пример #3
0
 def test_mutual_info(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce(["foo", "bar"], dist_measure="mutual_info", mode="dist")
     except ValueError:
         pass
     finally:
         mocker.assert_called_once()
Пример #4
0
 def test_equal(self, mocker, lineage: Lineage):
     try:
         _ = lineage.reduce(["foo", "bar"], dist_measure="equal", mode="dist")
     except ValueError:
         pass
     finally:
         # should be twice, but we have extra check inside and we're mocking that does nothing
         mocker.assert_called_once()