Class DataObject


  • public class DataObject
    extends Object
    This object encapsulates a data point.
    Author:
    Fernando Sanchez Villaamil
    • Constructor Detail

      • DataObject

        public DataObject​(int idCounter,
                          Instance inst)
        Standard constructor for DataObject.
        Parameters:
        idCounter - The id for the DataObject.
        inst -
    • Method Detail

      • getFeatures

        public double[] getFeatures()
        Returns the features (label attribute excluded).
        Returns:
        An array double[] with the features.
      • getId

        public int getId()
        Returns the id for the DataObject.
        Returns:
        An int with the id of the DataObject.
      • setId

        public void setId​(int id)
      • getClassLabel

        public int getClassLabel()
        Return the label for the DataObject.
        Returns:
        An int which codes the label.
      • getInstance

        public Instance getInstance()
        Return the Instance of the DataObject.
        Returns:
        An Instance.
      • getNrOfDimensions

        public int getNrOfDimensions()
        Returns the number of features (label attribute excluded).
        Returns:
        The number of features in the point.
      • toString

        public String toString()
        Returns a String representation of the point. The features are written comma separated between parenthesis and the label id is written after the closing parenthesis surrounded by squared brackets.
        Overrides:
        toString in class Object
        Returns:
        A String representation of the point.
      • setOutiler

        public void setOutiler​(boolean val)
      • isOutiler

        public boolean isOutiler()