(derivative-fn number->number)
(derivative-fn number->number
{:provisdom.math.derivatives/keys [derivative h type accuracy]
:or {derivative 1 type :central}})
Returns a numerical derivative function. Function number->number
takes and
returns a number. Note that derivative-fn
will not be accurate when inputs
or outputs are so large when divided by ::h
that they lose precision.
Options:
::derivative
- can be 0 or 1 (default) to 8
::h
- (default is m/sgl-close for 1st deriv, 10x less for others) is
the denominator, which is equal to (dx ^ ::derivative
), where 'dx' is
the small change (smaller ::h
isn't usually better, changes to ::h
can
be important)
::type
- can be :central
(default), :forward
, or :backward
::accuracy
- can be 2, 4, 6, or 8 for central (no 8 for 3rd or 4th deriv),
and 1-6 for forward or backward (no 6 for 4th deriv). (default
::accuracy
is 2 for ::derivative
<= 2, else 6. ::accuracy
is ignored
for ::derivative
> 4 and default accuracies are used.
Returns a numerical derivative function. Function `number->number` takes and returns a number. Note that [[derivative-fn]] will not be accurate when inputs or outputs are so large when divided by `::h` that they lose precision. Options: `::derivative` - can be 0 or 1 (default) to 8 `::h` - (default is m/*sgl-close* for 1st deriv, 10x less for others) is the denominator, which is equal to (dx ^ `::derivative`), where 'dx' is the small change (smaller `::h` isn't usually better, changes to `::h` can be important) `::type` - can be `:central` (default), `:forward`, or `:backward` `::accuracy` - can be 2, 4, 6, or 8 for central (no 8 for 3rd or 4th deriv), and 1-6 for forward or backward (no 6 for 4th deriv). (default `::accuracy` is 2 for `::derivative` <= 2, else 6. `::accuracy` is ignored for `::derivative` > 4 and default accuracies are used.
(gradient-fn v->number)
(gradient-fn v->number
{:provisdom.math.derivatives/keys [h type accuracy]
:or {h m/sgl-close type :central accuracy 2}})
Returns a numerical gradient function. Function v->number
takes a vector
and returns a number. The output function takes and returns a vector.
Options:
::h
(default m/sgl-close) is the denominator, which is equal to 'dx',
where 'dx' is the small change (smaller ::h
isn't usually better,
changes to ::h
can be important)
::type
can be :central
(default), :forward
, or :backward
::accuracy
can be 2 (default), 4, 6, or 8 for :central
, and 1-6 for
:forward
or :backward
.
Returns a numerical gradient function. Function `v->number` takes a vector and returns a number. The output function takes and returns a vector. Options: `::h` (default m/*sgl-close*) is the denominator, which is equal to 'dx', where 'dx' is the small change (smaller `::h` isn't usually better, changes to `::h` can be important) `::type` can be `:central` (default), `:forward`, or `:backward` `::accuracy` can be 2 (default), 4, 6, or 8 for `:central`, and 1-6 for `:forward` or `:backward`.
(hessian-fn v->number)
(hessian-fn v->number
{:provisdom.math.derivatives/keys [h type accuracy]
:or {h (* m/sgl-close 0.1) type :joint-central accuracy 2}})
Returns a numerical Hessian function. Function v->number
takes a vector and
returns a number. The output function takes a vector and returns a symmetric
matrix. Options:
::h
-- (default m/sgl-close / 10) is the denominator, which is equal to
(dx * dx), where 'dx' is the small change (smaller ::h
isn't usually
better, changes to ::h
can be important)
::type
can be :joint-central
(default), :central
, :forward
, or
:backward
::accuracy
can be 2 (default, only choice for :joint-central
); 2, 4, 6,
and 1-6 for :forward
or :backward
.
Returns a numerical Hessian function. Function `v->number` takes a vector and returns a number. The output function takes a vector and returns a symmetric matrix. Options: `::h` -- (default m/*sgl-close* / 10) is the denominator, which is equal to (dx * dx), where 'dx' is the small change (smaller `::h` isn't usually better, changes to `::h` can be important) `::type` can be `:joint-central` (default), `:central`, `:forward`, or `:backward` `::accuracy` can be 2 (default, only choice for `:joint-central`); 2, 4, 6, and 1-6 for `:forward` or `:backward`.
(jacobian-fn v->v)
(jacobian-fn v->v
{:provisdom.math.derivatives/keys [h type accuracy]
:or {h m/sgl-close type :central accuracy 2}})
Returns a numerical jacobian function. Function v->v
takes a vector and
returns a vector. The output function takes a vector and returns a matrix,
where each row is the gradient of f's output.
Options:
::h
-- (default m/sgl-close) is the denominator, which is equal to 'dx',
where 'dx' is the small change (smaller ::h
isn't usually better,
changes to ::h
can be important)
::type
-- can be :central
(default), :forward
, or :backward
::accuracy
-- can be 2 (default), 4, 6, or 8 for :central
, and 1-6 for
:forward
or :backward
.
Returns a numerical jacobian function. Function `v->v` takes a vector and returns a vector. The output function takes a vector and returns a matrix, where each row is the gradient of f's output. Options: `::h` -- (default m/*sgl-close*) is the denominator, which is equal to 'dx', where 'dx' is the small change (smaller `::h` isn't usually better, changes to `::h` can be important) `::type` -- can be `:central` (default), `:forward`, or `:backward` `::accuracy` -- can be 2 (default), 4, 6, or 8 for `:central`, and 1-6 for `:forward` or `:backward`.
(partial-derivative-x-of-fxy fxy)
(partial-derivative-x-of-fxy fxy
{:provisdom.math.derivatives/keys [h]
:or {h m/sgl-close}})
(partial-derivative-y-of-fxy fxy)
(partial-derivative-y-of-fxy fxy
{:provisdom.math.derivatives/keys [h]
:or {h m/sgl-close}})
(second-partial-derivative-xx-of-fxy fxy)
(second-partial-derivative-xx-of-fxy fxy
{:provisdom.math.derivatives/keys [h]
:or {h (* m/sgl-close 0.1)}})
(second-partial-derivative-xy-of-fxy fxy)
(second-partial-derivative-xy-of-fxy fxy
{:provisdom.math.derivatives/keys [h]
:or {h (* m/sgl-close 0.1)}})
(second-partial-derivative-yy-of-fxy fxy)
(second-partial-derivative-yy-of-fxy fxy
{:provisdom.math.derivatives/keys [h]
:or {h (* m/sgl-close 0.1)}})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close