Documentation of 'jsat.classifiers.linear.ROMMA' Java class
ROMMA
jsat.classifiers.linear

Class ROMMA

    • Constructor Summary

      Constructors 
      Constructor and Description
      ROMMA()
      Creates a new aggressive ROMMA classifier
      ROMMA(boolean aggressive)
      Creates a new ROMMA classifier
    • Constructor Detail

      • ROMMA

        public ROMMA()
        Creates a new aggressive ROMMA classifier
      • ROMMA

        public ROMMA(boolean aggressive)
        Creates a new ROMMA classifier
        Parameters:
        aggressive - whether or not to use the aggressive variant
    • Method Detail

      • setAggressive

        public void setAggressive(boolean aggressive)
        Determines whether the normal or aggressive ROMMA algorithm will be used.
        Parameters:
        aggressive - true to use the aggressive variant
      • isAggressive

        public boolean isAggressive()
        Returns whether or not the aggressive variant of ROMMA is used
        Returns:
        true if the aggressive variant of ROMMA is used
      • setUseBias

        public void setUseBias(boolean useBias)
        Sets whether or not an implicit bias term will be added to the data set
        Parameters:
        useBias - true to add an implicit bias term
      • isUseBias

        public boolean isUseBias()
        Returns whether or not an implicit bias term is in use
        Returns:
        true if a bias term is in use
      • getWeightVec

        public Vec getWeightVec()
        Returns the weight vector used to compute results via a dot product.
        Do not modify this value, or you will alter the results returned.
        Returns:
        the learned weight vector for prediction
      • getBias

        public double getBias()
        Description copied from interface: SingleWeightVectorModel
        Returns the bias term used for the model, or 0 of the model does not support or was not trained with a bias term.
        Specified by:
        getBias in interface SingleWeightVectorModel
        Returns:
        the bias term for the model
      • getRawWeight

        public Vec getRawWeight(int index)
        Description copied from interface: SimpleWeightVectorModel
        Returns the raw weight vector associated with the given class index. If the given class is an implicit zero vector, a ConstantVector object may be returned.
        Do not alter the returned weight vector, as it will change the model's values.

        If a regression problem, only index = 0 should be used
        Specified by:
        getRawWeight in interface SimpleWeightVectorModel
        Parameters:
        index - the class index to get the weight vector for
        Returns:
        the weight vector used for the specified class
      • getBias

        public double getBias(int index)
        Description copied from interface: SimpleWeightVectorModel
        Returns the bias term used with the weight vector for the given class index. If the model does not support or was not trained with bias weights, 0 will be returned.

        If a regression problem, only index = 0 should be used
        Specified by:
        getBias in interface SimpleWeightVectorModel
        Parameters:
        index - the class index to get the weight vector for
        Returns:
        the bias term for the specified class
      • numWeightsVecs

        public int numWeightsVecs()
        Description copied from interface: SimpleWeightVectorModel
        Returns the number of weight vectors that can be returned. For binary classification problems the value may be 1 if only a single weight vector's sign is used to determine the class. For multi-class problems, the weight vector count includes the implicit zero vector (if one is being used).
        Specified by:
        numWeightsVecs in interface SimpleWeightVectorModel
        Returns:
        the number of weight vectors for which SimpleWeightVectorModel.getRawWeight(int) can be called.
      • update

        public void update(DataPoint dataPoint,
                           int targetClass)
        Description copied from interface: UpdateableClassifier
        Updates the classifier by giving it a new data point to learn from.
        Specified by:
        update in interface UpdateableClassifier
        Parameters:
        dataPoint - the data point to learn
        targetClass - the target class of the data point
      • 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.
      • getScore

        public double getScore(DataPoint dp)
        Description copied from interface: BinaryScoreClassifier
        Returns the numeric score for predicting a class of a given data point, where the sign of the value indicates which class the data point is predicted to belong to.
        Specified by:
        getScore in interface BinaryScoreClassifier
        Parameters:
        dp - the data point to predict the class label of
        Returns:
        the score for the given data point
      • 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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.