> ## Documentation Index
> Fetch the complete documentation index at: https://aidflow.aigensys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Predictor.data_encode

**def Predictor.data\_encode**(self, data=None, test\_size=0.0) [\[source\]](https://github.com/aigensys-labs/aidflow/blob/main/AID/\TRUENAS\aig_modeling_Products\AID\1_0_Lib\AID\predictor\predictor.py#L487)

Apply full encoding pipeline to produce ML-ready data.

Executes dtypes standardization (if mismatch), outlier
removal (optional), WOE encoding, and train/test split.

#### Parameters

**`data`** : *`pDF | None`*
Input data - both raw and preprocessed supported.

**`test_size`** : *`float`*
Fraction of data allocated to the test set (used only when\
no explicit test set is provided).\
• Special case for 0 - returns None for test\_set.

#### Returns

*`DataEncoderResult`*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.