com.datumbox.framework.core.machinelearning.clustering
Class Kmeans
- java.lang.Object
-
- com.datumbox.framework.core.machinelearning.common.abstracts.AbstractTrainer<MP,TP>
-
- com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractModeler<MP,TP>
-
- com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractClusterer<Kmeans.Cluster,Kmeans.ModelParameters,Kmeans.TrainingParameters>
-
- com.datumbox.framework.core.machinelearning.clustering.Kmeans
-
- All Implemented Interfaces:
- Savable, Parallelizable, PredictParallelizable, Trainable<Kmeans.ModelParameters,Kmeans.TrainingParameters>, TrainParallelizable, java.lang.AutoCloseable
public class Kmeans extends AbstractClusterer<Kmeans.Cluster,Kmeans.ModelParameters,Kmeans.TrainingParameters> implements PredictParallelizable, TrainParallelizable
This class implements the K-means clustering algorithm supporting different Initialization and distance methods. Several different expansions on the standard algorithm are used to ensure we can handle mixed data (k-representative, k-prototype, etc). References: http://cs.gsu.edu/~wkim/index_files/papers/kprototype.pdf http://ilpubs.stanford.edu:8090/778/1/2006-13.pdf http://www.ima.umn.edu/~iwen/REU/BATS-Means.pdf http://web.cs.swarthmore.edu/~turnbull/Papers/Turnbull_GenreRBF_KDE05.pdf http://thesis.neminis.org/wp-content/plugins/downloads-manager/upload/masterThesis-VR.pdf
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classKmeans.Clusterstatic classKmeans.ModelParametersBase class for every ModelParameter class in the framework.static classKmeans.TrainingParametersThe AbstractTrainingParameters class stores the parameters that can be changed before training the algorithm.-
Nested classes/interfaces inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractClusterer
AbstractClusterer.AbstractCluster, AbstractClusterer.AbstractModelParameters<CL extends AbstractClusterer.AbstractCluster>
-
Nested classes/interfaces inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.AbstractTrainer
AbstractTrainer.AbstractTrainingParameters
-
Nested classes/interfaces inherited from interface com.datumbox.framework.core.machinelearning.common.interfaces.PredictParallelizable
PredictParallelizable.Prediction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PredictParallelizable.Prediction_predictRecord(Record r)Takes a single record, makes a prediction using the model and returns the result wrapped in the Prediction tuple.booleanisParallelized()Getter for the parallelized parameter.voidsetParallelized(boolean parallelized)Setter for the parallelized parameter.-
Methods inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractClusterer
getClusters
-
Methods inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractModeler
predict
-
Methods inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.AbstractTrainer
close, delete, fit, getModelParameters, getTrainingParameters, save
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.datumbox.framework.core.machinelearning.common.interfaces.PredictParallelizable
_predictDatasetParallel, _predictDatasetParallel
-
-
-
-
Method Detail
-
isParallelized
public boolean isParallelized()
Getter for the parallelized parameter.- Specified by:
isParallelizedin interfaceParallelizable- Returns:
-
setParallelized
public void setParallelized(boolean parallelized)
Setter for the parallelized parameter.- Specified by:
setParallelizedin interfaceParallelizable
-
_predictRecord
public PredictParallelizable.Prediction _predictRecord(Record r)
Takes a single record, makes a prediction using the model and returns the result wrapped in the Prediction tuple. The method assumes that the KnowledgeBase is be loaded.- Specified by:
_predictRecordin interfacePredictParallelizable- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG