Package smile.data

Class AttributeDataset.Row

    • Constructor Summary

      Constructors 
      Constructor Description
      Row​(double[] x)
      Constructor.
      Row​(double[] x, double y)
      Constructor.
      Row​(double[] x, double y, double weight)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date date​(int i)
      Returns a date element.
      java.lang.String label()
      Returns the class label in string format.
      java.lang.String string​(int i)
      Returns an element value in string format.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Row

        public Row​(double[] x)
        Constructor.
        Parameters:
        x - the datum.
      • Row

        public Row​(double[] x,
                   double y)
        Constructor.
        Parameters:
        x - the datum.
        y - the class label or real-valued response.
      • Row

        public Row​(double[] x,
                   double y,
                   double weight)
        Constructor.
        Parameters:
        x - the datum.
        y - the class label or real-valued response.
        weight - the weight of datum. The particular meaning of weight depends on applications and machine learning algorithms. Although there are on explicit requirements on the weights, in general, they should be positive.
    • Method Detail

      • label

        public java.lang.String label()
        Returns the class label in string format.
      • string

        public java.lang.String string​(int i)
        Returns an element value in string format.
        Parameters:
        i - the element index.
      • date

        public java.util.Date date​(int i)
        Returns a date element.
        Parameters:
        i - the element index.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object