MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / rect_classify

Function rect_classify

ST_DM/GenRegion/src/generate/gen/algorithm.py:44–60  ·  view source on GitHub ↗

Desc: 将点分类到相应的cluster中, 使得cluster的边界满足width阈值 Args: points : 需要分类的Point集合 clusters : list of cluster, cluster 可能会被修改, 增加一些新的point width : 类的宽度阈值 Return: [p3, p4, p5, ...], 无法分到cluster的所有点 Raises: None

(points, clusters, width=40)

Source from the content-addressed store, hash-verified

42
43
44def rect_classify(points, clusters, width=40):
45 """
46 Desc: 将点分类到相应的cluster中, 使得cluster的边界满足width阈值
47
48 Args:
49 points : 需要分类的Point集合
50
51 clusters : list of cluster, cluster 可能会被修改, 增加一些新的point
52
53 width : 类的宽度阈值
54 Return:
55 [p3, p4, p5, ...], 无法分到cluster的所有点
56 Raises:
57 None
58 """
59 alg = cluster.Classifier(clusters, width)
60 return alg.run(points)
61
62
63def region_filter(regions, grid_size=1024, thread_num=4):

Callers 1

__cluster_pointsFunction · 0.85

Calls 1

runMethod · 0.95

Tested by

no test coverage detected