小编Dan*_*Dan的帖子

如何保存 scikit-learn k-means 聚类模型?

目前 K-means CLustring 代码在方法中是这样写的:

def predict(image_path):
image = cv2.imread(image_path)
image = image.reshape((image.shape[0] * image.shape[1], 3))
clt = KMeans(n_clusters = 3,  random_state=2, n_jobs=1)
clt.fit(image)
Run Code Online (Sandbox Code Playgroud)

如何将其保存到模型中,以便将其转换为 Core-ML 并在我的应用程序中使用它?

python cluster-analysis machine-learning scikit-learn coreml

2
推荐指数
1
解决办法
5305
查看次数