Differential
The Differential
object contains functions for computing derivatives, partial derivatives, Laplacians, gradient vectors, Hessian matrices and Jacobian matrices.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Differential.type
Members list
Value members
Concrete methods
Convert an array of vector-to-scalar functions (FunctionV2S
) into one vector-to-vector function (FunctionV2V
).
Convert an array of vector-to-scalar functions (FunctionV2S
) into one vector-to-vector function (FunctionV2V
).
Value parameters
- f
-
the array of functions to be evaluated
Attributes
Estimate the derivative of the scalar-to-scalar function f at x using a 2-sided method (central difference). Approximate the tangent line at (x, f(x)) with the secant line through points (x-h, f(x-h)) and (x+h, f(x+h)). Tends to be MORE ACCURATE than the 1-sided method. Although a noun, derivative was chosen over the verb differentiate.
Estimate the derivative of the scalar-to-scalar function f at x using a 2-sided method (central difference). Approximate the tangent line at (x, f(x)) with the secant line through points (x-h, f(x-h)) and (x+h, f(x+h)). Tends to be MORE ACCURATE than the 1-sided method. Although a noun, derivative was chosen over the verb differentiate.
Value parameters
- f
-
the function whose derivative is sought
- x
-
the point (scalar) at which to estimate the derivative
Attributes
- See also
Estimate the derivative of the scalar-to-scalar function f at x using a 1-sided method (forward difference). Approximate the tangent line at (x, f(x)) with the secant line through points (x, f(x)) and (x+h, f(x+h)).
Estimate the derivative of the scalar-to-scalar function f at x using a 1-sided method (forward difference). Approximate the tangent line at (x, f(x)) with the secant line through points (x, f(x)) and (x+h, f(x+h)).
Value parameters
- f
-
the function whose derivative is sought
- x
-
the point (scalar) at which to estimate the derivative
Attributes
Estimate the second derivative of the scalar-to-scalar function f at x using the central difference formula for second derivatives.
Estimate the second derivative of the scalar-to-scalar function f at x using the central difference formula for second derivatives.
Value parameters
- f
-
the function whose second derivative is sought
- x
-
the point (scalar) at which to estimate the derivative
Attributes
Evaluate an array of vector-to-scalar functions (FunctionV2S
) as one vector-to-vector function (FunctionV2V
).
Evaluate an array of vector-to-scalar functions (FunctionV2S
) as one vector-to-vector function (FunctionV2V
).
Value parameters
- f
-
the array of functions to be evaluated
- x
-
the point (vector) at which to functionally evaluate
Attributes
Estimate the finite difference of the scalar-to-scalar function f at x using a 1-sided method (forward difference). May work better than the derivative for noisy functions.
Estimate the finite difference of the scalar-to-scalar function f at x using a 1-sided method (forward difference). May work better than the derivative for noisy functions.
Value parameters
- f
-
the function whose derivative is sought
- x
-
the point (scalar) at which to estimate the finite difference
Attributes
Estimate the gradient of the vector-to-scalar function f at point x returning a value for the partial derivative for each dimension of x.
Estimate the gradient of the vector-to-scalar function f at point x returning a value for the partial derivative for each dimension of x.
Value parameters
- f
-
the function whose gradient is sought
- x
-
the point (vector) at which to estimate the gradient
Attributes
Estimate the Hessian of the vector-to-scalar function f at point x returning a matrix of second partial derivative.
Estimate the Hessian of the vector-to-scalar function f at point x returning a matrix of second partial derivative.
Value parameters
- f
-
the function whose Hessian is sought
- x
-
the point (vector) at which to estimate the Hessian
Attributes
Compute the Jacobian matrix for a vector-valued function represented as an array of scalar-valued functions. The i-th row in the matrix is the gradient of the i-th function.
Compute the Jacobian matrix for a vector-valued function represented as an array of scalar-valued functions. The i-th row in the matrix is the gradient of the i-th function.
Value parameters
- f
-
the array of functions whose Jacobian is sought
- x
-
the point (vector) at which to estimate the Jacobian
Attributes
Estimate the Laplacian of the vector-to-scalar function f at point x returning the sum of the pure second partial derivatives.
Estimate the Laplacian of the vector-to-scalar function f at point x returning the sum of the pure second partial derivatives.
Value parameters
- f
-
the function whose Hessian is sought
- x
-
the point (vector) at which to estimate the Hessian
Attributes
Estimate the i-th partial derivative of the vector-to-scalar function f at point x returning the value for the partial derivative for dimension i.
Estimate the i-th partial derivative of the vector-to-scalar function f at point x returning the value for the partial derivative for dimension i.
Value parameters
- f
-
the function whose partial derivative is sought
- i
-
the dimension to compute the partial derivative on
- x
-
the point (vector) at which to estimate the partial derivative
Attributes
Estimate the (i,j)th second partial derivative of the vector-to-scalar function f at point x returning the value for the second partial derivative for dimensions (i, j). If i = j, the second partial derivative is called "pure", otherwise it is a "cross" second partial derivative.
Estimate the (i,j)th second partial derivative of the vector-to-scalar function f at point x returning the value for the second partial derivative for dimensions (i, j). If i = j, the second partial derivative is called "pure", otherwise it is a "cross" second partial derivative.
Value parameters
- f
-
the function whose second partial derivative is sought
- i
-
the first dimension to compute the second partial derivative on
- j
-
the second dimension to compute the second partial derivative on
- x
-
the point (vector) at which to estimate the second partial derivative
Attributes
- See also
Reset the step size from its default step size to one more suitable for your function. A heuristic for the central difference method is to let h = max (|x|,1) * (machine-epsilon)^(1/3) For double precision, the machine-epsilon is about 1E-16.
Reset the step size from its default step size to one more suitable for your function. A heuristic for the central difference method is to let h = max (|x|,1) * (machine-epsilon)^(1/3) For double precision, the machine-epsilon is about 1E-16.
Value parameters
- step
-
the new step size to reset h to
Attributes
- See also
Reset the large step size from its default step size to one more suitable for your function.
Reset the large step size from its default step size to one more suitable for your function.
Value parameters
- largeStep
-
the new large step size to reset hl to
Attributes
Compute the slope of the vector-to-scalar function f defined on mixed real/integer vectors.
Compute the slope of the vector-to-scalar function f defined on mixed real/integer vectors.
Value parameters
- f
-
the function whose slope is sought
- n
-
the number of dimensions that are real-valued (rest are integers)
- x
-
the point (vector) at which to estimate the slope