Top Description Constructors Methods
org.apache.commons.math3.ml.neuralnet

public Class FeatureInitializerFactory

extends Object
Class Inheritance
Imports
org.apache.commons.math3.distribution.RealDistribution, .UniformRealDistribution, org.apache.commons.math3.analysis.UnivariateFunction, org.apache.commons.math3.analysis.function.Constant, org.apache.commons.math3.random.RandomGenerator

Creates functions that will select the initial values of a neuron's features.
Since
3.3

Constructor Summary

AccessConstructor and Description
private
FeatureInitializerFactory()

Class contains only static methods.

Method Summary

Modifier and TypeMethod and Description
public static FeatureInitializer

Returns:

the initializer.
function
(final UnivariateFunction
Function.
f
,
final double
Initial value.
init
,
final double
Increment
inc
)

Creates an initializer from a univariate function f(x).

public static FeatureInitializer

Returns:

an initializer whose value method will return orig.value() + random.sample().
randomize
(final RealDistribution
Random variable distribution.
random
,
final FeatureInitializer
Original initializer.
orig
)

Adds some amount of random data to the given initializer.

public static FeatureInitializer

Returns:

an initializer such that the features will be initialized with values within the given range.
uniform
(final RandomGenerator
Random number generator used to draw samples from a uniform distribution.
rng
,
final double
Lower bound of the range.
min
,
final double
Upper bound of the range.
max
)

Uniform sampling of the given range.

public static FeatureInitializer

Returns:

an initializer such that the features will be initialized with values within the given range.
uniform
(final double
Lower bound of the range.
min
,
final double
Upper bound of the range.
max
)

Uniform sampling of the given range.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FeatureInitializerFactoryback to summary
private FeatureInitializerFactory()

Class contains only static methods.

Method Detail

functionback to summary
public static FeatureInitializer function(final UnivariateFunction f, final double init, final double inc)

Creates an initializer from a univariate function f(x). The argument x is set to init at the first call and will be incremented at each call.

Parameters
f:UnivariateFunction

Function.

init:double

Initial value.

inc:double

Increment

Returns:FeatureInitializer

the initializer.

randomizeback to summary
public static FeatureInitializer randomize(final RealDistribution random, final FeatureInitializer orig)

Adds some amount of random data to the given initializer.

Parameters
random:RealDistribution

Random variable distribution.

orig:FeatureInitializer

Original initializer.

Returns:FeatureInitializer

an initializer whose value method will return orig.value() + random.sample().

uniformback to summary
public static FeatureInitializer uniform(final RandomGenerator rng, final double min, final double max)

Uniform sampling of the given range.

Parameters
rng:RandomGenerator

Random number generator used to draw samples from a uniform distribution.

min:double

Lower bound of the range.

max:double

Upper bound of the range.

Returns:FeatureInitializer

an initializer such that the features will be initialized with values within the given range.

Exceptions
NumberIsTooLargeException:
if min >= max.
uniformback to summary
public static FeatureInitializer uniform(final double min, final double max)

Uniform sampling of the given range.

Parameters
min:double

Lower bound of the range.

max:double

Upper bound of the range.

Returns:FeatureInitializer

an initializer such that the features will be initialized with values within the given range.

Exceptions
NumberIsTooLargeException:
if min >= max.