formating
This commit is contained in:
@@ -42,14 +42,12 @@ class MultiLineFitter:
|
|||||||
keepClustering = True
|
keepClustering = True
|
||||||
maxSimilarity = similarity
|
maxSimilarity = similarity
|
||||||
bestClusterIndexCombination = (clusterIndexA, clusterIndexB)
|
bestClusterIndexCombination = (clusterIndexA, clusterIndexB)
|
||||||
|
|
||||||
if keepClustering:
|
if keepClustering:
|
||||||
(clusterIndexA, clusterIndexB) = bestClusterIndexCombination
|
(clusterIndexA, clusterIndexB) = bestClusterIndexCombination
|
||||||
clusters[clusterIndexA] += clusters[clusterIndexB]
|
clusters[clusterIndexA] += clusters[clusterIndexB]
|
||||||
clusters.pop(clusterIndexB)
|
clusters.pop(clusterIndexB)
|
||||||
preferenceMatrix[clusterIndexA] = np.logical_and(preferenceMatrix[clusterIndexA], preferenceMatrix[clusterIndexB])
|
preferenceMatrix[clusterIndexA] = np.logical_and(preferenceMatrix[clusterIndexA], preferenceMatrix[clusterIndexB])
|
||||||
preferenceMatrix = np.delete(preferenceMatrix, clusterIndexB, axis = 0)
|
preferenceMatrix = np.delete(preferenceMatrix, clusterIndexB, axis = 0)
|
||||||
|
|
||||||
return clusters, preferenceMatrix
|
return clusters, preferenceMatrix
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user