|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.android.activityminer.logic.features.AbstractFeatureFactory<T>
T
- the enumeration type for the dimensionspublic abstract class AbstractFeatureFactory<T extends Enum<T> & Dimensions>
A factory to construct the necessary runtime representation of features and their associated calculators for a given set of feature types.
Field Summary | |
---|---|
private Context |
context
The context. |
private SparseArray<Feature> |
featureMap
The type to feature map |
private SparseArray<List<AbstractCalculator<T,?>>> |
mapDimension2Calculator
The dimension to calculator map |
private SparseArray<List<AbstractCalculator<SensorObservationDimensions,?>>> |
mapSpecificDimension2Calculator
The sensor dimension to calculator map (for specific location based dimensions ) |
Constructor Summary | |
---|---|
AbstractFeatureFactory(Context context)
Constructor |
Method Summary | ||
---|---|---|
FeatureExtractionConfiguration<T> |
create(FeatureTypes[] featureTypes,
long sampleRate)
Method to create the necessary feature and calculator types for the extraction of a given set of feature types. |
|
private static
|
getCalculator(SparseArray<List<AbstractCalculator<T,?>>> mapDimension2Calculator,
int dimension,
Type calculatorType)
Does lookup a calculator class in the calculator map for the given dimension. |
|
abstract T |
getDimensionForId(int id)
Getter for the dimension type of an unique dimension identifier |
|
private DimensionValueCache<T> |
getDimensionValueCache(T dimension)
Does lookup a feature value cache in the calculator map for the given dimension. |
|
private Feature[] |
getFeatures()
Getter for the feature map content |
|
private FFTCalculator<T> |
getFFTCalculator(T dimension)
Does lookup the FFT calculator in the calculator map. |
|
private FFTEnergyCalculator<T> |
getFFTEnergyCalculator(T dimension)
Does lookup the FFT energy calculator in the calculator map. |
|
private FFTEntropyCalculator<T> |
getFFTEntropyCalculator(T dimension)
Does lookup the FFT entropy calculator in the calculator map. |
|
private FFTPeakCalculator<T> |
getFFTPeakCalculator(T dimension,
long sampleRate)
Does lookup the FFT peak calculator in the calculator map. |
|
private MaxDistanceInLocationsCalculator |
getMaxDistanceInLocationsCalculator()
Does lookup the max distance in location calculator in the calculator map. |
|
private MaximumCalculator<T> |
getMaximumCalculator(T dimension)
Does lookup a maximum calculator in the calculator map for the given dimension. |
|
private MeanCalculator<T> |
getMeanCalculator(T dimension)
Does lookup a mean calculator in the calculator map for the given dimension. |
|
private MeanCrossingRateCalculator<T> |
getMeanCrossingRateCalculator(T dimension)
Does lookup the mean crossing rate calculator in the calculator map for the given dimension. |
|
private MinimumCalculator<T> |
getMinimumCalculator(T dimension)
Does lookup a minimum calculator in the calculator map for the given dimension. |
|
private SensorObservationCounter<T> |
getSensorObservationCounter()
Does lookup the sensor observation counter in the calculator map. |
|
private SumCalculator<T> |
getSumCalculator(T dimension)
Does lookup a sum calculator in the calculator map for the given dimension. |
|
private VarianceCalculator<T> |
getVarianceCalculator(T dimension)
Does lookup the variance calculator in the calculator map for the given dimension. |
|
protected boolean |
isValid(FeatureTypes featureType)
Test method if a feature type is valid for the known dimensions |
|
PreparationCalculator<T> |
newPreparationCalculator()
Does create a preparation calculator to extract |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final SparseArray<Feature> featureMap
private final SparseArray<List<AbstractCalculator<T extends Enum<T> & Dimensions,?>>> mapDimension2Calculator
private final SparseArray<List<AbstractCalculator<SensorObservationDimensions,?>>> mapSpecificDimension2Calculator
private final Context context
Constructor Detail |
---|
public AbstractFeatureFactory(Context context)
context
- the contextMethod Detail |
---|
public abstract T getDimensionForId(int id)
id
- the dimension identifier
DimensionIds
public final FeatureExtractionConfiguration<T> create(FeatureTypes[] featureTypes, long sampleRate)
featureTypes
- the feature types to create features forsampleRate
- the configured sample rate
private Feature[] getFeatures()
public final PreparationCalculator<T> newPreparationCalculator()
protected boolean isValid(FeatureTypes featureType)
featureType
- the feature type
private final FFTEntropyCalculator<T> getFFTEntropyCalculator(T dimension)
dimension
- the dimension
private final FFTEnergyCalculator<T> getFFTEnergyCalculator(T dimension)
dimension
- the dimension
private final FFTPeakCalculator<T> getFFTPeakCalculator(T dimension, long sampleRate)
dimension
- the dimensionsampleRate
- the sample rate as time-stamp delta in milliseconds between two
observations
private final FFTCalculator<T> getFFTCalculator(T dimension)
dimension
- the dimension
private final MaxDistanceInLocationsCalculator getMaxDistanceInLocationsCalculator()
private final MeanCrossingRateCalculator<T> getMeanCrossingRateCalculator(T dimension)
dimension
- the dimension
private final SensorObservationCounter<T> getSensorObservationCounter()
private final VarianceCalculator<T> getVarianceCalculator(T dimension)
dimension
- the dimension
private final MeanCalculator<T> getMeanCalculator(T dimension)
dimension
- the dimension
private final DimensionValueCache<T> getDimensionValueCache(T dimension)
dimension
- the dimension
private final MaximumCalculator<T> getMaximumCalculator(T dimension)
dimension
- the dimension
private final MinimumCalculator<T> getMinimumCalculator(T dimension)
dimension
- the dimension
private final SumCalculator<T> getSumCalculator(T dimension)
dimension
- the dimension
private static final <T extends Enum<T> & Dimensions,S extends AbstractCalculator<T,?>> S getCalculator(SparseArray<List<AbstractCalculator<T,?>>> mapDimension2Calculator, int dimension, Type calculatorType)
S
- the time series calculator typeT
- the enumeration type for the dimensionsmapDimension2Calculator
- the mapdimension
- the dimensioncalculatorType
- the calculator type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |