package modelkit

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Modelkit.Min_max_scaler

Per-feature affine scaling into a configured finite range.

Fitting learns finite minima, maxima, scales, and offsets. Constant features use a unit denominator and therefore map to the range's lower bound. When clip is true, values transformed outside the training range are clipped to the configured bounds. Sample weights are rejected.

type params = {
  1. feature_range : float * float;
  2. clip : bool;
}
type t
type fitted
val create : ?feature_range:(float * float) -> ?clip:bool -> unit -> (t, Error.t) result
val data_min : fitted -> Vector.t
val data_max : fitted -> Vector.t
val data_range : fitted -> Vector.t
val scale : fitted -> Vector.t
val offset : fitted -> Vector.t
include TRANSFORMER with type t := t and type params := params and type target = unit and type fitted := fitted and type rng = Rng.t
include SPECIFICATION with type t := t with type params := params
val clone : t -> t
val params : t -> params
type target = unit
type rng = Rng.t
val fit : t -> ?sample_weight:Sample_weight.t -> rng:rng -> feature_schema:Feature_schema.t -> x:Matrix.t -> y:target option -> unit -> (fitted, Error.t) result
val transform : fitted -> feature_schema:Feature_schema.t -> x:Matrix.t -> (Matrix.t, Error.t) result
val fitted_params : fitted -> params
val input_schema : fitted -> Feature_schema.t
val output_schema : fitted -> Feature_schema.t