| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.Transform
Description
Fitted column transforms as a composable monoid. A Transform is a list of
named output expressions; s <> t means "apply s, then t", fusing t's
references to s's outputs by simultaneous substitution. applyTransform runs
one against a frame; compileThrough folds a transform into a model's
prediction expression so the result is a single expression over the raw inputs.
Every right-hand side must be row-wise (no aggregation/window), and within one transform each expression reads the original frame.
Synopsis
- newtype Transform = Transform {}
- applyTransform :: Transform -> DataFrame -> DataFrame
- compileThrough :: Columnable a => Transform -> Expr a -> Expr a
- data ScalerModel = ScalerModel {}
- standardScaler :: [Text] -> DataFrame -> ScalerModel
- scalerTransform :: ScalerModel -> Transform
Documentation
A fitted transform: named output columns derived from the input frame.
Constructors
| Transform | |
Fields | |
applyTransform :: Transform -> DataFrame -> DataFrame Source #
Apply a transform to a frame (deriving its outputs in order).
compileThrough :: Columnable a => Transform -> Expr a -> Expr a Source #
Fold a preprocessing transform into a model's prediction expression, yielding one expression over the transform's input columns.
data ScalerModel Source #
A fitted standardizer: per-column means and standard deviations.
Constructors
| ScalerModel | |
Instances
| Show ScalerModel Source # | |
Defined in DataFrame.Transform Methods showsPrec :: Int -> ScalerModel -> ShowS # show :: ScalerModel -> String # showList :: [ScalerModel] -> ShowS # | |
| Eq ScalerModel Source # | |
Defined in DataFrame.Transform | |
standardScaler :: [Text] -> DataFrame -> ScalerModel Source #
Fit a standard scaler over the named columns.
scalerTransform :: ScalerModel -> Transform Source #
The scaler as a Transform: (col - μ) / σ per column.