public class TwoPointApproximation extends Object
| Constructor and Description |
|---|
TwoPointApproximation() |
| Modifier and Type | Method and Description |
|---|---|
static INDArray[] |
adjustSchemeToBounds(INDArray x,
INDArray h,
int numSteps,
INDArray lowerBound,
INDArray upperBound)
Adjust final scheme to presence of bounds
Returns (in this order):
adjusted hypothesis, whether to use onesided as an int mask array
|
static INDArray |
approximateDerivative(org.nd4j.linalg.function.Function<INDArray,INDArray> f,
INDArray x,
INDArray relStep,
INDArray f0,
INDArray bounds) |
static INDArray |
computeAbsoluteStep(INDArray x) |
static INDArray |
computeAbsoluteStep(INDArray relStep,
INDArray x) |
static INDArray |
denseDifference(org.nd4j.linalg.function.Function<INDArray,INDArray> func,
INDArray x0,
INDArray f0,
INDArray h,
INDArray oneSided) |
static double |
getEpsRelativeTo(INDArray data) |
static INDArray[] |
prepareBounds(INDArray bounds,
INDArray x)
Prepare the boundaries for processing
|
public static INDArray[] prepareBounds(INDArray bounds, INDArray x)
bounds - the boundsx - the input in to the approximationpublic static INDArray[] adjustSchemeToBounds(INDArray x, INDArray h, int numSteps, INDArray lowerBound, INDArray upperBound)
x - the point to estimate the derivativeh - the finite difference stepsnumSteps - Number of h steps in 1 direction
to implement finite difference scheme.lowerBound - Lower bounds for independent variable variableupperBound - Upper bounds for independent variablepublic static double getEpsRelativeTo(INDArray data)
public static INDArray computeAbsoluteStep(INDArray relStep, INDArray x)
relStep - x - public static INDArray approximateDerivative(org.nd4j.linalg.function.Function<INDArray,INDArray> f, INDArray x, INDArray relStep, INDArray f0, INDArray bounds)
f - x - relStep - f0 - bounds - Copyright © 2018. All rights reserved.