Documentation of 'jsat.classifiers.neuralnetwork.LVQLLC' Java class
LVQLLC
jsat.classifiers.neuralnetwork

Class LVQLLC

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, Parameterized


    public class LVQLLC
    extends LVQ
    LVQ with Locally Learned Classifier (LVQ-LLC) is an adaption of the LVQ algorithm I have come up with. Given a classification data set, LVQ develops and moves several prototype vectors throughout the space, trying to place them as good representatives. Classification is then done Nearest Neighbor style among the prototypes.
    LVQ-LLC trains a local classifier on all of the data points that belong to the prototype, and the data points that lie across the border but are still near the prototype using the 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.
    This is done because, given a complex decision boundary and a sufficient number of prototypes, each prototype's domain will be a smaller subset of the problem and will hopefully resemble a simpler decision problem that can be solved by a less complicated local learner.
    LVQ-LLC has the following advantages over LVQ:
    • Can return probabilities instead of hard classifications
    • Approximate decision boundaries can be more complicated than voronoi diagrams
    • Increase accuracy given a smaller number of prototypes per class

    By default, the local classifier is the MultivariateNormals.
    See Also:
    Serialized Form
    • Constructor Detail

      • LVQLLC

        public LVQLLC(DistanceMetric dm,
                      int iterations)
        Creates a new LVQ-LLC instance that uses MultivariateNormals as the local classifier.
        Parameters:
        dm - the distance metric to use
        iterations - the number of iterations to perform
      • LVQLLC

        public LVQLLC(DistanceMetric dm,
                      int iterations,
                      Classifier localClasifier)
        Creates a new LVQ-LLC instance
        Parameters:
        dm - the distance metric to use
        iterations - the number of iterations to perform
        localClasifier - the classifier to use as a local classifier for each prototype
      • LVQLLC

        public LVQLLC(DistanceMetric dm,
                      int iterations,
                      Classifier localClasifier,
                      double learningRate,
                      int representativesPerClass)
        Creates a new LVQ-LLC instance
        Parameters:
        dm - the distance metric to use
        iterations - the number of iterations to perform
        localClasifier - the classifier to use as a local classifier for each prototype
        learningRate - the learning rate to use when updating
        representativesPerClass - the number of representatives to create for each class
      • LVQLLC

        public LVQLLC(DistanceMetric dm,
                      int iterations,
                      Classifier localClasifier,
                      double learningRate,
                      int representativesPerClass,
                      LVQ.LVQVersion lvqVersion,
                      DecayRate learningDecay)
        Creates a new LVQ-LLC instance
        Parameters:
        dm - the distance metric to use
        iterations - the number of iterations to perform
        localClasifier - the classifier to use as a local classifier for each prototype
        learningRate - the learning rate to use when updating
        representativesPerClass - the number of representatives to create for each class
        lvqVersion - the version of LVQ to use
        learningDecay - the amount of decay to apply to the learning rate
    • Method Detail

      • setLocalClassifier

        public 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. This sets the classifier that will be used
        Parameters:
        localClassifier - the local classifier to use for each prototype
      • getLocalClassifier

        public Classifier getLocalClassifier()
        Returns the classifier used for each prototype
        Returns:
        the classifier used for each prototype
      • classify

        public CategoricalResults classify(DataPoint data)
        Description copied from interface: Classifier
        Performs classification on the given data point.
        Specified by:
        classify in interface Classifier
        Overrides:
        classify in class LVQ
        Parameters:
        data - the data point to classify
        Returns:
        the results of the classification.
      • train

        public void train(ClassificationDataSet dataSet,
                          boolean parallel)
        Description copied from interface: Classifier
        Trains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.
        Specified by:
        train in interface Classifier
        Overrides:
        train in class LVQ
        Parameters:
        dataSet - the data set to train on
        parallel - true if multiple threads should be used to train the model. false if it should be done in a single threaded manner.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.