

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object de.jstacs.utils.Normalisation
public class Normalisation
This class can be used for normalisation of any double
array or
a part of a double
array.
Constructor Summary  

Normalisation()

Method Summary  

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 logsumnormalisation 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 logsumnormalisation 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 logsumnormalisation 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 logsumnormalisation 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 logsumnormalisation 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 logsumnormalisation 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 logsumnormalisation 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 logsumnormalisation 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 sumnormalisation on d , i.e. 
static double 
sumNormalisation(double[] d,
double[] dest,
int start)
The method does a sumnormalisation on d , i.e. 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public Normalisation()
Method Detail 

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] )
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] )
public static double logSumNormalisation(double[] d)
d
, where
the values of d
are assumed to be logarithmised.
Let and .
Then after logsumnormalisation, the array d
contains the normalized original values, i.e., is set to
. The method returns the logsum 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 logsumnormalisation, 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 logsum of the values, .
d
 the array with the logarithms of the values that should be
normalisedstartD
 the first index in d
considered for the
logsumnormalisationendD
 the index after the last index in d
considered
for the logsumnormalisation
startD
and endD
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 logsumnormalisation, the part of the array d
starting at
index startD
contains the normalized original values, i.e., is set to
. The method returns the logsum of the values, .
The method overwrites the values of d
starting at position startD
!.
secondValues
will be changed during
logsumnormalisation 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
logsumnormalisationendD
 the index after the last index in d
considered
for the logsumnormalisationsecondValues
 second array with additional values, the whole array is
considered for the logsumnormalisation
d
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 logsumnormalisation, 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 logsum 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
logsumnormalisation 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
logsumnormalisationendD
 the index after the last index in d
considered
for the logsumnormalisationdest
 the destination array for the normalised valuesstartDest
 the start index of the destination array
d
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 logsumnormalisation, 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 logsum 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
logsumnormalisation 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
logsumnormalisationendD
 the index after the last index in d
considered
for the logsumnormalisationsecondValues
 second array with additional values, the whole array is
considered for the logsumnormalisationdest
 the destination array for the normalised valuesstartDest
 the start index of the destination array
d
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 logsumnormalisation, the array d
contains the normalized original values, i.e., is set to
. The method returns the logsum of the values, .
d
 the array with the logarithmised values that should be
normalisedoffset
 the offset on the logvalues which is used to get more accurate results in
the normalization. Typically, this is set to the maximum of the logvalues.
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 logsumnormalisation, 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 logsum 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
logsumnormalisation 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
logsumnormalisationendD
 the index after the last index in d
considered
for the logsumnormalisationoffset
 the offset on the logvalues which is used to get more accurate results in
the normalization. Typically, this is set to the maximum of the logvalues.dest
 the destination array for the normalised valuesstartDest
 the start index of the destination array
d
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 logsumnormalisation, 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 logsum 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
logsumnormalisation 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
logsumnormalisationendD
 the index after the last index in d
considered
for the logsumnormalisationoffset
 the offset on the logvalues which is used to get more accurate results in
the normalization. Typically, this is set to the maximum of the logvalues.secondValues
 second array with additional values, the whole array is
considered for the logsumnormalisationdest
 the destination array for the normalised valuesstartDest
 the start index of the destination array
d
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 normalised
d
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 array
d
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
logsumnormalisationend
 the index after the last index in d
considered
for the logsumnormalisation


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