jsat.clustering.kmeans
Class NaiveKMeans
- java.lang.Object
-
- jsat.clustering.ClustererBase
-
- jsat.clustering.KClustererBase
-
- jsat.clustering.kmeans.KMeans
-
- jsat.clustering.kmeans.NaiveKMeans
-
- All Implemented Interfaces:
- java.io.Serializable, Clusterer, KClusterer, Parameterized
public class NaiveKMeans extends KMeans
An implementation of Lloyd's K-Means clustering algorithm using the naive algorithm. This implementation exists mostly for comparison as a base line and educational reasons. For efficient exact k-Means, useElkanKMeans
This implementation is parallel, but does not support any of the clustering methods that do not specify the number of clusters.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class jsat.clustering.kmeans.KMeans
DEFAULT_SEED_SELECTION
-
-
Constructor Summary
Constructors Constructor and Description NaiveKMeans()Creates a new naive k-Means cluster usingk-means++for the seed selection and theEuclideanDistanceNaiveKMeans(DistanceMetric dm)Creates a new naive k-Means cluster usingk-means++for the seed selection.NaiveKMeans(DistanceMetric dm, SeedSelectionMethods.SeedSelection seedSelection)Creates a new naive k-Means clusterNaiveKMeans(DistanceMetric dm, SeedSelectionMethods.SeedSelection seedSelection, java.util.Random rand)Creates a new naive k-Means clusterNaiveKMeans(NaiveKMeans toCopy)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NaiveKMeansclone()-
Methods inherited from class jsat.clustering.kmeans.KMeans
cluster, cluster, cluster, cluster, getDistanceMetric, getIterationLimit, getMeans, getSeedSelection, setIterationLimit, setSeedSelection, setStoreMeans, supportsWeightedData
-
Methods inherited from class jsat.clustering.ClustererBase
createClusterListFromAssignmentArray, getDatapointsFromCluster
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsat.parameters.Parameterized
getParameter, getParameters
-
-
-
-
Constructor Detail
-
NaiveKMeans
public NaiveKMeans()
Creates a new naive k-Means cluster usingk-means++for the seed selection and theEuclideanDistance
-
NaiveKMeans
public NaiveKMeans(DistanceMetric dm)
Creates a new naive k-Means cluster usingk-means++for the seed selection.- Parameters:
dm- the distance function to use
-
NaiveKMeans
public NaiveKMeans(DistanceMetric dm, SeedSelectionMethods.SeedSelection seedSelection)
Creates a new naive k-Means cluster- Parameters:
dm- the distance function to useseedSelection- the method of selecting the initial seeds
-
NaiveKMeans
public NaiveKMeans(DistanceMetric dm, SeedSelectionMethods.SeedSelection seedSelection, java.util.Random rand)
Creates a new naive k-Means cluster- Parameters:
dm- the distance function to useseedSelection- the method of selecting the initial seedsrand- the source of randomness to use
-
NaiveKMeans
public NaiveKMeans(NaiveKMeans toCopy)
Copy constructor- Parameters:
toCopy- the object to copy
-
-
Method Detail
-
clone
public NaiveKMeans clone()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG