由于以前不知道聚类的数量,所以我想使用聚类分层聚类来根据距离来聚类一些(x,y)坐标。是否有支持此任务的库?我正在c++中使用Opencv库。
发布于 2015-02-24 08:54:52
opencv.html#kmeans-opencv
这是OpenCV for Python中K-Means集群的链接。一旦您理解了逻辑,就应该不难将其转换为c++代码
发布于 2015-02-24 10:00:53
在手势识别工具包 (GRT)中有一个简单的层次聚类模块。根据需要,这是一种“自下而上”的方法,每个观察都从自己的集群开始,当一个集群在层次结构上移动时,会合并成对集群。
你可以通过以下方法来训练这个方法:
UnlabelledData:您真正需要了解的关于UnlabelledData类的唯一事情是,在尝试将示例添加到培训数据集中之前,必须设置数据集的输入维数。ClassificationData- You must set the number of input dimensions of your dataset before you try and add samples to the training dataset,
- You can not use the class label of `0` when you add a new sample to your dataset. This is because the class label of `0` is reserved for the special null gesture class.
MatrixDouble:MatrixDouble是按N维度数据存储M的默认数据类型,其中M是行数,N是列数。此外,您还可以将模型保存或加载到文件中,并通过getClusters()获取集群。
https://stackoverflow.com/questions/28689219
复制相似问题