|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.android.activityminer.logic.classification.NormalizerForDataPoints
public final class NormalizerForDataPoints
Normalizer for Data points
Field Summary | |
---|---|
private int |
dimensions
The point dimensions. |
private double[][] |
dimValueRanges
The array with the cached value range information (minimum, maximum and range) per point dimension. |
static int |
MAX
Index of the value range maximum. |
static int |
MIN
Index of the value range minimum. |
static int |
RANGE
Index of the value range maximum. |
Constructor Summary | |
---|---|
NormalizerForDataPoints(int dimensions)
Constructor |
Method Summary | |
---|---|
double[] |
getRangeInfo(int idx)
Getter for the range info of a given dimension index |
private void |
initializeValueRangeInfo(double[] point)
Method to initialize the range information by a new data point. |
double[] |
normalize(double[] point)
Point value normalization based on the stored range information. |
private double |
normalize(double value,
int idx)
Normalization of a single dimension value. |
void |
prepareWithTrainingData(Set<? extends Activity> trainingSet)
Preparation with a training data set |
void |
setRangeInfo(int idx,
double min,
double max)
Setter for the range info of a given dimension index |
private void |
updateValueRangeInfo(double[] point)
Method to update the stored range information by a new data point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN
public static final int MAX
public static final int RANGE
private final double[][] dimValueRanges
private final int dimensions
Constructor Detail |
---|
public NormalizerForDataPoints(int dimensions)
dimensions
- the point dimensionsMethod Detail |
---|
public final double[] normalize(double[] point)
Normalizer
normalize
in interface Normalizer
point
- the data point
private final double normalize(double value, int idx)
value
- the valueidx
- the dimension index of the value
public final double[] getRangeInfo(int idx)
idx
- the dimension index
public final void setRangeInfo(int idx, double min, double max)
idx
- the dimension indexmin
- the minimummax
- the maximumpublic final void prepareWithTrainingData(Set<? extends Activity> trainingSet)
Normalizer
prepareWithTrainingData
in interface Normalizer
trainingSet
- the training data setprivate void initializeValueRangeInfo(double[] point)
point
- the new data pointprivate final void updateValueRangeInfo(double[] point)
point
- the new data point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |