public class Normalisation extends Object
double array or
a part of a double array.| Constructor and Description |
|---|
Normalisation() |
| Modifier and Type | Method and Description |
|---|---|
static double |
getLogSum(double... lnVal)
Returns the logarithm of the sum of values
val[i] given as
lnVal[i] = Math.log( val[i] ). |
static double |
getLogSum(int start,
int end,
double... lnVal)
Returns the logarithm of the sum of values
v[i] given as
lnVal[i] = Math.log( val[i] ) between a start and end index. |
static double |
logSumNormalisation(double[] d)
The method does a log-sum-normalisation on the array
d, where
the values of d are assumed to be logarithmised. |
static double |
logSumNormalisation(double[] d,
double offset)
The method does a log-sum-normalisation on the array
d, where
the values of d are assumed to be logarithmised. |
static double |
logSumNormalisation(double[] d,
int startD,
int endD)
The method does a log-sum-normalisation on the values of the array
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double[] secondValues)
The method does a log-sum-normalisation on the values of the array
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double[] secondValues,
double[] dest,
int startDest)
The method does a log-sum-normalisation on the values of the array
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double[] dest,
int startDest)
The method does a log-sum-normalisation on the values of the array
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double offset,
double[] secondValues,
double[] dest,
int startDest)
The method does a log-sum-normalisation on the values of the array
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. |
static double |
logSumNormalisation(double[] d,
int startD,
int endD,
double offset,
double[] dest,
int startDest)
The method does a log-sum-normalisation on the values of the array
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. |
static void |
normalisation(double[] d,
double v)
The method does a normalisation on
d using the value
v for normalisation. |
static void |
normalisation(double[] d,
double v,
double[] dest,
int start)
The method does a normalisation on
d writing the result to
dest starting at position start while
d remains unchanged. |
static void |
normalisation(double[] d,
double v,
int start,
int end)
The method does a sum normalisation on
d between start index
start and end index end using the value
v for the normalisation. |
static double |
sumNormalisation(double[] d)
The method does a sum-normalisation on
d, i.e. |
static double |
sumNormalisation(double[] d,
double[] dest,
int start)
The method does a sum-normalisation on
d, i.e. |
public static double getLogSum(double... lnVal)
val[i] given as
lnVal[i] = Math.log( val[i] ).lnVal - the logs of the values, i.e.
lnVal[i] = Math.log( val[i] )![$\log(\sum_i \mathrm{val}[i])$](images/Normalisation_LaTeXil94_1.png)
getLogSum(int, int, double...)public static double getLogSum(int start,
int end,
double... lnVal)
v[i] given as
lnVal[i] = Math.log( val[i] ) between a start and end index.start - the first index in lnVal considered for the sumend - the index after the last index considered for the sumlnVal - the logs of the values, i.e.
lnVal[i] = Math.log( val[i] )![$\log(\sum_{i=start}^{end - 1} \mathrm{val}[i])$](images/Normalisation_LaTeXil95_1.png)
public static double logSumNormalisation(double[] d)
d, where
the values of d are assumed to be logarithmised.
Let
and
.
Then after log-sum-normalisation, the array d contains the normalized original values, i.e.,
is set to
. The method returns the log-sum of the values,
.d - the array with the logarithmised values that should be
normalised
logSumNormalisation(double[], int, int, double[], int)public static double logSumNormalisation(double[] d,
int startD,
int endD)
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised.
Let
and
.
Then after log-sum-normalisation, the part of the array d between start
index startD and end index endD contains the normalized original values, i.e.,
is set to
. The method returns the log-sum of the values,
.d - the array with the logarithms of the values that should be
normalisedstartD - the first index in d considered for the
log-sum-normalisationendD - the index after the last index in d considered
for the log-sum-normalisationstartD and endD
![$\log(\sum_{i=\mathrm{startD}}^{\mathrm{endD}-1} val[i])$](images/Normalisation_LaTeXil104_1.png)
logSumNormalisation(double[], int, int, double[], int)public static double logSumNormalisation(double[] d,
int startD,
int endD,
double[] secondValues)
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. In addition to d another array of values
secondValues is considered for the normalization constant, but not normalized itself.
Let
and
.
Then after log-sum-normalisation, the part of the array d starting at
index startD contains the normalized original values, i.e.,
is set to
. The method returns the log-sum of the values,
.
The method overwrites the values of d
starting at position startD!.
secondValues will be changed during
log-sum-normalisation and will not be written to d.d - the array with the logarithmised values that should be
normalisedstartD - the first index in d considered for the
log-sum-normalisationendD - the index after the last index in d considered
for the log-sum-normalisationsecondValues - second array with additional values, the whole array is
considered for the log-sum-normalisationd between
startD and endD and the values of
secondValue
public static double logSumNormalisation(double[] d,
int startD,
int endD,
double[] dest,
int startDest)
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised.
Let
and
.
Then after log-sum-normalisation, the part of the array dest starting at
index startDest contains the normalized original values, i.e.,
is set to
where
. The method returns the log-sum of the values,
.
The method writes the result of d in dest
starting at position startDest while d remains
unchanged. secondValues will be changed during
log-sum-normalisation and will not be written to dest.d - the array with the logarithmised values that should be
normalisedstartD - the first index in d considered for the
log-sum-normalisationendD - the index after the last index in d considered
for the log-sum-normalisationdest - the destination array for the normalised valuesstartDest - the start index of the destination arrayd between
startD and endD

public static double logSumNormalisation(double[] d,
int startD,
int endD,
double[] secondValues,
double[] dest,
int startDest)
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. In addition to d another array of values
secondValues is considered for the normalization constant, but not normalized itself.
Let
and
.
Then after log-sum-normalisation, the part of the array dest starting at
index startDest contains the normalized original values, i.e.,
is set to
where
. The method returns the log-sum of the values,
.
The method writes the result of d in dest
starting at position startDest while d remains
unchanged. secondValues will be changed during
log-sum-normalisation and will not be written to dest.d - the array with the logarithmised values that should be
normalisedstartD - the first index in d considered for the
log-sum-normalisationendD - the index after the last index in d considered
for the log-sum-normalisationsecondValues - second array with additional values, the whole array is
considered for the log-sum-normalisationdest - the destination array for the normalised valuesstartDest - the start index of the destination arrayd between
startD and endD and the values of
secondValue
public static double logSumNormalisation(double[] d,
double offset)
d, where
the values of d are assumed to be logarithmised.
Let
and
.
Then after log-sum-normalisation, the array d contains the normalized original values, i.e.,
is set to
. The method returns the log-sum of the values,
.d - the array with the logarithmised values that should be
normalisedoffset - the offset on the log-values which is used to get more accurate results in
the normalization. Typically, this is set to the maximum of the log-values.
logSumNormalisation(double[], int, int, double[], int)public static double logSumNormalisation(double[] d,
int startD,
int endD,
double offset,
double[] dest,
int startDest)
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised.
Let
and
.
Then after log-sum-normalisation, the part of the array dest starting at
index startDest contains the normalized original values, i.e.,
is set to
where
. The method returns the log-sum of the values,
.
The method writes the result of d in dest
starting at position startDest while d remains
unchanged. secondValues will be changed during
log-sum-normalisation and will not be written to dest.d - the array with the logarithmised values that should be
normalisedstartD - the first index in d considered for the
log-sum-normalisationendD - the index after the last index in d considered
for the log-sum-normalisationoffset - the offset on the log-values which is used to get more accurate results in
the normalization. Typically, this is set to the maximum of the log-values.dest - the destination array for the normalised valuesstartDest - the start index of the destination arrayd between
startD and endD

public static double logSumNormalisation(double[] d,
int startD,
int endD,
double offset,
double[] secondValues,
double[] dest,
int startDest)
d between start
index startD and end index endD, where
the values of d are assumed to be logarithmised. In addition to d another array of values
secondValues is considered for the normalization constant, but not normalized itself.
Let
and
.
Then after log-sum-normalisation, the part of the array dest starting at
index startDest contains the normalized original values, i.e.,
is set to
where
. The method returns the log-sum of the values,
.
The method writes the result of d in dest
starting at position startDest while d remains
unchanged. secondValues will be changed during
log-sum-normalisation and will not be written to dest.d - the array with the logarithmised values that should be
normalisedstartD - the first index in d considered for the
log-sum-normalisationendD - the index after the last index in d considered
for the log-sum-normalisationoffset - the offset on the log-values which is used to get more accurate results in
the normalization. Typically, this is set to the maximum of the log-values.secondValues - second array with additional values, the whole array is
considered for the log-sum-normalisationdest - the destination array for the normalised valuesstartDest - the start index of the destination arrayd between
startD and endD and the values of
secondValue
public static double sumNormalisation(double[] d)
d, i.e. divides all values
in d by the sum over all values in d and returns the
sum of the values.d - the array with the values that should be normalisedd
![$\sum_{i=0}^{\mathrm{length}(d)-1} d[i]$](images/Normalisation_LaTeXil112_1.png)
sumNormalisation(double[], double[], int)public static double sumNormalisation(double[] d,
double[] dest,
int start)
d, i.e. divides all values
in d by the sum over all values in d
and writes the result to dest starting at position
start while d remains unchanged. The sum of the
values of d will be returned.d - the array with the values that should be normaliseddest - the destination array for the normalised valuesstart - the start index of the destination arrayd
![$\sum_{i=0}^{\mathrm{length}(d)-1} d[i] $](images/Normalisation_LaTeXil113_1.png)
public static void normalisation(double[] d,
double v)
d using the value
v for normalisation.d - the array with the values that should be normalisedv - the value for the normalisationnormalisation(double[], double, double[], int)public static void normalisation(double[] d,
double v,
double[] dest,
int start)
d writing the result to
dest starting at position start while
d remains unchanged. The value v is used for
the normalisation.d - the array with the values that should be normalisedv - the value for normalisationdest - the destination array for the normalised valuesstart - the start index of the destination arraypublic static void normalisation(double[] d,
double v,
int start,
int end)
d between start index
start and end index end using the value
v for the normalisation.d - the array with the values that should be normalisedv - the value for normalisationstart - the first index in d considered for the
log-sum-normalisationend - the index after the last index in d considered
for the log-sum-normalisation