Skip to main content
def DataEncoderWorker.transform(self, data, test_size=None) [source]
Training phase utility for automatic feature encoding, preprocessing, and train/test splits.
  • Native Dtype Enforcement:
    • Converts datasets to native NumPy/Pandas dtypes to ensure full compatibility with LightGBM, XGBoost, and Scikit-Learn.
    • Prevents repeated N-step conversions during training, minimizing peak pipeline RAM footprint.
  • Train/Test Partitioning:
    • Retains user-supplied test_set if explicitly provided.
    • Automatically splits data / train_set by test_size if no test set is present.
  • Feature Encoding Extension:
    • Extends train and test sets by WOE features given project-level fitted encoding (only if WoeEncoder was fitted during pipeline).

Parameters

data : pDF | pa.Table | DataEncoderInput
The raw or input-config data to be encoded for ML sampling.
test_size : float
Fraction of data allocated to the test set (used only when
no explicit test set is provided).
• None: uses value set during init
• 0: returns test_set = None - no data split

Returns

DataEncoderResult
An object containing synchronized train and test sets ready for agents.