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

# Agent1PredictorWorker.fit

**def Agent1PredictorWorker.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\learner\agents\agent1_predictor.py#L453)

Train the sparse GLM agent on WOE-encoded features.

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

#### Parameters

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

**`fx_choice`** : *`str`*
The fitting strategy identifier. Defaults to REG.AIG.

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

#### Returns

*`Agent1Predictor`*
The fitted agent instance.


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