def get_distance_dict(self): ret = {} for l1 in self.labels: for l2 in self.labels: ret[(l1, l2)] = distance(self._models[l1]._means, self._models[l2]._means) return ret
def get_distance_dict(self): ret = {} for l1 in self.labels: for l2 in self.labels: ret[(l1,l2)] = distance(self._models[l1]._means, self._models[l2]._means) return ret
def _get_distances(self): models = self._models.values() ret = [] for (i, m0) in enumerate(models): for m1 in models[i + 1:]: ret.append(distance(x._means, y._means)) return ret
def _get_distances(self): models = self._models.values() ret = [] for (i,m0) in enumerate(models): for m1 in models[i+1:]: ret.append(distance(x._means,y._means)) return ret