Documentation of 'jsat.classifiers.CategoricalData' Java class
CategoricalData
jsat.classifiers

Class CategoricalData

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


    public class CategoricalData
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • CategoricalData

        public CategoricalData(int n)
        Parameters:
        n - the number of categories
    • Method Detail

      • getNumOfCategories

        public int getNumOfCategories()
        Returns:
        the number of possible categories there are for this category
      • isValidCategory

        public boolean isValidCategory(int i)
        Returns true if the given input is a valid category index for this object. Missing values (negative categories) do not count.
        Parameters:
        i - the index for a category in this object
        Returns:
        true if it was a valid category, false otherwise.
      • getOptionName

        public java.lang.String getOptionName(int i)
      • getCategoryName

        public java.lang.String getCategoryName()
      • setCategoryName

        public void setCategoryName(java.lang.String categoryName)
      • setOptionName

        public boolean setOptionName(java.lang.String name,
                                     int i)
        Sets the name of one of the value options. Duplicate names are not allowed. Trying to set the name of a non existent option will result in false being returned.
        All names will be converted to lower case
        Parameters:
        name - the name to give
        i - the ith index to set.
        Returns:
        true if the name was set. False if the name could not be set.
      • clone

        public CategoricalData clone()
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.