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

# CatEncoderWorker.fit

**def CatEncoderWorker.fit**(self, inputs, fx\_choice=REG.AIG, \*\*params) [\[source\]](https://github.com/aigensys-labs/aidflow/blob/main/AID/\TRUENAS\aig_modeling_Products\AID\1_0_Lib\AID\data\encode\cat_encoder.py#L443)

Analyze and learn categorical encoding.

Executes the predictive gates, missing handling, and
min-bin-share merging for each categorical feature.
Results are stored as encoding maps ready for
`transform`.

#### Parameters

**`inputs`** : *`CatEncoderInput`*
Input configuration including train\_set and\
categorical feature lists.

**`fx_choice`** : *`str`*
The categorical encoding strategy. Defaults to REG.AIG.

**`**params`** : *`dict`*
Runtime parameters passed to the internal fitter\
(gini\_cutoff, min\_bin\_share).

#### Returns

*`CatEncoder`*
The fitted encoder instance.


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