2017-06-20 120 views
0

在网站pyclustering笔者提到:pyclustering使用CCORE实施

There is ability to use python code implementation only or CCORE (C/C++) implementation using special flag.

但没有任何例子,如何使用特殊标志。 有没有人知道如何使用它?

回答

0

在符合github page of the library,参数“ccore_flag”应该是真实的是将要使用特定的算法实例:

# read input data 
input_data = read_sample(FCPS_SAMPLES.SAMPLE_LSUN); 

# use ccore_flag parameter to use ccore.so (or ccore.dll) in case of CURE algorithm. 
cure_instance = cure(input_data, 3, ccore_flag= True); 

# use ccore_flag for DBSCAN algorithm (the last argument). 
dbscan_instance = dbscan(input_data, 0.5, 3, True); 
+0

annoviko,你是作家,不是吗?我在mac上运行,ccore已启用,并且出现属性错误:在启用ccore的某些虚拟数据上运行xmeans时未找到dlsym(RTLD_DEFAULT,xmeans_algorithm):symbol。你想让我在这里发布一个问题,还是有一个pyclustering论坛使用? – bordeo

+0

我很抱歉,但pyclustering的核心不支持MAC OS,只有Windows和Unix(Linux)。如果MAC OS核心应该被禁用。否则,您可以尝试手动构建核心。有描述如何在Linux上执行该操作:https://github.com/annoviko/pyclustering/wiki/Installing。无论如何,你可以在图书馆的gihub页面(https://github.com/annoviko/pyclustering/issues)上打开问题,我会尽力帮你逐步建立MAC。 – annoviko

+0

谢谢你 - 我想我已经在集群上工作了。遵循您的维基百科建立ccore的指示 – bordeo