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

Class SOM

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


    public class SOM
    extends java.lang.Object
    implements Classifier, Parameterized
    An implementation of a Self Organizing Map, also called a Kohonen Map. It is linked to many other algorithms, and is an unsupervised learning algorithm that can perform classification.

    The SOM is useful for visualizing data sets, though this is not yet implemented.
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_LEARNING_RATE

        public static final double DEFAULT_LEARNING_RATE
        See Also:
        Constant Field Values
      • DEFAULT_LEARNING_DECAY

        public static final DecayRate DEFAULT_LEARNING_DECAY
      • DEFAULT_NEIGHBOR_DECAY

        public static final DecayRate DEFAULT_NEIGHBOR_DECAY
    • Constructor Detail

      • SOM

        public SOM(int somHeight,
                   int somWeight)
        Creates a new SOM using the given parameters using the EuclideanDistance
        Parameters:
        somHeight - the height of the SOM lattice
        somWeight - the weight of the SOM lattice
      • SOM

        public SOM(DistanceMetric dm,
                   int somHeight,
                   int somWeight)
        Creates a new SOM using the given parameters
        Parameters:
        dm - the distance metric to use when comparing points
        somHeight - the height of the SOM lattice
        somWeight - the weight of the SOM lattice
      • SOM

        public SOM(DistanceMetric dm,
                   int somHeight,
                   int somWeight,
                   VectorCollection<VecPaired<Vec,java.lang.Integer>> vcFactory)
        Creates a new SOM using the given parameters
        Parameters:
        dm - the distance metric to use when comparing points
        somHeight - the height of the SOM lattice
        somWeight - the weight of the SOM lattice
        vcFactory - the vector collection to use for containing points
    • Method Detail

      • setMaxIterations

        public void setMaxIterations(int maxIters)
        Sets the maximum number of iterations that will be used to converge
        Parameters:
        maxIters - the max iterations of the algorithm
      • getMaxIterations

        public int getMaxIterations()
        Returns the maximum number of iterations that will be used to converge
        Returns:
        the max iterations of the algorithm
      • setSomWidth

        public void setSomWidth(int somWidth)
        Sets the width of the SOM lattice to create
        Parameters:
        somWidth - the width of the lattice
      • setSomHeight

        public void setSomHeight(int somHeight)
        Sets the height of the SOM lattice to create
        Parameters:
        somHeight - the height of the lattice
      • getSomHeight

        public int getSomHeight()
        Returns the height of the SOM lattice to create
        Returns:
        the height of the lattice
      • getSomWidth

        public int getSomWidth()
        Returns the width of the SOM lattice to create
        Returns:
        the width of the lattice
      • setInitialLearningRate

        public void setInitialLearningRate(double initialLearningRate)
        Sets the rate at which input is incorporated at each iteration of the SOM algorithm
        Parameters:
        initialLearningRate - the rate the SOM learns at
      • getInitialLearningRate

        public double getInitialLearningRate()
        Returns the rate at which input is incorporated at each iteration of the SOM
        Returns:
        the rate the SOM learns at
      • setLearningDecay

        public void setLearningDecay(DecayRate learningDecay)
        The rate the SOM learns decays over each iteration, and this defines the way in which the rate decays.
        Parameters:
        learningDecay - the decay for the learning rate
      • getLearningDecay

        public DecayRate getLearningDecay()
        The rate the SOM learns decays over each iteration, and this defines the way in which the rate decays.
        Returns:
        the decay for the learning rate
      • setNeighborDecay

        public void setNeighborDecay(DecayRate neighborDecay)
        The range of effect each data point has decays with each iteration, and this defines the way in which the rate decays.
        Parameters:
        neighborDecay - the decay for the neighbor range.
      • getNeighborDecay

        public DecayRate getNeighborDecay()
        The range of effect each data point has decays with each iteration, and this defines the way in which the rate decays.
        Returns:
        the decay for the neighbor range.
      • classify

        public CategoricalResults classify(DataPoint data)
        Description copied from interface: Classifier
        Performs classification on the given data point.
        Specified by:
        classify in interface Classifier
        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
        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.
      • supportsWeightedData

        public boolean supportsWeightedData()
        Description copied from interface: Classifier
        Indicates whether the model knows how to train using weighted data points. If it does, the model will train assuming the weights. The values returned by this method may change depending on the parameters set for the model.
        Specified by:
        supportsWeightedData in interface Classifier
        Returns:
        true if the model supports weighted data, false otherwise
      • clone

        public SOM clone()
        Specified by:
        clone in interface Classifier
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.