package gpr

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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 -> 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:Spec.Hyper.t array -> inputs:Eval.Spec.Inputs.t -> targets:Lacaml.D.vec -> unit -> 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).

  • parameter step

    default = 1e-1

  • parameter tol

    default = 1e-1

  • parameter epsabs

    default = 1e-1

  • parameter report_trained_model

    default = ignored

  • parameter report_gradient_norm

    default = ignored

  • parameter kernel

    default = default kernel computed from specification

  • parameter sigma2

    default = target variance

  • parameter inducing

    default = randomly selected subset of inputs

  • parameter n_rand_inducing

    default = 10% of inputs, at most 1000

  • parameter learn_sigma2

    default = true

  • parameter hypers

    default = all hyper parameters

OCaml

Innovation. Community. Security.