public class Softmin extends Object
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULTAPPROXTHRESHOLD
This means that softmin arguments with a weight smaller than 10^-3 will
be disregarded.
|
Constructor and Description |
---|
Softmin() |
Modifier and Type | Method and Description |
---|---|
static double[] |
calculateSoftminDerivatives(double beta,
double[] variables)
Calculates the softmin'(x_i) function for all variables x_i in the
given input.
|
static double[] |
calculateSoftminDerivatives(double beta,
double approxThreshold,
double[] variables)
Calculates the softmin'(x_i) function for all variables x_i in the
given input.
|
static double[] |
calculateSoftminProbabilities(double beta,
double[] variables)
Calculates the softmin probabilities p_i for the given beta and
the given variables.
|
static double[] |
calculateSoftminProbabilities(double beta,
double approxThreshold,
double[] variables)
Calculates the softmin probabilities p_i for the given beta and
the given variables.
|
static double |
softmin(double beta,
double[] variables)
This calculates softmin for the given input and the given value
of beta.
|
static double |
softmin(double beta,
double approxThreshold,
double[] variables)
This calculates softmin for the given input and the given value
of beta.
|
public static final double DEFAULTAPPROXTHRESHOLD
public static double softmin(double beta, double[] variables)
beta
- Softmin equals min for beta towards infinity. For beta = 0
softmin returns the average of the given input arguments. Thus beta
regulates the "strictness" of the softmin approximation.variables
- the variables x_i.public static double softmin(double beta, double approxThreshold, double[] variables)
beta
- Softmin equals min for beta towards infinity. For beta = 0
softmin returns the average of the given input arguments. Thus beta
regulates the "strictness" of the softmin approximation.approxThreshold
- a threshold where a softmin weight should be
approximated with zero. The threshold refers to the exponent of the
softmin weight. The exact definition is: If
(x_i - min(x_1, ... , x_n)) * beta > approxThreshold
then
exp(x_i - min(x_1, ... , x_n)) * betavariables
- the variables x_i.public static double[] calculateSoftminProbabilities(double beta, double[] variables)
beta
- Softmin equals min for beta towards infinity. For beta = 0
softmin returns the average of the given input arguments. Thus beta
regulates the "strictness" of the softmin approximation.variables
- the variables x_i.public static double[] calculateSoftminProbabilities(double beta, double approxThreshold, double[] variables)
beta
- Softmin equals min for beta towards infinity. For beta = 0
softmin returns the average of the given input arguments. Thus beta
regulates the "strictness" of the softmin approximation.approxThreshold
- a threshold where a softmin weight should be
approximated with zero. The threshold refers to the exponent of the
softmin weight. The exact definition is: If
(x_i - min(x_1, ... , x_n)) * beta > approxThreshold
then
exp(x_i - min(x_1, ... , x_n)) * betavariables
- the variables x_i.public static double[] calculateSoftminDerivatives(double beta, double[] variables)
beta
- Softmin equals min for beta towards infinity. For beta = 0
softmin returns the average of the given input arguments. Thus beta
regulates the "strictness" of the softmin approximation.variables
- the variables x_i.public static double[] calculateSoftminDerivatives(double beta, double approxThreshold, double[] variables)
beta
- Softmin equals min for beta towards infinity. For beta = 0
softmin returns the average of the given input arguments. Thus beta
regulates the "strictness" of the softmin approximation.approxThreshold
- a threshold where a softmin weight should be
approximated with zero. The threshold refers to the exponent of the
softmin weight. The exact definition is: If
(x_i - min(x_1, ... , x_n)) * beta > approxThreshold
then
exp(x_i - min(x_1, ... , x_n)) * betavariables
- the variables x_i.Copyright (C) 2013, 2014 Benjamin Paaßen, Charlie Krüger, Georg Zentgraf, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs