Parameters
inputs : CatEncoderInput
Custom encoding configuration. If None, resolves from ‘train.stable’ and ‘features.cat.stable.dist’.
**kwargs : dict
Additional parameters passed to the CatEncoder worker.
Inputs full schema can be obtained by
ctx.workers.cat_encoder.spec with main params:inputs == None | → | pipeline data context |
train_set != None | → | custom train data for cat_encoder training |
cat_features != None | → | optional subset of categorical features |
Returns
CatEncoderWorker
The populated instance of CatEncoderWorker.
Populates attributes into the worker context:
model | → | ctx.workers.cat_encoder |
inputs | → | ctx.workers.cat_encoder.spec |
result | → | ctx.workers.cat_encoder.result |
state | → | ctx.workers.cat_encoder.state |
report | → | ctx.workers.cat_encoder.report |
stats | → | ctx.workers.cat_encoder.stats |
fitter | → | ctx.workers.cat_encoder.fitter |
Registers data into the datasets context:
data | → | ctx.datasets.train.encoded.num |
features | → | ctx.datasets.features.cat.encoded |
features | → | ctx.datasets.features.cat.selected |
mapping | → | ctx.datasets.features.cat.mapping |
dropped | → | ctx.datasets.features.cat.dropped.encoded |
encodings | → | ctx.datasets.encodings.cat |
stats | → | ctx.datasets.stats.encoded.cat |
Examples
Defining the Project Context (Control Plane) & Project Scope:Worker → Model → Fitter
Accessing worker’s inputs schema → parameters & types (shown in the display output):Model → Fitter
Once worker has been executed, we can obtain internal fitter state and its parametrization (shown in the display output):Attributes
All worker attributes return
None prior its execution.