org.openuat.sensors
Class TimeSeriesAggregator
java.lang.Object
org.openuat.sensors.TimeSeriesBundle
org.openuat.sensors.TimeSeriesAggregator
public class TimeSeriesAggregator
- extends TimeSeriesBundle
This class implements an aggregation of multiple time series into one. To do so,
it calculates the magnitude of the multi-dimensional vector for each sample and uses
this magnitude as the new (single-dimensional) sample value.
Forwarding this single-dimensional time series to the next step can be done either as
single samples during active periods or as complete segments from the start of an
active period to its end. For the former, this class can send to SamplesSink objects,
for the latter, it can send to SegmentsSink objects.
It keeps the time series of the first step, i.e. the pre-processing that does a linear
transformation to [-1;1] and detects active/quiescent segments, internally. Using the
getSinks() method, these internally managed TimeSeries objects can be registered with
the samples source.
After an active segment ends, this class emits the aggregated segment.
- Version:
- 1.1, changes to 1.0: now based on the new base class TimeSeriesBundle
- Author:
- Rene Mayrhofer
| Fields inherited from class org.openuat.sensors.TimeSeriesBundle |
curActiveSegmentLength, curSample, curSample_Int, curSampleIndex, curSampleReceived, firstStageHandlers, firstStageSeries, firstStageSeries_Int, maxSegmentSize, minSegmentSize, samplesSinks, samplesSinks_Int, segmentsSinks, segmentsSinks_Int, windowSize |
|
Constructor Summary |
TimeSeriesAggregator(int numSeries,
int windowSize,
int minSegmentSize,
int maxSegmentSize)
Constructs all internal buffers and the time series. |
| Methods inherited from class org.openuat.sensors.TimeSeriesBundle |
addNextStageSamplesSink, addNextStageSamplesSink, addNextStageSegmentsSink_Int, addNextStageSegmentsSink, forceToQuiescent, getInitialSinks_Int, getInitialSinks, removeNextStageSamplesSink, removeNextStageSamplesSink, removeNextStageSegmentsSink, removeNextStageSegmentsSink, reset, setActiveVarianceThreshold, setActiveVarianceThreshold, setMultiplicator, setMultiplicator, setOffset, setOffset, setParameters, setParameters, setSubtractTotalMean, setSubtractWindowMean |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeSeriesAggregator
public TimeSeriesAggregator(int numSeries,
int windowSize,
int minSegmentSize,
int maxSegmentSize)
- Constructs all internal buffers and the time series.
- Parameters:
numSeries - The number of time series to use, i.e. the dimensionality
of the input space.windowSize - The time window size to use for detecting active/quiescent
segments. This is specified as the number of samples in the
window.minSegmentSize - The minimum size of an active segment to be regarded
significant enough to be sent to listeners.maxSegmentSize - If set to something other than -1, specifies the
maximum size of an active segments. If an active segment
is longer than this number of samples, it will be sent
to the listeners as soon as it reaches this length. The
remainders of longer segments will be discarded. Set to
-1 to disable this functionality, otherwise must be
>=minSegmentSize.
toActiveFirstLine
protected void toActiveFirstLine(int numSample)
- Specified by:
toActiveFirstLine in class TimeSeriesBundle
toQuiescentLastLine
protected void toQuiescentLastLine(int numSample)
- Specified by:
toQuiescentLastLine in class TimeSeriesBundle
sampleAddedLine
protected void sampleAddedLine(int lineIndex,
double sample,
int numSample)
- Specified by:
sampleAddedLine in class TimeSeriesBundle
sampleAddedLine
protected void sampleAddedLine(int lineIndex,
int sample,
int numSample)
- Specified by:
sampleAddedLine in class TimeSeriesBundle
2005-2009, Rene Mayrhofer.