예제 #1
0
 def __init__(self, threshold=1.0, force=False, distance='cosine',
              mode='loose', constraint=None, logger=None):
     model = EmbeddingModel(distance=distance, mode=mode)
     stopping_criterion = DistanceThreshold(threshold=threshold,
                                            force=force)
     super(EmbeddingClustering, self).__init__(
         model,
         stopping_criterion=stopping_criterion,
         constraint=constraint,
         logger=logger)
예제 #2
0
 def __init__(self, threshold=1.0, force=False, logger=None):
     model = _Model()
     stopping_criterion = DistanceThreshold(threshold=threshold,
                                            force=force)
     constraint = DoNotCooccur()
     super(FaceClustering,
           self).__init__(model,
                          stopping_criterion=stopping_criterion,
                          constraint=constraint,
                          logger=logger)