eos.util
Class ExpSmoother

java.lang.Object
  extended by eos.util.ExpSmoother

public class ExpSmoother
extends java.lang.Object

This exponentially smooths a time series The smoothed value y(t) at step t is y(t) = timeConstant*y(t-1) + (1 - timeConstant)*x(t), where x(t) is the new data point at step t


Constructor Summary
ExpSmoother(double timeConstant)
          Create a new ExpSmoother with time constant timeConstant
 
Method Summary
 double initialize(double val)
          Initialize smoothed value to value in argument Note: not used right now
 double update(double val)
          Return updated smoothed value when val is new data point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpSmoother

public ExpSmoother(double timeConstant)
Create a new ExpSmoother with time constant timeConstant

Parameters:
timeConstant -
Method Detail

update

public double update(double val)
Return updated smoothed value when val is new data point

Parameters:
val -
Returns:
exponentially smoothed value of time series

initialize

public double initialize(double val)
Initialize smoothed value to value in argument Note: not used right now

Parameters:
val -
Returns:
initialized smoothed value of time series