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

# NumEncoderWorker.fit

**def NumEncoderWorker.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\num_encoder.py#L444)

Analyze and learn numerical bin encoding.

Executes the non-greedy bin search, min-bin-share
merging, and predictive gates for each numerical
feature. Results are stored as encoding maps ready for
`transform`.

#### Parameters

**`inputs`** : *`NumEncoderInput`*
Input configuration including training set and\
numerical feature lists.

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

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

#### Returns

*`NumEncoder`*
The fitted encoder instance.


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