|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
de.unikassel.android.sdcframework.util.AbstractWorkerThread
de.unikassel.android.sdcframework.util.AbstractEventDispatcherImpl<SensorObservationCutout<T,Double>,FeatureVector>
org.android.activityminer.logic.features.AbstractFeatureExtractor<T>
org.android.activityminer.logic.features.AbstractCutoutFeatureExtractor<T>
org.android.activityminer.logic.features.AbstractFeatureExtractorForDBRecordings<T>
T
- the enumeration type for the dimensionspublic abstract class AbstractFeatureExtractorForDBRecordings<T extends Enum<T> & Dimensions>
A abstract feature extractor implementation to extract features from the
labeled
time series recordings.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private List<FeatureVector> |
resultList
The list to store extracted feature while processing samples. |
private long |
sampleRate
The sample rate. |
protected ObservableEventSource<SensorObservation<T,Double>> |
sensorObservationSource
The observable sensor observation source source to attach to the cutOut creator. |
Fields inherited from class de.unikassel.android.sdcframework.util.AbstractEventDispatcherImpl |
---|
collector |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AbstractFeatureExtractorForDBRecordings(long windowSize,
int overlap,
FeatureTypes[] featureTypes,
long sampleRate,
Context context)
Constructor |
Method Summary | |
---|---|
Long |
continuousExtractFeatures(SensorObservationCutout<T,Double> cutOut)
Method to add a single raw time series cut-out during continuous feature extraction from a recorded sequence. |
protected abstract SensorObservation<T,Double> |
createObservationFromCutOut(SensorObservationCutout<T,Double> cutOut,
int i,
Long ts)
Does create a sensor observation from a cut-out window at a given index with a given time stamp |
List<FeatureVector> |
extractFeatures(LabeledRecording<T> recording)
Method to extract the features from a single raw time series recording. |
boolean |
hasNotDone()
Method to determinate the finished state. |
protected void |
onActivationStateChange(boolean active)
Handler for activation state changes |
void |
onEvent(ObservableEventSource<? extends FeatureVector> eventSource,
FeatureVector observedEvent)
|
void |
startContinuousFeatureExtraction(EventObserver<FeatureVector> featureVectorObserver)
Method to start continuous feature extraction |
void |
stopContinuousFeatureExtraction(Long lastTs)
Method to stop continuous feature extraction and wait until last window was processed |
void |
waitUnitlDone()
Method to wait until all observations and cut-outs are processed |
Methods inherited from class org.android.activityminer.logic.features.AbstractCutoutFeatureExtractor |
---|
attachSensorObservationSource, detachSensorObservationSource, getCutoutSource, getOverlapSize, getQueuedObservationCount, getWindowSize, onDestroy, setWindowSize |
Methods inherited from class org.android.activityminer.logic.features.AbstractFeatureExtractor |
---|
doWork, featureTypeConfiguration, getExtractionTime, getFactory, getQueuedCutoutCount, isActive, isEctracting, setActivationState |
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractEventDispatcherImpl |
---|
doCleanUp, getCollector, getEventSource, hasObservers, notify, registerEventObserver, removeAllObservers, unregisterEventObserver |
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractWorkerThread |
---|
doTerminate, hasTerminated, isLogging, isWorking, logMessage, run, setLogging, start, startWork, stopWork |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ObservableEventSource |
---|
hasObservers, notify |
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ObserverRegistration |
---|
registerEventObserver, removeAllObservers, unregisterEventObserver |
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.WorkerThread |
---|
doTerminate, hasTerminated, isLogging, isWorking, setLogging, startWork, stopWork |
Field Detail |
---|
private List<FeatureVector> resultList
private long sampleRate
protected final ObservableEventSource<SensorObservation<T extends Enum<T> & Dimensions,Double>> sensorObservationSource
Constructor Detail |
---|
public AbstractFeatureExtractorForDBRecordings(long windowSize, int overlap, FeatureTypes[] featureTypes, long sampleRate, Context context)
windowSize
- the size of the window to extract features from, which is
moved over the raw time series streamoverlap
- the overlap in percent of continuous cut-outsfeatureTypes
- the types of the features to extract from the time series datasampleRate
- the configured sample ratecontext
- the contextMethod Detail |
---|
public final void startContinuousFeatureExtraction(EventObserver<FeatureVector> featureVectorObserver)
featureVectorObserver
- the observer for the extracted features vectorspublic final void stopContinuousFeatureExtraction(Long lastTs)
lastTs
- the time stamp of the last processed observationpublic void waitUnitlDone()
public final Long continuousExtractFeatures(SensorObservationCutout<T,Double> cutOut)
startContinuousFeatureExtraction(EventObserver)
before the first
call to this method. After the last call to this method
stopContinuousFeatureExtraction(Long)
must be called.
cutOut
- a segment of continuous sensor observations to create cut-outs and extract features from
public final List<FeatureVector> extractFeatures(LabeledRecording<T> recording)
recording
- the recording with the frame holding the raw time series data.
protected abstract SensorObservation<T,Double> createObservationFromCutOut(SensorObservationCutout<T,Double> cutOut, int i, Long ts)
cutOut
- the cut-out to create the sensor observation fromi
- the indexts
- the time stamp
public final boolean hasNotDone()
public final void onEvent(ObservableEventSource<? extends FeatureVector> eventSource, FeatureVector observedEvent)
onEvent
in interface EventObserver<FeatureVector>
protected final void onActivationStateChange(boolean active)
AbstractFeatureExtractor
onActivationStateChange
in class AbstractCutoutFeatureExtractor<T extends Enum<T> & Dimensions>
active
- the new activation state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |