2017-06-20 118 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