Class QuasiSigmoidDecayFunction
- java.lang.Object
-
- org.apache.commons.math4.neuralnet.sofm.util.QuasiSigmoidDecayFunction
-
- All Implemented Interfaces:
LongToDoubleFunction
public class QuasiSigmoidDecayFunction extends Object implements LongToDoubleFunction
Decay function whose shape is similar to a sigmoid.
Class is immutable.- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description QuasiSigmoidDecayFunction(double initValue, double slope, long numCall)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
applyAsDouble(long numCall)
Computes the value of the learning factor.
-
-
-
Constructor Detail
-
QuasiSigmoidDecayFunction
public QuasiSigmoidDecayFunction(double initValue, double slope, long numCall)
Creates an instance. The functionf
will have the following properties:f(0) = initValue
numCall
is the inflexion pointslope = f'(numCall)
- Parameters:
initValue
- Initial value, i.e.applyAsDouble(0)
.slope
- Value of the function derivative atnumCall
.numCall
- Inflexion point.- Throws:
IllegalArgumentException
- ifinitValue <= 0
,slope >= 0
ornumCall <= 0
.
-
-
Method Detail
-
applyAsDouble
public double applyAsDouble(long numCall)
Computes the value of the learning factor.- Specified by:
applyAsDouble
in interfaceLongToDoubleFunction
- Parameters:
numCall
- Current step of the training task.- Returns:
- the value of the function at
numCall
.
-
-