Module Optimise.Regularisation

Regularisation module

type typ =
  1. | L1norm of float
  2. | L2norm of float
  3. | Elastic_net of float * float
  4. | None

Types of regularisation functions, added to the loss for each weight array w:

  • L1norm a is a * ||w||_1;
  • L2norm a is a * ||w||^2, the squared Euclidean norm;
  • Elastic_net (a, b) is a * ||w||_1 + b * ||w||^2.
val run : typ -> Algodiff.t -> Algodiff.t

Execute the computations defined in module typ.

val to_string : typ -> string

Convert the module typ to its string representation.