module Gsl: sig
.. end
Optimization with the GNU Scientific library (GSL)
exception Optim_exception of exn
Optim_exception exn
is raised when an internal exception occurs,
e.g. because GSL fails, or because a callback raised it.
val train : ?step:float ->
?tol:float ->
?epsabs:float ->
?report_trained_model:(iter:int -> Interfaces.Sigs.Eval.Trained.t -> unit) ->
?report_gradient_norm:(iter:int -> float -> unit) ->
?kernel:Eval.Spec.Kernel.t ->
?sigma2:float ->
?inducing:Eval.Spec.Inducing.t ->
?n_rand_inducing:int ->
?learn_sigma2:bool ->
?hypers:Interfaces.Sigs.Deriv.Deriv.Spec.Hyper.t array ->
inputs:Eval.Spec.Inputs.t ->
targets:Lacaml.D.vec -> unit -> Interfaces.Sigs.Eval.Trained.t
train ?step ?tol ?epsabs ?report_trained_model
?report_gradient_norm ?kernel ?sigma2 ?inducing ?n_rand_inducing
?learn_sigma2 ?hypers ~inputs ~targets ()
takes the optional
initial optimizer step size step
, the optimizer line search
tolerance tol
, the minimum gradient norm epsabs
to achieve by
the optimizer, callbacks for reporting intermediate results
report_trained_model
and report_gradient_norm
, an optional
kernel
, noise level sigma2
, inducing inputs inducing
, number
of randomly chosen inducing inputs n_rand_inducing
, a flag for
whether the noise level should be learnt learn_sigma2
, an array
of optional hyper parameters hypers
which should be optimized,
and the inputs
and targets
.
Returns the trained model obtained by evidence maximization (=
type II maximum likelihood).
step
: default = 1e-1
tol
: default = 1e-1
epsabs
: default = 1e-1
report_trained_model
: default = ignored
report_gradient_norm
: default = ignored
kernel
: default = default kernel computed from specification
sigma2
: default = target variance
inducing
: default = randomly selected subset of inputs
n_rand_inducing
: default = 10% of inputs, at most 1000
learn_sigma2
: default = true
hypers
: default = all hyper parameters