glm-factor-optimizer Documentation¶
glm-factor-optimizer helps you design GLM factors in a way that is easy to
inspect, rerun, and save. Use it to learn numeric bins, group categorical
levels, rank candidate factors, compare validation results, and preserve the
choices as reviewable artifacts.
For LLM-assisted workflows, start with the LLM Quickstart,
the sitemap, or the plain-text llms.txt project map.
A typical modeling session looks like this:
- Split data into train, validation, and holdout.
- Rank coarse candidate factors.
- Work factor by factor with
FactorBlock. - Accept bins/groups deliberately after inspection.
- Fit the current main-effects model.
- Refine accepted factors with the full model fixed.
- Search and test candidate interactions.
- Finalize once on holdout.
- Save specs, history, metrics, and validation tables.
Documentation Map¶
Tutorial:
Discovery:
How-to guides:
- Rank and Screen Candidate Factors
- Refine Factors With the Full Model Fixed
- Test and Accept Interactions
- Run an Automatic Baseline Workflow
- Save and Audit a Study
Reference:
Explanation:
Main Interfaces¶
Use GLMStudy for iterative notebook modeling:
from glm_factor_optimizer import GLMStudy
study = GLMStudy(
df,
target="events",
exposure="hours",
prediction="predicted_count",
)
Use RateGLM or GLM for low-level manual work:
from glm_factor_optimizer import RateGLM
glm = RateGLM(target="events", exposure="hours")
Use GLMWorkflow for compact batch baselines:
from glm_factor_optimizer import GLMWorkflow
Use glm_factor_optimizer.spark for Spark-oriented primitives.