Click or drag to resize
Accord.NET (logo)

KModesT Class

k-Modes algorithm.
Inheritance Hierarchy
SystemObject
  Accord.MachineLearningParallelLearningBase
    Accord.MachineLearningKModesT
      Accord.MachineLearningKModes

Namespace:  Accord.MachineLearning
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.5.0
Syntax
[SerializableAttribute]
public class KModes<T> : ParallelLearningBase, IClusteringAlgorithm<T[]>, 
	IUnsupervisedLearning<IClusterCollection<T[]>, T[], int>, IUnsupervisedLearning<KModesClusterCollection<T>, T[], int>
Request Example View Source

Type Parameters

T

The KModesT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyClusters
Gets the clusters found by K-modes.
Public propertyComputeError
Gets or sets whether the clustering distortion error (the average distance between all data points and the cluster centroids) should be computed at the end of the algorithm. The result will be stored in Error. Default is true.
Public propertyDimension
Gets the dimensionality of the data space.
Public propertyDistance
Gets or sets the distance function used as a distance metric between data points.
Public propertyError
Gets the cluster distortion error (the average distance between data points and the cluster centroids) after the last call to this class' Compute methods.
Public propertyInitialization
Gets or sets the strategy used to initialize the centroids of the clustering algorithm. Default is KMeansPlusPlus.
Public propertyIterations
Gets the number of iterations performed in the last call to this class' Compute methods.
Public propertyK
Gets the number of clusters.
Public propertyMaxIterations
Gets or sets the maximum number of iterations to be performed by the method. If set to zero, no iteration limit will be imposed. Default is 0.
Public propertyParallelOptions
Gets or sets the parallelization options for this algorithm.
(Inherited from ParallelLearningBase.)
Public propertyToken
Gets or sets a cancellation token that can be used to cancel the algorithm while it is running.
(Inherited from ParallelLearningBase.)
Public propertyTolerance
Gets or sets the relative convergence threshold for stopping the algorithm. Default is 1e-5.
Top
Methods
  NameDescription
Public methodCompute Obsolete.
Divides the input data into K clusters.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLearn
Learns a model that can map the given inputs to the desired outputs.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by Matrix.)
Top
Remarks
The k-Modes algorithm is a variant of the k-Means which instead of locating means attempts to locate the modes of a set of points. As the algorithm does not require explicit numeric manipulation of the input points (such as addition and division to compute the means), the algorithm can be used with arbitrary (generic) data structures.
See Also