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.
|
static double |
DEFAULTBETA |
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 DEFAULTBETA
public static final double DEFAULTAPPROXTHRESHOLD
public static double softmin(double beta, @NonNull double[] variables)
beta
- Softmin equals min for beta → ∞. 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, @NonNull double[] variables)
beta
- Softmin equals min for beta → ∞. 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)) * beta is set to zero.variables
- the variables x_i.public static double[] calculateSoftminProbabilities(double beta, @NonNull double[] variables)
beta
- Softmin equals min for beta → ∞. 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, @NonNull double[] variables)
beta
- Softmin equals min for beta → ∞. 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)) * beta is set to zero.variables
- the variables x_i.public static double[] calculateSoftminDerivatives(double beta, @NonNull double[] variables)
beta
- Softmin equals min for beta → ∞. 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, @NonNull double[] variables)
beta
- Softmin equals min for beta → ∞. 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)) * beta is set to zero.variables
- the variables x_i.Copyright (C) 2016-2018 Benjamin Paaßen, 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 . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/