Documentation of 'smile.data.AttributeVector' Java class
AttributeVector
smile.data

Class AttributeVector



  • public class AttributeVector
    extends java.lang.Object
    A vector with attribute information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Attribute attribute()
      Returns the attribute.
      java.lang.String head(int n)
      Shows the first few rows.
      java.lang.String[] names()
      Returns the name vector.
      int size()
      Returns the vector size.
      AttributeVector summary()
      Returns statistic summary.
      java.lang.String tail(int n)
      Shows the last few rows.
      java.lang.String toString() 
      java.lang.String toString(int from, int to)
      Stringify the vector.
      double[] vector()
      Returns the data vector.
      • Methods inherited from class java.lang.Object

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

      • AttributeVector

        public AttributeVector(Attribute attribute,
                               double[] vector)
        Constructor.
        Parameters:
        attribute - the attribute information.
        vector - the data vector.
      • AttributeVector

        public AttributeVector(Attribute attribute,
                               double[] vector,
                               java.lang.String[] names)
        Constructor.
        Parameters:
        attribute - the attribute information.
        vector - the data vector.
        names - optional names for each element.
    • Method Detail

      • attribute

        public Attribute attribute()
        Returns the attribute.
      • vector

        public double[] vector()
        Returns the data vector.
      • names

        public java.lang.String[] names()
        Returns the name vector.
      • size

        public int size()
        Returns the vector size.
        Returns:
      • toString

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

        public java.lang.String head(int n)
        Shows the first few rows.
      • tail

        public java.lang.String tail(int n)
        Shows the last few rows.
      • toString

        public java.lang.String toString(int from,
                                         int to)
        Stringify the vector.
        Parameters:
        from - starting row (inclusive)
        to - ending row (exclusive)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.