Add Python API for clustering (#1385)

This commit is contained in:
Fangjun Kuang
2024-09-30 11:33:15 +08:00
committed by GitHub
parent 70568c2df7
commit b965f14cf0
26 changed files with 326 additions and 15 deletions

View File

@@ -26,11 +26,13 @@ void FastClusteringConfig::Register(ParseOptions *po) {
p.Register("num-clusters", &num_clusters,
"Number of cluster. If greater than 0, then --cluster-thresold is "
"ignored");
"ignored. Please provide it if you know the actual number of "
"clusters in advance.");
p.Register("cluster-threshold", &threshold,
"If --num-clusters is not specified, then it specifies the "
"distance threshold for clustering.");
"distance threshold for clustering. smaller value -> more "
"clusters. larger value -> fewer clusters");
}
bool FastClusteringConfig::Validate() const {