|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.android.activityminer.model.configuration.MathUtils
public class MathUtils
Class to hold mathematical constants & functions.
| Field Summary | |
|---|---|
static Double |
DOUBLE_NAN
NaN Double constant |
static Double |
DOUBLE_NEGATIVE_INFINITY
- infinity Double constant |
static Double |
DOUBLE_POSITIVE_INFINITY
+ infinity Double constant |
static double |
DOUBLE_PRECISION
The double comparision precision |
static Double |
DOUBLE_ZERO
Zero Double constant |
static Integer |
INTEGER_ZERO
Zero Integer constant |
static double |
LOG2
The logarithm of two. |
static Long |
LONG_NEGATIVE_ONE
-1 Long constant |
static Long |
LONG_ZERO
Zero Long constant |
static double |
SQRT2
The square root of two. |
| Constructor Summary | |
|---|---|
MathUtils()
|
|
| Method Summary | |
|---|---|
static double |
conditionalRowEntropy(double[][] matrix)
Computes the conditional not normalized(!) |
static double |
entropieFunction(double p)
Entropy function wrapper to calculate p * log(p) |
static double |
entropy(double[] values)
Does calculate the entropy for the given values. |
static double |
entropyFromEntropyValueSumAndTotalSum(double entropyValueSum,
double totalValueSum)
Method to calculate entropy from the sum of single entropy function values and the total value sum |
static boolean |
equalsWithPrecision(double x,
double y)
Does compare two double values with precision |
static double |
log2(double value)
Calculates the logarithm for base 2 |
static double |
mean(double[] values)
Mean calculation. |
static double |
symmetricalUncertainty(double[][] matrix)
Calculates the symmetrical uncertainty for a given matrix. |
static double |
variance(double[] values,
double mean)
Variance calculation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double LOG2
public static final double SQRT2
public static final double DOUBLE_PRECISION
public static final Double DOUBLE_ZERO
public static final Double DOUBLE_NAN
public static final Double DOUBLE_POSITIVE_INFINITY
public static final Double DOUBLE_NEGATIVE_INFINITY
public static final Integer INTEGER_ZERO
public static final Long LONG_ZERO
public static final Long LONG_NEGATIVE_ONE
| Constructor Detail |
|---|
public MathUtils()
| Method Detail |
|---|
public static final boolean equalsWithPrecision(double x,
double y)
x - the first valuey - the second value
public static final double entropy(double[] values)
values - the values of the variable
public static final double entropyFromEntropyValueSumAndTotalSum(double entropyValueSum,
double totalValueSum)
entropyValueSum - the sum of entropy function valuestotalValueSum - the total value sum
public static final double entropieFunction(double p)
p - the value
public static double log2(double value)
value -
public static final double conditionalRowEntropy(double[][] matrix)
matrix - the matrix
public static final double symmetricalUncertainty(double[][] matrix)
matrix - the matrix
public static double mean(double[] values)
values - the values
public static double variance(double[] values,
double mean)
values - the valuesmean - the mean of the values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||