ConvertXYVToMatrixActionsClusterValuesByKMeans Method |
Clusters values by the k-means algorithm.
Namespace: Altaxo.DataAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static (IReadOnlyList<AltaxoVariant> ClusterValues, IReadOnlyList<double> ClusterStdDev, IReadOnlyList<int>? ClusterIndices) ClusterValuesByKMeans(
DoubleColumn col,
int numberOfClusters,
SortDirection sortDirection,
bool createStdDev
)
Parameters
- col DoubleColumn
- The column containing the data to be clustered.
- numberOfClusters Int32
- The number of clusters to create.
- sortDirection SortDirection
- The sort direction of the cluster's centroids.
- createStdDev Boolean
- If set to true, the standard deviation of each cluster will be calculated.
Return Value
ValueTupleIReadOnlyListAltaxoVariant,
IReadOnlyListDouble,
IReadOnlyListInt32A tuple containing i) the cluster centroid values, ii) the cluster's standard deviation (if calculated; otherwise null), and
iii) for each row of the source data column the index of the cluster.
See Also