Idris2Doc : Spidr.Optimize

Spidr.Optimize

(source)
Function optimizers.

Definitions

0Optimizer : (0_ : Type) ->Type
  An `Optimizer` finds the value, in a `Tensor`-valued feature space, which (typically
approximately) optimizes a scalar-valued function over that space.

@domain The type of the domain over which to find the optimal value.

Totality: total
Visibility: public export
meshGrid : (density : ListNat) ->HasLengthddensity=>All (\{arg:0}=>GT{arg:0}1) density=>Tensor [d] F64->Tensor [d] F64->Tag (Vectd (TensordensityF64))
  For each of `d` axes, return a grid of values that scales linearly between `bound` and `bound'`.
Bounds need not be ordered. In the n-th grid, values vary along the n-th axis, and are constant
across other axes. The number of values along the axis is the n-th `density`.

For example, for
```
lo, hi : Tensor [2] F64
lo = tensor [0.0, -0.5]
hi = tensor [1.5, 1.0]
```
`meshGrid [3, 4] lo hi` yields `[x, y]` where
```
x, y : Tensor [3, 4] F64
x = tensor [
[0.0 , 0.0 , 0.0 , 0.0 ]
, [0.75, 0.75, 0.75, 0.75]
, [1.5 , 1.5 , 1.5 , 1.5 ]
]
y = tensor [
[-0.5, 0.0, 0.5, 1.0]
, [-0.5, 0.0, 0.5, 1.0]
, [-0.5, 0.0, 0.5, 1.0]
]
```

@density The number of values for each axis.
@bound One bound of the values for each axis.
@bound' The other bounds.

Totality: total
Visibility: export
gridSearch : (density : ListNat) ->HasLengthddensity=>All (\{arg:0}=>GT{arg:0}1) density=>Tensor [d] F64->Tensor [d] F64->Optimizer (Tensor [d] F64)
  Grid search of a scalar-valued function. Grid search approximates the optimum by evaluating the
objective over a bounded, evenly-spaced grid. Bounds need not be ordered.

@density The density of the grid.
@bound One bound of the grid.
@bound' The other bound of the grid.

Totality: total
Visibility: export
lbfgs : Tensor [n] F64->Optimizer (Tensor [n] F64)
  The limited-memory BFGS (L-BFGS) optimization tactic, see

Nocedal, Jorge, Updating quasi-Newton matrices with limited storage.
Math. Comp. 35 (1980), no. 151, 773–782.

available at

https://www.ams.org/journals/mcom/1980-35-151/S0025-5718-1980-0572855-7/

**NOTE** This function is not yet implemented.

@initialPoints The points from which to start optimization.