KMeansClusterAnalysis Constructor

Definition

Namespace: Extreme.Statistics.Multivariate
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

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

ArgumentNullExceptiondataFrame 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

ArgumentNullExceptionvariables 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

ArgumentNullExceptiondata is null.

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

ArgumentNullExceptiondataFrame is null.

-or-

formula is null.

FormatExceptionThe 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

ArgumentNullExceptiondataFrame is null.

-or-

variableNames is null.

See Also