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

# Agent2PredictorWorker.fit

**def Agent2PredictorWorker.fit**(self, inputs, fx\_choice=REG.ELASTIC, \*\*params) [\[source\]](https://github.com/aigensys-labs/aidflow/blob/main/AID/\TRUENAS\aig_modeling_Products\AID\1_0_Lib\AID\learner\agents\agent2_predictor.py#L514)

Train the dense GLM agent on WOE-encoded features.

Executes the full two-stage feature selection pipeline
(regularization search + shadow pruning), fits the
final Logistic Regression, and computes validation
diagnostics.

#### Parameters

**`inputs`** : *`Agent2Input`*
Training configuration including train\_set and\
woe\_features.

**`fx_choice`** : *`str`*
The regularization strategy: REG.ELASTIC (default),\
REG.LASSO, or REG.LOGREG.

**`**params`** : *`dict`*
Runtime parameters passed to the internal fitter\
(glm\_eps, glm\_tol, shadow\_quantile, cross\_val\_folds).

#### Returns

*`Agent2Predictor`*
The fitted agent instance.


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