sig
  module Gsl :
    sig
      exception Optim_exception of exn
      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
    end
  module SGD :
    sig
      type t
      val create :
        ?tau:float ->
        ?eta0:float ->
        ?step:int ->
        ?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.Deriv.Deriv.Optim.SGD.t
      val step :
        Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t ->
        Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t
      val gradient_norm : Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t -> float
      val get_trained :
        Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t ->
        Interfaces.Sigs.Eval.Trained.t
      val get_eta : Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t -> float
      val get_step : Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t -> int
      val test :
        ?epsabs:float ->
        ?max_iter:int ->
        ?report:(Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t -> unit) ->
        Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t ->
        Interfaces.Sigs.Deriv.Deriv.Optim.SGD.t
    end
  module SMD :
    sig
      type t
      val create :
        ?eps:float ->
        ?lambda:float ->
        ?mu:float ->
        ?eta0:Lacaml.D.vec ->
        ?nu0:Lacaml.D.vec ->
        ?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.Deriv.Deriv.Optim.SMD.t
      val step :
        Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t ->
        Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t
      val gradient_norm : Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t -> float
      val get_trained :
        Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t ->
        Interfaces.Sigs.Eval.Trained.t
      val get_eta : Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t -> Lacaml.D.vec
      val get_nu : Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t -> Lacaml.D.vec
      val test :
        ?epsabs:float ->
        ?max_iter:int ->
        ?report:(Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t -> unit) ->
        Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t ->
        Interfaces.Sigs.Deriv.Deriv.Optim.SMD.t
    end
end