Class Examples

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Example>, java.util.Collection<Example>, java.util.List<Example>, java.util.RandomAccess

    public class Examples
    extends java.util.ArrayList<Example>
    Stores examples for data sets for machine learning.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Attributes attributes
      the attributes structure for these examples
      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      Examples​(Attributes attributes)
      Explicit constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void parse​(java.util.Scanner scanner)
      For the attributes structure, parses a set of examples using the tokens in the specified scanner, which consists of @examples <examples-list>.
      java.lang.String toString()
      Returns a string representation of this Examples object.
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Field Detail

      • attributes

        private Attributes attributes
        the attributes structure for these examples
    • Constructor Detail

      • Examples

        public Examples​(Attributes attributes)
        Explicit constructor.
        Parameters:
        attributes - the attributes for this set of examples
    • Method Detail

      • parse

        public void parse​(java.util.Scanner scanner)
                   throws java.lang.Exception
        For the attributes structure, parses a set of examples using the tokens in the specified scanner, which consists of @examples <examples-list>.
        Parameters:
        scanner - a Scanner containing the examples' tokens
        Throws:
        java.lang.Exception - if an index is out of bounds or if a parse error occurs
      • toString

        public java.lang.String toString()
        Returns a string representation of this Examples object.
        Overrides:
        toString in class java.util.AbstractCollection<Example>
        Returns:
        a string representation of this Examples object