inpro.features
Class TimeShiftingAnalysis
java.lang.Object
inpro.features.TimeShiftingAnalysis
- All Implemented Interfaces:
- edu.cmu.sphinx.instrumentation.Resetable
public class TimeShiftingAnalysis
- extends java.lang.Object
- implements edu.cmu.sphinx.instrumentation.Resetable
class to perform linear regression and mean calculation;
ideal for incrementally added data points. old data points
can be discarded automatically using setMaxLag()
- Author:
- timo
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
dataPoints
protected java.util.LinkedList<TimeShiftingAnalysis.DataPoint> dataPoints
maxLag
protected int maxLag
currentTime
protected int currentTime
dirty
protected boolean dirty
slope
protected double slope
intercept
protected double intercept
mean
protected double mean
stddev
protected double stddev
range
protected double range
mse
protected double mse
meanDifference
protected double meanDifference
minPos
protected double minPos
maxPos
protected double maxPos
max
protected double max
min
protected double min
up
protected int up
down
protected int down
same
protected int same
peaks
protected int peaks
TimeShiftingAnalysis
public TimeShiftingAnalysis(int maxLag)
TimeShiftingAnalysis
public TimeShiftingAnalysis()
add
public void add(int t,
double x)
shiftTime
public void shiftTime(int t)
removeOldPoints
private void removeOldPoints()
setMaxLag
public void setMaxLag(int maxLag)
- set the maximum lag of the time shifting analysis
- Parameters:
maxLag
- maximum lag of the oldest considered data point
0: consider all data points
doRegression
protected void doRegression()
getSlope
public double getSlope()
getIntercept
public double getIntercept()
getMean
public double getMean()
getRange
public double getRange()
getMSE
public double getMSE()
getMeanStepDifference
public double getMeanStepDifference()
getMinPosition
public double getMinPosition()
getMaxPosition
public double getMaxPosition()
getMin
public double getMin()
getMax
public double getMax()
predictValueAt
public double predictValueAt(int t)
getLatestValue
public double getLatestValue()
getWesseling
public double getWesseling()
getUpCount
public int getUpCount()
getDownCount
public int getDownCount()
getSameCount
public int getSameCount()
getPeakCount
public int getPeakCount()
hasValidData
public boolean hasValidData()
reset
public void reset()
- Specified by:
reset
in interface edu.cmu.sphinx.instrumentation.Resetable
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
main
public static void main(java.lang.String[] args)