Compose with another spec by applying a prepare function to input records first.
Compose with another spec by applying a prepare function to input records first.
Useful for reusing an existing spec for a different input record type.
input record type of the other spec
spec to compose with
function to prepare input records for the other spec
Cross feature values of two underlying transformers.
Cross feature values of two underlying transformers.
names of transformers to be crossed
function to cross feature value pairs
Extract features from an input collection.
Extract features from an input collection.
This is done in two steps, a reduce
step over the collection to aggregate feature summary,
and a map
step to transform values using the summary.
input collection type, e.g. Array
, List
input collection
Extract features from individual records using settings from a previous session.
Extract features from individual records using settings from a previous session. Since the settings are parsed only once, this is more efficient and is recommended when the input is from an unbounded source, e.g. a stream of events or a backend service.
This bypasses the reduce
step in extract and uses feature summary from settings exported
in a previous session.
JSON settings from a previous session
Extract features from an input collection using settings from a previous session.
Extract features from an input collection using settings from a previous session.
This bypasses the reduce
step in extract and uses feature summary from settings exported
in a previous session.
input collection type, e.g. Array
, List
input collection
JSON settings from a previous session
Extract features from individual records using partial settings.
Extract features from individual records using partial settings. Since the settings are parsed only once, this is more efficient and is recommended when the input is from an unbounded source, e.g. a stream of events or a backend service.
This bypasses the reduce
step in extract and uses feature summary from settings exported
in a previous session.
JSON settings from a previous session
Extract features from an input collection using a partial settings from a previous session.
Extract features from an input collection using a partial settings from a previous session.
This bypasses the reduce
step in extract and uses feature summary from settings exported
in a previous session.
input collection type, e.g. Array
, List
input collection
JSON settings from a previous session
Creates a new FeatureSpec with only the features that respect the given predicate.
Creates a new FeatureSpec with only the features that respect the given predicate.
Function determining whether or not to include the feature
Add an optional field specification.
Add an optional field specification.
extracted feature type
function to extract feature Option[A]
from record T
default for missing values
Transformer for extracted feature A
Add a required field specification.
Add a required field specification.
extracted feature type
function to extract feature A
from record T
Transformer for extracted feature A
Encapsulate specification for feature extraction and transformation.
input record type to extract features from