计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
clustering【效率与协作】Guides pomegranate KMeans clustering workflows, including centroid initialization, fit/predict APIs, sample weights, initialization choices, convergence controls, and KMeans troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for the pomegranate KMeans class as a standalone clusterer or as the initialization mechanism used by mixture and HMM workflows. It covers centroid initialization, fit, predict, fit_predict, sample weights, convergence controls, and common shape/initialization failures.
Typical import:
from pomegranate.kmeans import KMeans
Read references/api-reference.md for constructor parameters, initialization options, and usage examples. Run scripts/smoke_kmeans.py after installation for a tiny deterministic smoke check.
k or explicit centroids. Provide k to initialize from data or centroids to start from known centers.(n, d) floating point features.init='first-k' for deterministic debugging or init='random' with random_state for randomized starts.fit(X), predict(X), or fit_predict(X) depending on whether you need cluster assignments immediately.max_iter, tol, inertia, and verbose when diagnosing training behavior.GeneralMixtureModel: read ../mixtures-and-classifiers/SKILL.md after checking the initialization choice here.k must be at least 2 when centroids are not provided.apricot-select; use simpler initializers first when debugging.