KMeansClusterAnalysis Constructor

Definition

Namespace: Numerics.NET.Statistics.Multivariate
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

KMeansClusterAnalysis(IDataFrame, Int32)

Constructs a new KMeansClusterAnalysis.
C#
public KMeansClusterAnalysis(
	IDataFrame dataFrame,
	int numberOfClusters
)

Parameters

dataFrame  IDataFrame
A data frame containing the data for the analysis.
numberOfClusters  Int32
The number of clusters.

Exceptions

ArgumentNullException

dataFrame is null.

KMeansClusterAnalysis(IEnumerable<Vector<Double>>, Int32)

Constructs a new KMeansClusterAnalysis.
C#
public KMeansClusterAnalysis(
	IEnumerable<Vector<double>> variables,
	int numberOfClusters
)

Parameters

variables  IEnumerable<Vector<Double>>
An array of Vector<T> objects that contain the variables.
numberOfClusters  Int32
The number of clusters.

Exceptions

ArgumentNullException

variables is null.

KMeansClusterAnalysis(Matrix<Double>, Int32)

Constructs a new KMeansClusterAnalysis.
C#
public KMeansClusterAnalysis(
	Matrix<double> data,
	int numberOfClusters
)

Parameters

data  Matrix<Double>
A real Matrix<T> whose rows contain the observations for the analysis.
numberOfClusters  Int32
The number of clusters.

Exceptions

KMeansClusterAnalysis(IDataFrame, String, Int32)

Constructs a new KMeansClusterAnalysis.
C#
public KMeansClusterAnalysis(
	IDataFrame dataFrame,
	string formula,
	int numberOfClusters
)

Parameters

dataFrame  IDataFrame
A data frame containing the data for the analysis.
formula  String
A formula that specifies the features in the model.
numberOfClusters  Int32
The number of clusters.

Exceptions

ArgumentNullException

dataFrame is null.

-or-

formula is null.

FormatException

The formula is not in the correct format.

KMeansClusterAnalysis(IDataFrame, String[], Int32)

Constructs a new KMeansClusterAnalysis.
C#
public KMeansClusterAnalysis(
	IDataFrame dataFrame,
	string[] variableNames,
	int numberOfClusters
)

Parameters

dataFrame  IDataFrame
A data frame containing the data for the analysis.
variableNames  String[]
An array containing the names of the variables.
numberOfClusters  Int32
The number of clusters.

Exceptions

ArgumentNullException

dataFrame is null.

-or-

variableNames is null.

See Also