de.fhkoeln.zra.statix.data
Class StatCustomSequence

java.lang.Object
  |
  +--de.fhkoeln.zra.statix.data.StatCustomSequence
All Implemented Interfaces:
StatSequence

public class StatCustomSequence
extends Object
implements StatSequence

Author:
knaufax

Nested Class Summary
private  class StatCustomSequence.DoubleArrayEnumeration
           
 
Field Summary
private  double avg
           
private  int count
           
private  Double[] data
           
private  Integer firstIndex
           
private  double stddev
           
private  double sum
           
private  double variance
           
 
Constructor Summary
StatCustomSequence(double[] data)
           
StatCustomSequence(Double[] data)
           
 
Method Summary
private  void calculateValues()
          Method calculateValues.
private  Double[] double2Double(double[] timeSequence)
           
 double getAverage()
           
 double getCorrelationCoefficient(StatSequence other)
           
 int getCount()
           
 Double[] getDataAsArray()
          return all the Pairs as array
 double getLinearRegressionForecast(int in)
          returns a forecast-value for in using linear regression
 double getMAE()
          return the mean absolute error:
 Double getMax()
           
 double getMedian()
           
 Double getMin()
           
 double getMSE()
          returns the mean squared error
 double getRMSE()
          returns the root of mean squared error
 double getStandardDeviation()
           
 double getSum()
           
 double getSumOfSquares()
          returns the sum of squares
 Enumeration getTimeSequence()
          returns an java.util.Enumeration which iterates over all Pairs
 double getVariance()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

private Double[] data

sum

private double sum

variance

private double variance

stddev

private double stddev

avg

private double avg

count

private int count

firstIndex

private Integer firstIndex
Constructor Detail

StatCustomSequence

public StatCustomSequence(double[] data)

StatCustomSequence

public StatCustomSequence(Double[] data)
Method Detail

calculateValues

private void calculateValues()
Method calculateValues. Beerechnet alle werte.


double2Double

private Double[] double2Double(double[] timeSequence)

getTimeSequence

public Enumeration getTimeSequence()
Description copied from interface: StatSequence
returns an java.util.Enumeration which iterates over all Pairs

Specified by:
getTimeSequence in interface StatSequence
Returns:
an enumeration for all pairs

getDataAsArray

public Double[] getDataAsArray()
Description copied from interface: StatSequence
return all the Pairs as array

Specified by:
getDataAsArray in interface StatSequence
Returns:
the Pair-array

getVariance

public double getVariance()
Specified by:
getVariance in interface StatSequence

getStandardDeviation

public double getStandardDeviation()
Specified by:
getStandardDeviation in interface StatSequence

getSum

public double getSum()
Specified by:
getSum in interface StatSequence

getAverage

public double getAverage()
Specified by:
getAverage in interface StatSequence

getCount

public int getCount()
Specified by:
getCount in interface StatSequence

getMax

public Double getMax()
Specified by:
getMax in interface StatSequence

getMin

public Double getMin()
Specified by:
getMin in interface StatSequence

getMedian

public double getMedian()
Specified by:
getMedian in interface StatSequence

toString

public String toString()
Overrides:
toString in class Object

getMAE

public double getMAE()
return the mean absolute error:

Specified by:
getMAE in interface StatSequence

getMSE

public double getMSE()
returns the mean squared error

Specified by:
getMSE in interface StatSequence

getRMSE

public double getRMSE()
returns the root of mean squared error

Specified by:
getRMSE in interface StatSequence

getSumOfSquares

public double getSumOfSquares()
returns the sum of squares

Specified by:
getSumOfSquares in interface StatSequence

getCorrelationCoefficient

public double getCorrelationCoefficient(StatSequence other)
Specified by:
getCorrelationCoefficient in interface StatSequence

getLinearRegressionForecast

public double getLinearRegressionForecast(int in)
returns a forecast-value for
in
using linear regression

Specified by:
getLinearRegressionForecast in interface StatSequence