Class LearningFactorFunctionFactory
- java.lang.Object
-
- org.apache.commons.math4.neuralnet.sofm.LearningFactorFunctionFactory
-
public final class LearningFactorFunctionFactory extends Object
Factory for creating instances ofLearningFactorFunction.- Since:
- 3.3
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LearningFactorFunctionexponentialDecay(double initValue, double valueAtNumCall, long numCall)Creates an exponential decayfunction.static LearningFactorFunctionquasiSigmoidDecay(double initValue, double slope, long numCall)Creates an sigmoid-likeLearningFactorFunction function.
-
-
-
Method Detail
-
exponentialDecay
public static LearningFactorFunction exponentialDecay(double initValue, double valueAtNumCall, long numCall)
Creates an exponential decayfunction. It will computea e-x / b, wherexis the (integer) independent variable anda = initValueb = -numCall / ln(valueAtNumCall / initValue)
- Parameters:
initValue- Initial value, i.e.value(0).valueAtNumCall- Value of the function atnumCall.numCall- Argument for which the function returnsvalueAtNumCall.- Returns:
- the learning factor function.
- Throws:
IllegalArgumentException- ifinitValue <= 0,initValue > 1valueAtNumCall <= 0,valueAtNumCall >= initValueornumCall <= 0.
-
quasiSigmoidDecay
public static LearningFactorFunction quasiSigmoidDecay(double initValue, double slope, long numCall)
Creates an sigmoid-likeLearningFactorFunction function. The functionfwill have the following properties:f(0) = initValuenumCallis the inflexion pointslope = f'(numCall)
- Parameters:
initValue- Initial value, i.e.value(0).slope- Value of the function derivative atnumCall.numCall- Inflexion point.- Returns:
- the learning factor function.
- Throws:
IllegalArgumentException- ifinitValue <= 0,initValue > 1,slope >= 0ornumCall <= 0.
-
-