MiniBatchKMeansOptions<T>
Options & Configuration · AiDotNet.Clustering.Options
Configuration options specific to MiniBatch K-Means clustering.
Inheritance: ModelOptions → ClusteringOptions<T> → MiniBatchKMeansOptions<T>
For Beginners
MiniBatch K-Means is like regular K-Means but faster.
Instead of using all data points in every step, it uses a random sample (mini-batch). This makes it:
- Much faster for large datasets (millions of points)
- Uses less memory
- Produces slightly less optimal clusters (but usually very close)
Use MiniBatch K-Means when:
- Your dataset has more than ~10,000 points
- Speed is more important than perfect clustering
- You’re doing online/streaming clustering
How It Works
MiniBatch K-Means is a variant of KMeans that uses mini-batches (random samples) to reduce computation time for large datasets while producing similar results.
Constructors
| Constructor | Summary |
|---|---|
MiniBatchKMeansOptions() |
Properties
| Property | Summary |
|---|---|
KMeansInitMethod InitMethod { get; set; } |
Gets or sets the initialization method for cluster centers. |
Matrix<T> InitialCenters { get; set; } |
Gets or sets custom initial cluster centers. |
bool ReassignEmptyClusters { get; set; } |
Gets or sets whether to reassign empty clusters. |
double ReassignmentRatio { get; set; } |
Gets or sets the fraction of centers that must be reassigned in each iteration. |
int BatchSize { get; set; } |
Gets or sets the size of the mini-batches. |
int MaxNoImprovement { get; set; } |
Gets or sets the number of iterations with no improvement to wait before stopping. |
int NumClusters { get; set; } |
Gets or sets the number of clusters to find. |
int? InitSize { get; set; } |
Gets or sets the number of random samples used to initialize centers. |