Slices from a MProb
SMM.doSlices
— FunctionSMM.Slice
— TypeA slice in dimension $j$ of a function $f \in \mathbb{R}^N$ is defined as $f(p[1],...,p[j],...,p[N])$, where p
is the initial parameter vector and p[j] = range(lower[j], stop = upper[j], length = npoints)
, where lower[j],upper[j]
are the bounds of the parameter space in dimension $j$.
Fields
res
:Dict
of resulting slices. For each parameter $p_j$ there is aDict
with as many entries asnpoints
chosen indoSlices
p0
: Initial parameter vector dictm0
: data moments dict
Examples
julia> m = MProb()
julia> p = OrderedDict(:p1=>1.1,:p2=>pi)
julia> m = OrderedDict(:m1=>rand(),:m2=>e)
julia> Slice(p,m)
SMM.optSlices
— MethodoptSlices(m::MProb,npoints::Int;parallel=false,tol=1e-5,update=nothing,filename="trace.jld2")
Computes Slice
s of an MProb
and keeps the best value from each slice. This implements a naive form of cyclic coordinate descent in that it optimizes wrt to one direction at a time, keeping the best value. It's naive because it does a grid search in that direction (and disregards any gradient information). The grid size shrinks, however, at a rate update
(constant by default)
Algorithm Description
Let $\theta \in \mathbb{R}^K$ be the parameter vector of objective function $L(\theta)$. A cyclic coordinate search algorithm defines cycle $n+1$ as follows:
The algorithm runs until a convergence criterion is met; here we stop at cycle $n$ if the norm of the distance between $\theta^{(n-1)}$ and $\theta^{(n)}$ is less than tol
.