Interface Instance

    • Method Detail

      • weight

        double weight()
        Gets the weight of the instance.
        Returns:
        the weight
      • setWeight

        void setWeight​(double weight)
        Sets the weight.
        Parameters:
        weight - the new weight
      • attribute

        Attribute attribute​(int instAttIndex)
        Attribute.
        Parameters:
        instAttIndex - the inst att index
        Returns:
        the attribute
      • indexOfAttribute

        int indexOfAttribute​(Attribute attribute)
        Index of an Attribute.
        Parameters:
        attribute - the attribute to be found.
        Returns:
        the index of an attribute
      • deleteAttributeAt

        void deleteAttributeAt​(int i)
        Delete attribute at.
        Parameters:
        i - the index
      • insertAttributeAt

        void insertAttributeAt​(int i)
        Insert attribute at.
        Parameters:
        i - the index
      • numAttributes

        int numAttributes()
        Gets the number of attributes.
        Returns:
        the number of attributes
      • addSparseValues

        void addSparseValues​(int[] indexValues,
                             double[] attributeValues,
                             int numberAttributes)
        Adds the sparse values.
        Parameters:
        indexValues - the index values
        attributeValues - the attribute values
        numberAttributes - the number attributes
      • numValues

        int numValues()
        Gets the number of values, mainly for sparse instances.
        Returns:
        the number of values
      • stringValue

        String stringValue​(int i)
        Gets the value of a discrete attribute as a string.
        Parameters:
        i - the i
        Returns:
        the string
      • value

        double value​(int instAttIndex)
        Gets the value of an attribute.
        Parameters:
        instAttIndex - the inst att index
        Returns:
        the double
      • value

        double value​(Attribute attribute)
        Gets the value of an attribute, given the attribute.
        Parameters:
        attribute - the attribute
        Returns:
        the double
      • setMissing

        void setMissing​(int instAttIndex)
        Sets an attribute as missing
        Parameters:
        instAttIndex - , the attribute's index
      • setMissing

        void setMissing​(Attribute attribute)
        Sets an attribute as missing
        Parameters:
        attribute - , the Attribute
      • setValue

        void setValue​(int instAttIndex,
                      double value)
        Sets the value of an attribute.
        Parameters:
        instAttIndex - the index
        value - the value
      • setValue

        void setValue​(Attribute attribute,
                      double value)
        Sets the value of an attribute.
        Parameters:
        attribute - , the Attribute
        value - the value
      • isMissing

        boolean isMissing​(int instAttIndex)
        Checks if an attribute is missing.
        Parameters:
        instAttIndex - the inst att index
        Returns:
        true, if is missing
      • isMissing

        boolean isMissing​(Attribute attribute)
        Checks if an attribute is missing.
        Parameters:
        attribute - , the Attribute
        Returns:
        true, if is missing
      • index

        int index​(int arrayIndex)
        Gets the index of the attribute given the index of the array in a sparse representation.
        Parameters:
        arrayIndex - the index of the array
        Returns:
        the index
      • valueSparse

        double valueSparse​(int i)
        Gets the value of an attribute in a sparse representation of the instance.
        Parameters:
        i - the i
        Returns:
        the value
      • isMissingSparse

        boolean isMissingSparse​(int p1)
        Checks if the attribute is missing sparse.
        Parameters:
        p1 - the p1
        Returns:
        true, if is missing sparse
      • toDoubleArray

        double[] toDoubleArray()
        To double array.
        Returns:
        the double[]
      • classAttribute

        Attribute classAttribute()
        Class attribute.
        Returns:
        the attribute
      • classIndex

        int classIndex()
        Class index.
        Returns:
        the int
      • classIsMissing

        boolean classIsMissing()
        Class is missing.
        Returns:
        true, if successful
      • classValue

        double classValue()
        Class value.
        Returns:
        the double
      • numClasses

        int numClasses()
        Num classes.
        Returns:
        the int
      • setClassValue

        void setClassValue​(double d)
        Sets the class value.
        Parameters:
        d - the new class value
      • copy

        Instance copy()
        Copy.
        Returns:
        the instance
      • setDataset

        void setDataset​(Instances dataset)
        Sets the dataset.
        Parameters:
        dataset - the new dataset
      • dataset

        Instances dataset()
        Dataset.
        Returns:
        the instances
      • numInputAttributes

        int numInputAttributes()
        Gets the number of input attributes.
        Returns:
        the number of input attributes
      • numOutputAttributes

        int numOutputAttributes()
        Gets the number of output attributes.
        Returns:
        the number of output attributes
      • numberOutputTargets

        int numberOutputTargets()
        Gets the number of output attributes.
        Returns:
        the number of output attributes
      • classValue

        double classValue​(int attributeIndex)
        Gets the value of an output attribute.
        Parameters:
        attributeIndex - the index
        Returns:
        the value
      • setClassValue

        void setClassValue​(int indexClass,
                           double valueAttribute)
        Sets the value of an output attribute.
        Parameters:
        indexClass - the output attribute index
        valueAttribute - the value of the attribute
      • outputAttribute

        Attribute outputAttribute​(int attributeIndex)
        Gets an output attribute given its index.
        Parameters:
        attributeIndex - the index
        Returns:
        the attribute
      • inputAttribute

        Attribute inputAttribute​(int attributeIndex)
        Gets an input attribute given its index.
        Parameters:
        attributeIndex - the index
        Returns:
        the attribute
      • valueInputAttribute

        double valueInputAttribute​(int attributeIndex)
        Gets the value of an input attribute.
        Parameters:
        attributeIndex - the index
        Returns:
        the value
      • valueOutputAttribute

        double valueOutputAttribute​(int attributeIndex)
        Gets the value of an output attribute.
        Parameters:
        attributeIndex - the index
        Returns:
        the value