public class BlackBoxGradient extends java.lang.Object implements IGradientFunction
precision. (Obviously it holds that
in lim_{precision -> 0} this yields the exact gradient.)
If x is a vector (a_o, ..., a_n), then, instead we calculate each partial
derivative i by:
(f(a_o, ... a_i +h, ... , a_n) - f((a_o, ..., a_n)))/h
Obviously, this is a highly inefficient approach for estimating the gradient
(if we have n partial derivatives, we need 2 *n estimations).| Constructor and Description |
|---|
BlackBoxGradient(IGradientDescendableFunction underlyingFunction,
double precision)
Sets up a gradient-estimator for the given function.
|
| Modifier and Type | Method and Description |
|---|---|
ai.libs.jaicore.math.linearalgebra.Vector |
apply(ai.libs.jaicore.math.linearalgebra.Vector xVec)
Returns the result of applying the gradient to the point represented by the
given vector.
|
public BlackBoxGradient(IGradientDescendableFunction underlyingFunction, double precision)
underlyingFunction - the function for which the gradient shall be estimatedprecision - the precision of the estimation, the close this value is to zero the better is the estimationpublic ai.libs.jaicore.math.linearalgebra.Vector apply(ai.libs.jaicore.math.linearalgebra.Vector xVec)
IGradientFunctionapply in interface IGradientFunctionxVec - the vector the gradient is applied to