Class TimeSeriesTable


  • public class TimeSeriesTable
    extends Object
    Utility class to load time series into a table and then:
    • Get direct access to all values
    • Compute statistics like mean, standard deviation, and Pearson product-moment correlation coefficient
    • Convert to CSV
    Some design considerations and limitations:
    • Number of version loadable in the table has to be specified at creation
    • Versions have to contiguous
    • Once first batch of time series has been loaded, new time series cannot be added but data of existing one can be updated
    • Concurrent load (i.e multi-thread) of data is supported (using same time series list)
    • Concurrency between data loading and other operations (CSV writing, statistics computation) is NOT supported
    Author:
    Geoffroy Jamgotchian
    • Constructor Detail

      • TimeSeriesTable

        public TimeSeriesTable​(int fromVersion,
                               int toVersion,
                               TimeSeriesIndex tableIndex)
    • Method Detail

      • load

        public void load​(int version,
                         List<TimeSeries> timeSeriesList)
      • getTimeSeriesNames

        public List<String> getTimeSeriesNames()
      • getDoubleValue

        public double getDoubleValue​(int version,
                                     int timeSeriesNum,
                                     int point)
      • getStringValue

        public String getStringValue​(int version,
                                     int timeSeriesNum,
                                     int point)
      • getDoubleTimeSeriesIndex

        public int getDoubleTimeSeriesIndex​(String timeSeriesName)
      • getStringTimeSeriesIndex

        public int getStringTimeSeriesIndex​(String timeSeriesName)
      • getMean

        public double getMean​(int version,
                              int timeSeriesNum)
      • getStdDev

        public double getStdDev​(int version,
                                int timeSeriesNum)
      • computePpmcc

        public double[] computePpmcc​(String timeSeriesName,
                                     int version)
      • writeCsv

        public void writeCsv​(Path file)
      • toCsvString

        public String toCsvString()