public class LVQLLC extends LVQ
LVQ.getEpsilonDistance()
parameter that is used to
update two prototypes at the same time. Classification can then be done by
getting the Classifier for the nearest prototype, or averaging the results of
the two closest prototypes if the point is near a boundary. MultivariateNormals
.LVQ.LVQVersion
DEFAULT_EPS, DEFAULT_ITERATIONS, DEFAULT_LEARNING_RATE, DEFAULT_LVQ_METHOD, DEFAULT_MSCALE, DEFAULT_REPS_PER_CLASS, DEFAULT_SEED_SELECTION, DEFAULT_STOPPING_DIST, dm, vc, weightClass, weights, wins
Modifier | Constructor and Description |
---|---|
|
LVQLLC(DistanceMetric dm,
int iterations)
Creates a new LVQ-LLC instance that uses
MultivariateNormals as
the local classifier. |
|
LVQLLC(DistanceMetric dm,
int iterations,
Classifier localClasifier)
Creates a new LVQ-LLC instance
|
|
LVQLLC(DistanceMetric dm,
int iterations,
Classifier localClasifier,
double learningRate,
int representativesPerClass)
Creates a new LVQ-LLC instance
|
|
LVQLLC(DistanceMetric dm,
int iterations,
Classifier localClasifier,
double learningRate,
int representativesPerClass,
LVQ.LVQVersion lvqVersion,
DecayRate learningDecay)
Creates a new LVQ-LLC instance
|
protected |
LVQLLC(LVQLLC toCopy) |
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
LVQLLC |
clone() |
Classifier |
getLocalClassifier()
Returns the classifier used for each prototype
|
void |
setLocalClassifier(Classifier localClassifier)
Each prototype will create a classifier that is local to itself, and
trained on the points that belong to the prototype and those near the
border of the prototype.
|
void |
trainC(ClassificationDataSet dataSet)
Trains the classifier and constructs a model for classification using the
given data set.
|
void |
trainC(ClassificationDataSet dataSet,
ExecutorService threadPool)
Trains the classifier and constructs a model for classification using the
given data set.
|
epsClose, getDistanceMetric, getEpsilonDistance, getIterations, getLearningDecay, getLearningRate, getLVQMethod, getMScale, getParameter, getParameters, getRepresentativesPerClass, getSeedSelection, getStoppingDist, setDistanceMetric, setEpsilonDistance, setIterations, setLearningDecay, setLearningRate, setLVQMethod, setMScale, setRepresentativesPerClass, setSeedSelection, setStoppingDist, setVecCollectionFactory, supportsWeightedData
public LVQLLC(DistanceMetric dm, int iterations)
MultivariateNormals
as
the local classifier.dm
- the distance metric to useiterations
- the number of iterations to performpublic LVQLLC(DistanceMetric dm, int iterations, Classifier localClasifier)
dm
- the distance metric to useiterations
- the number of iterations to performlocalClasifier
- the classifier to use as a local classifier for each prototypepublic LVQLLC(DistanceMetric dm, int iterations, Classifier localClasifier, double learningRate, int representativesPerClass)
dm
- the distance metric to useiterations
- the number of iterations to performlocalClasifier
- the classifier to use as a local classifier for each prototypelearningRate
- the learning rate to use when updatingrepresentativesPerClass
- the number of representatives to create
for each classpublic LVQLLC(DistanceMetric dm, int iterations, Classifier localClasifier, double learningRate, int representativesPerClass, LVQ.LVQVersion lvqVersion, DecayRate learningDecay)
dm
- the distance metric to useiterations
- the number of iterations to performlocalClasifier
- the classifier to use as a local classifier for each prototypelearningRate
- the learning rate to use when updatingrepresentativesPerClass
- the number of representatives to create
for each classlvqVersion
- the version of LVQ to uselearningDecay
- the amount of decay to apply to the learning rateprotected LVQLLC(LVQLLC toCopy)
public void setLocalClassifier(Classifier localClassifier)
localClassifier
- the local classifier to use for each prototypepublic Classifier getLocalClassifier()
public CategoricalResults classify(DataPoint data)
Classifier
classify
in interface Classifier
classify
in class LVQ
data
- the data point to classifypublic void trainC(ClassificationDataSet dataSet, ExecutorService threadPool)
Classifier
trainC
in interface Classifier
trainC
in class LVQ
dataSet
- the data set to train onthreadPool
- the source of threads to use.public void trainC(ClassificationDataSet dataSet)
Classifier
trainC
in interface Classifier
trainC
in class LVQ
dataSet
- the data set to train onpublic LVQLLC clone()
clone
in interface Classifier
clone
in class LVQ
Copyright © 2017. All rights reserved.