|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openuat.sensors.TimeSeriesAggregator
public class TimeSeriesAggregator
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.
| Constructor Summary | |
|---|---|
TimeSeriesAggregator(int numSeries,
int windowSize,
int minSegmentSize,
int maxSegmentSize)
Constructs all internal buffers and the time series. |
|
| Method Summary | |
|---|---|
void |
addNextStageSamplesSink(SamplesSink sink)
Registers a sink which will receive all samples within active segments immediately after they have been aggregated into one dimension. |
void |
addNextStageSegmentsSink(SegmentsSink sink)
Registers a sink which will receive all active segments when they are complete. |
SamplesSink[] |
getInitialSinks()
Returns the first stage sink objects that can be registered with the samples source. |
boolean |
removeNextStageSamplesSink(SamplesSink sink)
Removes a previously registered sink. |
boolean |
removeNextStageSegmentsSink(SegmentsSink sink)
Removes a previously registered sink. |
void |
reset()
Resets the time series to the state as created when freshly constructing it. |
void |
setActiveVarianceThreshold(double activeVarianceThreshold)
Sets the activeVarianceThreshold for all internally kept time series. |
void |
setMultiplicator(double multiplicator)
Sets the multiplicator for all internally kept time series. |
void |
setOffset(double offset)
Sets the offset for all internally kept time series. |
void |
setSubtractTotalMean(boolean subtractTotalMean)
Sets the subtractTotalMean for all internally kept time series. |
void |
setSubtractWindowMean(boolean subtractWindowMean)
Sets the subtractWindowMean for all internally kept time series. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeSeriesAggregator(int numSeries,
int windowSize,
int minSegmentSize,
int maxSegmentSize)
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.| Method Detail |
|---|
public void reset()
public SamplesSink[] getInitialSinks()
public void setOffset(double offset)
TimeSeries.setOffset(double)public void setMultiplicator(double multiplicator)
TimeSeries.setMultiplicator(double)public void setSubtractWindowMean(boolean subtractWindowMean)
TimeSeries.setSubtractWindowMean(boolean)public void setSubtractTotalMean(boolean subtractTotalMean)
TimeSeries.setSubtractTotalMean(boolean)public void setActiveVarianceThreshold(double activeVarianceThreshold)
TimeSeries.setActiveVarianceThreshold(double)public void addNextStageSegmentsSink(SegmentsSink sink)
sink - The sink to push new aggregated segments to.public boolean removeNextStageSegmentsSink(SegmentsSink sink)
sink - The sink to stop pushing segments to.
public void addNextStageSamplesSink(SamplesSink sink)
sink - The sink to push new aggregated segments to.public boolean removeNextStageSamplesSink(SamplesSink sink)
sink - The sink to stop pushing segments to.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||