package modelkit
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ec5be6fc4f47f7a73fae676e730b9c66400327320231a61f0d2044d8d46aab59
sha512=e63baf8958b95f9b57f27ae42c6fb434674db18d278af7d60b74cac239407cddef57a16fab99101c9087561f9c7d826340505f449e99629c86f708ab89840946
doc/index.html
ModelKit
ModelKit is a portable OCaml library for cohesive classical machine learning workflows.
The current engineering foundation provides opaque float64 Modelkit.Vector and Modelkit.Matrix values, immutable Modelkit.Row_view selections, validated targets, aligned metadata, immutable feature schemas, and structured protocol errors. Public specification, estimator, transformer, scorer, splitter, execution, RNG, and numerical-backend module types define the extension boundaries with separate unfitted and fitted states. The portable runtime includes fixed-order compensated numerical kernels, sequential stable-order execution, deterministic logical seed derivation, and a pure SplitMix64 random-number stream. Estimators and end-to-end workflows will arrive in later releases. Portable tests consume committed scikit-learn reference data without requiring Python during a normal build or test run.
Executable example
The reference backend preserves small terms that ordinary floating-point summation can lose to cancellation:
# open Modelkit;;
# Reference_backend.sum (Vector.of_array [| 1e16; 1.0; -1e16 |]);;
- : float = 1.