package modelkit-talon

All checked builds pass
  1. Overview
  2. Docs
Checked Talon dataframe column admission for ModelKit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

modelkit-0.6.3.tbz
sha256=a70c1c95bdc13e7abff028394a14300e2847e3f3931d6e1476394cbcdfb05407
sha512=eb186a5a919a43006ea350e8ab49845d230dc1de8f61d83c06f4d1aa2371930ea0239dcf9dbb3337e18867301422c6dc5af4d569afaf187bde5d1a2368b7bbe4

doc/modelkit-talon/Modelkit_talon/index.html

Module Modelkit_talonSource

Checked admission from explicitly selected Talon dataframe columns into immutable ModelKit data.

Every function reads the typed tensor behind a named column without Talon's convenience conversion, so no column is cast, widened, or narrowed implicitly. Selected columns keep their names and selection order as the feature schema. Feature columns may carry Talon null masks; target, weight, and group columns must not contain nulls.

Sourcetype 'a conversion = 'a Modelkit.Admission.conversion = {
  1. value : 'a;
  2. report : Modelkit.Conversion_report.t;
}
Sourcetype features = Modelkit.Admission.features = {
  1. matrix : Modelkit.Matrix.t;
  2. schema : Modelkit.Feature_schema.t;
  3. null_mask : Modelkit.Null_mask.t option;
  4. feature_reports : Modelkit.Conversion_report.t list;
}
Sourcetype 'kind admitted_dataset = 'kind Modelkit.Admission.dataset = {
  1. dataset : 'kind Modelkit.Dataset.t;
  2. feature_null_mask : Modelkit.Null_mask.t option;
  3. dataset_reports : Modelkit.Conversion_report.t list;
}
Sourceval features : Talon.t -> string list -> (features, Modelkit.Error.t) result

features frame columns admits the named float64 columns of frame in the order given by columns, which also becomes the feature-name order.

A column that is missing, selected twice, or not float64 is a validation error. Column null masks are merged into the returned features null mask and stored as NaN in the matrix, while genuine unmasked NaNs are retained as data. Unmasked infinities are rejected. The mask is returned only when at least one selected column carries an explicit Talon null mask.

Admits a float64 column without nulls as a finite regression target.

Admits an int64 column without nulls whose labels fit OCaml int on the current platform.

Admits a float64 column without nulls holding finite, non-negative weights with at least one positive value.

Admits an int64 column without nulls whose values fit OCaml int.

Sourceval regression_dataset : ?sample_weight:string -> ?groups:string -> features:string list -> target:string -> Talon.t -> (Modelkit.Target.regression admitted_dataset, Modelkit.Error.t) result
Sourceval classification_dataset : ?sample_weight:string -> ?groups:string -> features:string list -> target:string -> Talon.t -> (Modelkit.Target.classification admitted_dataset, Modelkit.Error.t) result

Dataset admission requires every role to name a distinct column, validates column types, null policy, numeric domains, and label ranges, and returns a ModelKit dataset whose feature names are the selected column names. Feature NaNs are retained under Dataset.Allow_nan; downstream estimators must impute them or otherwise declare support.