dataframe-learn-2.4.1.0: Interpretable, expression-returning machine learning for the dataframe ecosystem.
Safe HaskellNone
LanguageHaskell2010

DataFrame.Transform.Serialize

Description

Persist and reload a fitted Transform.

A Transform is just an ordered list of named output expressions, so it serializes through the same JSON wire format as any pipeline (see DataFrame.Expr.Serialize). Save a fitted preprocessing/feature transform in one process and reload it in another with applyTransform to run inference:

Right t <- loadTransformFromFile "scaler.json"
let scored = applyTransform t newData
Synopsis

Documentation

encodeTransform :: Transform -> Either String Value Source #

Encode a transform's output expressions to JSON.

decodeTransform :: Value -> Either String Transform Source #

Decode a transform produced by encodeTransform.

saveTransformToFile :: FilePath -> Transform -> IO (Either String ()) Source #

Encode a transform and write it to a file. No file is written on failure.