def convexhull_example(self, length, scales):
points = np.random.uniform(0, 1, [length, self.input_size])
target = -1 * np.ones([length])
ch = ConvexHull(points).vertices
argmin = np.argsort(ch)[0]
ch = list(ch[argmin:]) + list(ch[:argmin])
target[:len(ch)] = np.array(ch)
target += 1
return points, target
评论列表
文章目录