package tezos-benchmark

  1. Overview
  2. Docs
module NMap : Stats.Finbij.S with type elt = Tezos_benchmark.Free_variable.t
type measure =
  1. | Measure of Maths.vector
type constrnt =
  1. | Full of Costlang.affine * measure
type problem =
  1. | Non_degenerate of {
    1. lines : constrnt list;
    2. input : Maths.matrix;
    3. output : Maths.matrix;
    4. nmap : NMap.t;
    }
  2. | Degenerate of {
    1. predicted : Maths.matrix;
    2. measured : Maths.matrix;
    }
type scores = {
  1. r2_score : float option;
  2. rmse_score : float;
  3. tvalues : (Free_variable.t * float) list;
}
val pp_scores : Stdlib.Format.formatter -> scores -> unit
val scores_to_csv_column : (string * Namespace.t) -> scores -> Csv.csv
type solution = {
  1. mapping : (Free_variable.t * float) list;
  2. weights : Maths.matrix;
  3. intercept_lift : float;
    (*

    The diff required to overestimate all measurements by the predictions. This diff should be applied to the intercept parameter when this solution is for the allocation costs.

    *)
  4. scores : scores;
}
type solver =
  1. | Ridge of {
    1. alpha : float;
    }
  2. | Lasso of {
    1. alpha : float;
    2. positive : bool;
    }
  3. | NNLS
type error_statistics
val pp_error_statistics : Stdlib.Format.formatter -> error_statistics -> unit
val compute_error_statistics : predicted:Maths.matrix -> measured:Maths.matrix -> error_statistics

Compute prediction error

val make_problem : data:'workload Measure.workload_data -> model:'workload Model.t -> overrides:(Free_variable.t -> float option) -> problem

make_problem ~data ~model ~overrides makes a benchmark problem for a solver from the workload data and the model model. overrides specify the variables whose values are already known.

val solve_problem : problem -> solver -> solution

solve_problem problem solver solves problem using solver.

val problem_to_csv : problem -> Csv.csv
val mapping_to_csv : (Free_variable.t * float) Tezos_base.TzPervasives.trace -> Csv.csv
val solution_to_csv : solution -> Csv.csv option
OCaml

Innovation. Community. Security.