Class DataSet

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

    public class DataSet
    extends java.util.ArrayList<DataPoint>
    A class to hold multiple data points
    Author:
    Bhagat
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      DataSet()
      creates a data set
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static DataSet create​(double[][] inputs, double[][] outputs)
      creates a dataset from arrays of inputs and outputs
      void shuffle()
      randomizes the order of the data set
      java.lang.String toString()
      string representation of the data set
      • 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
    • Constructor Detail

      • DataSet

        public DataSet()
        creates a data set
    • Method Detail

      • shuffle

        public void shuffle()
        randomizes the order of the data set
      • create

        public static DataSet create​(double[][] inputs,
                                     double[][] outputs)
        creates a dataset from arrays of inputs and outputs
        Parameters:
        inputs - the inputs
        outputs - the outputs
        Returns:
        the data set
      • toString

        public java.lang.String toString()
        string representation of the data set
        Overrides:
        toString in class java.util.AbstractCollection<DataPoint>