Class NeighbourhoodSizeFunctionFactory
java.lang.Object
org.apache.commons.math3.ml.neuralnet.sofm.NeighbourhoodSizeFunctionFactory
Factory for creating instances of
NeighbourhoodSizeFunction.- Since:
- 3.3
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateClass contains only static methods. -
Method Summary
Modifier and TypeMethodDescriptionstatic NeighbourhoodSizeFunctionexponentialDecay(double initValue, double valueAtNumCall, long numCall) Creates an exponential decayfunction.static NeighbourhoodSizeFunctionquasiSigmoidDecay(double initValue, double slope, long numCall) Creates an sigmoid-likeNeighbourhoodSizeFunction function.
-
Constructor Details
-
NeighbourhoodSizeFunctionFactory
private NeighbourhoodSizeFunctionFactory()Class contains only static methods.
-
-
Method Details
-
exponentialDecay
public static NeighbourhoodSizeFunction 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 neighbourhood size function.
- Throws:
NotStrictlyPositiveException- ifinitValue <= 0.NotStrictlyPositiveException- ifvalueAtNumCall <= 0.NumberIsTooLargeException- ifvalueAtNumCall >= initValue.NotStrictlyPositiveException- ifnumCall <= 0.
-
quasiSigmoidDecay
public static NeighbourhoodSizeFunction quasiSigmoidDecay(double initValue, double slope, long numCall) Creates an sigmoid-likeNeighbourhoodSizeFunction 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 neighbourhood size function.
- Throws:
NotStrictlyPositiveException- ifinitValue <= 0.NumberIsTooLargeException- ifslope >= 0.NotStrictlyPositiveException- ifnumCall <= 0.
-