> ## 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.

# AgentPredictorWorker.preprocess

**def AgentPredictorWorker.preprocess**(self, data) [\[source\]](https://github.com/aigensys-labs/aidflow/blob/main/AID/\TRUENAS\aig_modeling_Products\AID\1_0_Lib\AID\selector\select\agent\champion_predictor.py#L706)

Orchestrates the full transformation chain using the
encoder states locked during `fit`. This eliminates
training-serving skew by guaranteeing that production
data is processed identically to training data.

<table>
  <tbody>
    <tr><td>`Production data pipeline: raw`</td><td>→</td><td>ML-ready.</td></tr>
  </tbody>
</table>

> [!NOTE]
>
> * **GBM agents**: cleaning only (raw features go
>   directly to the model).
>
> <table>
>   <tbody>
>     <tr><td>`GLM agents**: cleaning`</td><td>→</td><td>WOE encoding.</td></tr>
>   </tbody>
> </table>

#### Parameters

**`data`** : *`pDF`*
Raw input DataFrame containing the original\
(pre-WOE) feature columns.

#### Returns

*`pDF`*
ML-ready data, formatted exactly as the champion\
model expects. Ready for `transform`.


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