Top Description Fields Constructors Methods
org.apache.commons.math3.ml.neuralnet.sofm.util

public Class ExponentialDecayFunction

extends Object
Class Inheritance
Imports
org.apache.commons.math3.exception.NotStrictlyPositiveException, .NumberIsTooLargeException, org.apache.commons.math3.util.FastMath

Exponential decay function: a e-x / b, where x is the (integer) independent variable.
Class is immutable.
Since
3.3

Field Summary

Modifier and TypeField and Description
private final double
a

Factor a.

private final double
oneOverB

Factor 1 / b.

Constructor Summary

AccessConstructor and Description
public
ExponentialDecayFunction(double
Initial value, i.e. value(0).
initValue
,
double
Value of the function at numCall.
valueAtNumCall
,
long
Argument for which the function returns valueAtNumCall.
numCall
)

Creates an instance.

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

the value of the function at numCall.
value
(long
Current step of the training task.
numCall
)

Computes a e-numCall / b.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aback to summary
private final double a

Factor a.

oneOverBback to summary
private final double oneOverB

Factor 1 / b.

Constructor Detail

ExponentialDecayFunctionback to summary
public ExponentialDecayFunction(double initValue, double valueAtNumCall, long numCall)

Creates an instance. It will be such that

  • a = initValue
  • b = -numCall / ln(valueAtNumCall / initValue)
Parameters
initValue:double

Initial value, i.e. value(0).

valueAtNumCall:double

Value of the function at numCall.

numCall:long

Argument for which the function returns valueAtNumCall.

Exceptions
NotStrictlyPositiveException:
  • if initValue <= 0.
  • if valueAtNumCall <= 0.
  • if numCall <= 0.
NumberIsTooLargeException:
if valueAtNumCall >= initValue.

Method Detail

valueback to summary
public double value(long numCall)

Computes a e-numCall / b.

Parameters
numCall:long

Current step of the training task.

Returns:double

the value of the function at numCall.