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 doubleapplyAsDouble(long numCall)Computes the value of the learning factor.
-
-
-
Constructor Detail
-
QuasiSigmoidDecayFunction
public QuasiSigmoidDecayFunction(double initValue, double slope, long numCall)
Creates an instance. The functionfwill have the following properties:f(0) = initValuenumCallis 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 >= 0ornumCall <= 0.
-
-
Method Detail
-
applyAsDouble
public double applyAsDouble(long numCall)
Computes the value of the learning factor.- Specified by:
applyAsDoublein interfaceLongToDoubleFunction- Parameters:
numCall- Current step of the training task.- Returns:
- the value of the function at
numCall.
-
-