mixle.task.recommend module¶
Decision-oriented model recommendation for heterogeneous data samples.
recommend_model wraps mixle.utils.automatic.analyze_structure() and
returns an object a program can inspect, store, and optionally fit. The
recommendation includes:
the selected estimator;
per-field family choices, runner-up families, and bit-scale confidence gaps;
low-confidence fields where more data or domain review would sharpen the choice;
pairwise dependencies that support modeling fields jointly; and
profile warnings that should be reviewed before production use.
Pass fit=True to attach a fitted model to the returned recommendation.
- class FieldChoice(path, kind, family, runner_up, gap_bits)[source]
Bases:
objectThe family chosen for one field, the runner-up, and how decisive the choice was (bits/obs).
- property confident: bool
Confident when the family is type-determined (no real contender) or clears the runner-up by a margin.
- class ModelRecommendation(estimator, fields, dependencies, warnings, profile=None)[source]
Bases:
objectA model shape recommended from data: estimator, per-field choices+confidence, dependencies, and notes.
- Parameters:
- low_confidence_fields()[source]
Fields whose family choice is not yet decisive – where more data would most sharpen the model.
- Return type:
list[FieldChoice]
- fit(data, **kwargs)[source]
Fit the recommended estimator on
dataand return the model.
- recommend_model(data, *, fit=False, **analyze_kwargs)[source]
Recommend a model shape for
data(and optionally fit it); seeModelRecommendation.analyze_kwargspass through tomixle.utils.automatic.analyze_structure()(sampling, pairwise budget, validation). Withfit=Truethe returned recommendation’sestimatoris also fit and the model is attached as.model.