<!--
{
  "documentType" : "article",
  "framework" : "LatentSemanticMapping",
  "identifier" : "/documentation/LatentSemanticMapping/clustering-flags",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Clustering Flags"
}
-->

# Clustering Flags

Options for creating clusters.

## Discussion

Specify these options for [`LSMMapCreateClusters(_:_:_:_:_:)`](/documentation/LatentSemanticMapping/LSMMapCreateClusters(_:_:_:_:_:)).

## Topics

### Constants

[`var kLSMClusterCategories: Int`](/documentation/LatentSemanticMapping/kLSMClusterCategories)

An option that specifies to cluster categories.

[`var kLSMClusterWords: Int`](/documentation/LatentSemanticMapping/kLSMClusterWords)

An option that specifies to cluster words.

[`var kLSMClusterTokens: Int`](/documentation/LatentSemanticMapping/kLSMClusterTokens)

An option that specifies to cluster binary tokens.

[`var kLSMClusterKMeans: Int`](/documentation/LatentSemanticMapping/kLSMClusterKMeans)

An option that specifies to cluster using a k-means algorithm.

[`var kLSMClusterAgglomerative: Int`](/documentation/LatentSemanticMapping/kLSMClusterAgglomerative)

An option that specifies to cluster using an agglomerative algorithm.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)