Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
mixle 0.6.2
Light Logo Dark Logo

Start Here

  • Installation
  • Project Maturity
  • What Is New In 0.6.2
  • Quickstart
  • Core Concepts
  • Package Map
  • Model Lifecycle
  • Tutorials
    • Fitting Heterogeneous Records
    • PPL Mixture Workflow
    • Enumeration and Ranking
    • Production Artifacts
    • LLM Distillation Cascade
    • LLM Uncertainty
    • Representation And Model Families
    • Relations And Operations
    • Evolution And Analysis

Core Workflows

  • Neural and LLM Models
  • Automatic Inference
  • Model Families
  • Representation Layer
  • Task Distillation
  • Task Serving, Routing, And Edge Deployment
  • Agentic Task Distillation
  • Uncertainty
  • Reasoning Systems
  • Local Reasoning Ecosystem
  • HMMs and Latent Structure
  • Temporal And Stochastic Processes
  • Automatic Modeling Internals
  • Cookbook

Reference Guides

  • API Overview
  • Capabilities And Contracts
  • Compute Layer
  • Distribution Families
  • Univariate Families
  • Structured Statistical Families
  • Latent, Bayesian, And Nonparametric Families
  • Inference
  • Inference Toolkit
  • Probabilistic Programming
  • Operations
  • Relations
  • Compute Engines
  • Enumeration and Ranking
  • Data Layer
  • Design of Experiments
  • Analysis Utilities
  • Evolution And Search
  • Production Workflows
  • Utilities And Parallelism
  • Experimental Program API
  • Examples
  • Troubleshooting
  • Glossary
  • Extending mixle
  • Development

API Reference

  • mixle
    • mixle package
      • mixle.analysis package
        • mixle.analysis.covariance_shrinkage module
        • mixle.analysis.coverage module
        • mixle.analysis.extreme module
        • mixle.analysis.kde module
        • mixle.analysis.kriging module
        • mixle.analysis.max_stable module
        • mixle.analysis.rank_aggregation module
        • mixle.analysis.spatial_mixture module
      • mixle.data package
        • mixle.data.sources package
          • mixle.data.sources.arrow_source module
          • mixle.data.sources.graph_source module
          • mixle.data.sources.hadoop_source module
          • mixle.data.sources.mongo_source module
          • mixle.data.sources.pandas_source module
          • mixle.data.sources.spark_source module
          • mixle.data.sources.sql_source module
          • mixle.data.sources.text_source module
        • mixle.data.core module
        • mixle.data.encoded_io module
        • mixle.data.exchangeability module
        • mixle.data.hashing module
        • mixle.data.partition module
        • mixle.data.schema module
        • mixle.data.stream_token_source module
        • mixle.data.structure module
        • mixle.data.validate module
      • mixle.doe package
        • mixle.doe.active module
        • mixle.doe.analysis module
        • mixle.doe.batch module
        • mixle.doe.bayesopt module
        • mixle.doe.calibrate module
        • mixle.doe.constrained module
        • mixle.doe.designs module
        • mixle.doe.entropy module
        • mixle.doe.factorial module
        • mixle.doe.mixture module
        • mixle.doe.multifidelity module
        • mixle.doe.multiobjective module
        • mixle.doe.optimal module
        • mixle.doe.optimizer module
        • mixle.doe.propagate module
        • mixle.doe.sensitivity module
        • mixle.doe.trust_region module
      • mixle.engines package
        • mixle.engines.affine module
        • mixle.engines.arithmetic module
        • mixle.engines.base module
        • mixle.engines.bitpacked module
        • mixle.engines.build_kernels module
        • mixle.engines.error_tracing module
        • mixle.engines.extended module
        • mixle.engines.formats module
        • mixle.engines.heterogeneous module
        • mixle.engines.highprec module
        • mixle.engines.jax_engine module
        • mixle.engines.lns module
        • mixle.engines.lns_nn module
        • mixle.engines.numpy_engine module
        • mixle.engines.packing module
        • mixle.engines.precision module
        • mixle.engines.qlut module
        • mixle.engines.spectrum module
        • mixle.engines.symbolic_engine module
        • mixle.engines.symbolic_export module
        • mixle.engines.torch_engine module
      • mixle.enumeration package
        • mixle.enumeration.quantization package
          • mixle.enumeration.quantization.core module
          • mixle.enumeration.quantization.parallel module
          • mixle.enumeration.quantization.seek module
          • mixle.enumeration.quantization.semiring module
        • mixle.enumeration.algorithms module
        • mixle.enumeration.assignment module
        • mixle.enumeration.autoregressive module
        • mixle.enumeration.best_first module
        • mixle.enumeration.density_rank module
        • mixle.enumeration.envelope module
        • mixle.enumeration.hmm_paths module
        • mixle.enumeration.model_enumeration module
        • mixle.enumeration.rescore module
        • mixle.enumeration.seek_index module
        • mixle.enumeration.spanning module
        • mixle.enumeration.streams module
      • mixle.evolve package
        • mixle.evolve.improve module
        • mixle.evolve.ledger module
        • mixle.evolve.objective module
        • mixle.evolve.operators module
        • mixle.evolve.population module
        • mixle.evolve.search module
        • mixle.evolve.space module
        • mixle.evolve.structure module
        • mixle.evolve.verify module
      • mixle.experimental package
        • mixle.experimental.program module
      • mixle.inference package
        • mixle.inference.mcmc package
          • mixle.inference.mcmc.conjugate module
          • mixle.inference.mcmc.gradients module
          • mixle.inference.mcmc.nuts_numba module
          • mixle.inference.mcmc.nuts_torch module
          • mixle.inference.mcmc.parameter_bridge module
          • mixle.inference.mcmc.proposals module
          • mixle.inference.mcmc.samplers module
        • mixle.inference.production package
          • mixle.inference.production.drift module
          • mixle.inference.production.monitor module
          • mixle.inference.production.provenance module
          • mixle.inference.production.registry module
          • mixle.inference.production.serving module
        • mixle.inference.backends module
        • mixle.inference.bayesian_network module
        • mixle.inference.belief module
        • mixle.inference.blackbox module
        • mixle.inference.block_gibbs module
        • mixle.inference.calibrate_fit module
        • mixle.inference.calibration module
        • mixle.inference.causal module
        • mixle.inference.conformal module
        • mixle.inference.create module
        • mixle.inference.cross_validation module
        • mixle.inference.decision module
        • mixle.inference.diagnostics module
        • mixle.inference.em module
        • mixle.inference.errors_in_variables module
        • mixle.inference.estimation module
        • mixle.inference.event_study module
        • mixle.inference.explain module
        • mixle.inference.fisher module
        • mixle.inference.forecast module
        • mixle.inference.fusion_policy module
        • mixle.inference.glm module
        • mixle.inference.gradient_fit module
        • mixle.inference.heterogeneous_executor module
        • mixle.inference.jit module
        • mixle.inference.model_comparison module
        • mixle.inference.mpi_executor module
        • mixle.inference.multiple_testing module
        • mixle.inference.nonparametric module
        • mixle.inference.objectives module
        • mixle.inference.orchestration module
        • mixle.inference.ordinal module
        • mixle.inference.placement module
        • mixle.inference.planning module
        • mixle.inference.posterior module
        • mixle.inference.precision_plan module
        • mixle.inference.priors module
        • mixle.inference.project module
        • mixle.inference.reproduce module
        • mixle.inference.resampling module
        • mixle.inference.robust module
        • mixle.inference.scoring module
        • mixle.inference.select module
        • mixle.inference.simulate module
        • mixle.inference.skill module
        • mixle.inference.spark_executor module
        • mixle.inference.streaming module
        • mixle.inference.structure module
        • mixle.inference.survival module
        • mixle.inference.synthesize module
        • mixle.inference.target module
        • mixle.inference.uncertainty module
        • mixle.inference.uq module
      • mixle.models package
        • mixle.models.continual module
        • mixle.models.dependence module
        • mixle.models.dirichlet_process_mixture module
        • mixle.models.dpo_leaf module
        • mixle.models.embedding module
        • mixle.models.energy module
        • mixle.models.gaussian_process module
        • mixle.models.grammar module
        • mixle.models.knowledge_graph module
        • mixle.models.language_model module
        • mixle.models.mixture_density module
        • mixle.models.neural module
        • mixle.models.neural_density module
        • mixle.models.neural_families module
        • mixle.models.neural_leaf module
        • mixle.models.partially_observable_markov_decision_process module
        • mixle.models.random_forest module
        • mixle.models.random_graph module
        • mixle.models.softmax_leaf module
        • mixle.models.sparse_gaussian_process module
        • mixle.models.streaming_transformer_leaf module
        • mixle.models.train_search module
        • mixle.models.transformer module
      • mixle.ppl package
        • mixle.ppl.autograd module
        • mixle.ppl.conformal module
        • mixle.ppl.core module
        • mixle.ppl.density module
        • mixle.ppl.diagnostics module
        • mixle.ppl.distributions module
        • mixle.ppl.field module
        • mixle.ppl.guide module
        • mixle.ppl.inference module
        • mixle.ppl.neural module
        • mixle.ppl.predictive module
        • mixle.ppl.priors module
        • mixle.ppl.provenance module
        • mixle.ppl.regression module
        • mixle.ppl.rough_paths module
        • mixle.ppl.statespace module
        • mixle.ppl.summarize module
        • mixle.ppl.survival module
        • mixle.ppl.vmp module
      • mixle.pool package
        • mixle.pool.core module
      • mixle.reason package
        • mixle.reason.core module
        • mixle.reason.design module
        • mixle.reason.discrete module
        • mixle.reason.embedding module
        • mixle.reason.encoder module
        • mixle.reason.graph_llm module
        • mixle.reason.llm module
        • mixle.reason.model module
        • mixle.reason.ontology module
        • mixle.reason.store module
      • mixle.represent package
        • mixle.represent.api module
        • mixle.represent.embed module
        • mixle.represent.generative module
        • mixle.represent.graph module
        • mixle.represent.heterogeneous module
        • mixle.represent.learned_segment module
        • mixle.represent.modality module
        • mixle.represent.posterior module
        • mixle.represent.quantize module
        • mixle.represent.segment module
      • mixle.stats package
        • mixle.stats.bayes package
          • mixle.stats.bayes.conjugate module
          • mixle.stats.bayes.dict_dirichlet module
          • mixle.stats.bayes.dirichlet module
          • mixle.stats.bayes.dirichlet_process_mixture module
          • mixle.stats.bayes.hierarchical_dirichlet_process_mixture module
          • mixle.stats.bayes.multivariate_normal_gamma module
          • mixle.stats.bayes.normal_gamma module
          • mixle.stats.bayes.normal_wishart module
          • mixle.stats.bayes.pitman_yor module
          • mixle.stats.bayes.symmetric_dirichlet module
        • mixle.stats.combinator package
          • mixle.stats.combinator.censored module
          • mixle.stats.combinator.composite module
          • mixle.stats.combinator.conditional module
          • mixle.stats.combinator.exponential_tilt module
          • mixle.stats.combinator.finite_stochastic_transform module
          • mixle.stats.combinator.hurdle module
          • mixle.stats.combinator.ignored module
          • mixle.stats.combinator.null_dist module
          • mixle.stats.combinator.optional module
          • mixle.stats.combinator.record module
          • mixle.stats.combinator.schema module
          • mixle.stats.combinator.select module
          • mixle.stats.combinator.sequence module
          • mixle.stats.combinator.survival module
          • mixle.stats.combinator.transform module
          • mixle.stats.combinator.truncated module
          • mixle.stats.combinator.weighted module
          • mixle.stats.combinator.zero_inflated module
        • mixle.stats.compute package
          • mixle.stats.compute.backend module
          • mixle.stats.compute.capabilities module
          • mixle.stats.compute.declarations module
          • mixle.stats.compute.decomposition module
          • mixle.stats.compute.encoded module
          • mixle.stats.compute.exp_family module
          • mixle.stats.compute.fused_codegen module
          • mixle.stats.compute.fused_kernels module
          • mixle.stats.compute.fused_nested module
          • mixle.stats.compute.gradient module
          • mixle.stats.compute.kernel module
          • mixle.stats.compute.pdist module
          • mixle.stats.compute.posterior module
          • mixle.stats.compute.sampling_api module
          • mixle.stats.compute.sequence module
          • mixle.stats.compute.stacked module
          • mixle.stats.compute.torch_mixture module
        • mixle.stats.directional package
          • mixle.stats.directional.bingham module
          • mixle.stats.directional.kent module
          • mixle.stats.directional.projected_normal module
          • mixle.stats.directional.von_mises module
          • mixle.stats.directional.von_mises_fisher module
          • mixle.stats.directional.watson module
          • mixle.stats.directional.wrapped_cauchy module
          • mixle.stats.directional.wrapped_normal module
        • mixle.stats.graphs package
          • mixle.stats.graphs.erdos_renyi_graph module
          • mixle.stats.graphs.hyperedge_replacement_grammar module
          • mixle.stats.graphs.knowledge_graph module
          • mixle.stats.graphs.random_dot_product_graph module
          • mixle.stats.graphs.stochastic_block_graph module
          • mixle.stats.graphs.temporal_graph_grammar module
          • mixle.stats.graphs.vertex_replacement_grammar module
        • mixle.stats.latent package
          • mixle.stats.latent.chained_attention module
          • mixle.stats.latent.dirac_length module
          • mixle.stats.latent.gaussian_mixture module
          • mixle.stats.latent.heterogeneous_mixture module
          • mixle.stats.latent.heterogeneous_pcfg module
          • mixle.stats.latent.hidden_association module
          • mixle.stats.latent.hidden_markov module
          • mixle.stats.latent.hierarchical module
          • mixle.stats.latent.hierarchical_mixture module
          • mixle.stats.latent.hmm_determinize module
          • mixle.stats.latent.indian_buffet_process module
          • mixle.stats.latent.integer_hidden_association module
          • mixle.stats.latent.integer_probabilistic_latent_semantic_indexing module
          • mixle.stats.latent.joint_mixture module
          • mixle.stats.latent.labeled_lda module
          • mixle.stats.latent.lda module
          • mixle.stats.latent.lookback_hidden_markov_model module
          • mixle.stats.latent.mixture module
          • mixle.stats.latent.probabilistic_circuit module
          • mixle.stats.latent.probabilistic_pca module
          • mixle.stats.latent.quantized_hidden_markov_model module
          • mixle.stats.latent.responsibility_attention module
          • mixle.stats.latent.scheduled_hidden_markov_model module
          • mixle.stats.latent.segmental_hidden_markov_model module
          • mixle.stats.latent.semi_supervised_hidden_markov_model module
          • mixle.stats.latent.semi_supervised_mixture module
          • mixle.stats.latent.sparse_mixture module
          • mixle.stats.latent.structured_hmm module
          • mixle.stats.latent.tree_hidden_markov_model module
          • mixle.stats.latent.variational_embedding_attention module
          • mixle.stats.latent.variational_multihop_attention module
        • mixle.stats.matrix package
          • mixle.stats.matrix.inverse_wishart module
          • mixle.stats.matrix.lkj module
          • mixle.stats.matrix.matrix_normal module
          • mixle.stats.matrix.wishart module
        • mixle.stats.multivariate package
          • mixle.stats.multivariate.categorical_multinomial module
          • mixle.stats.multivariate.composition module
          • mixle.stats.multivariate.diagonal_gaussian module
          • mixle.stats.multivariate.dirichlet_multinomial module
          • mixle.stats.multivariate.gaussian_copula module
          • mixle.stats.multivariate.integer_multinomial module
          • mixle.stats.multivariate.multivariate_gaussian module
          • mixle.stats.multivariate.multivariate_student_t module
        • mixle.stats.processes package
          • mixle.stats.processes.birth_death module
          • mixle.stats.processes.chinese_restaurant_process module
          • mixle.stats.processes.ctmc module
          • mixle.stats.processes.hawkes_process module
          • mixle.stats.processes.inhomogeneous_poisson module
          • mixle.stats.processes.multivariate_hawkes module
          • mixle.stats.processes.power_law_hawkes module
          • mixle.stats.processes.renewal_process module
          • mixle.stats.processes.temporal module
        • mixle.stats.rankings package
          • mixle.stats.rankings.bradley_terry module
          • mixle.stats.rankings.ewens module
          • mixle.stats.rankings.generalized_mallows module
          • mixle.stats.rankings.generalized_mallows_model module
          • mixle.stats.rankings.low_rank_permutation module
          • mixle.stats.rankings.mallows module
          • mixle.stats.rankings.matching module
          • mixle.stats.rankings.paired_comparison module
          • mixle.stats.rankings.plackett_luce module
          • mixle.stats.rankings.spearman_rho module
          • mixle.stats.rankings.thurstone module
        • mixle.stats.sequences package
          • mixle.stats.sequences.integer_markov_chain module
          • mixle.stats.sequences.markov_chain module
          • mixle.stats.sequences.markov_transform module
          • mixle.stats.sequences.sparse_markov_transform module
        • mixle.stats.sets package
          • mixle.stats.sets.bernoulli_set module
          • mixle.stats.sets.integer_bernoulli_edit module
          • mixle.stats.sets.integer_bernoulli_set module
          • mixle.stats.sets.integer_step_bernoulli_edit module
        • mixle.stats.trees package
          • mixle.stats.trees.chow_liu_tree module
          • mixle.stats.trees.integer_chow_liu_tree module
          • mixle.stats.trees.spanning_tree module
        • mixle.stats.univariate package
          • mixle.stats.univariate.continuous package
            • mixle.stats.univariate.continuous.beta module
            • mixle.stats.univariate.continuous.exgaussian module
            • mixle.stats.univariate.continuous.exponential module
            • mixle.stats.univariate.continuous.gamma module
            • mixle.stats.univariate.continuous.gaussian module
            • mixle.stats.univariate.continuous.generalized_extreme_value module
            • mixle.stats.univariate.continuous.generalized_gaussian module
            • mixle.stats.univariate.continuous.generalized_pareto module
            • mixle.stats.univariate.continuous.gumbel module
            • mixle.stats.univariate.continuous.half_normal module
            • mixle.stats.univariate.continuous.inverse_gamma module
            • mixle.stats.univariate.continuous.inverse_gaussian module
            • mixle.stats.univariate.continuous.laplace module
            • mixle.stats.univariate.continuous.log_gaussian module
            • mixle.stats.univariate.continuous.logistic module
            • mixle.stats.univariate.continuous.nakagami module
            • mixle.stats.univariate.continuous.pareto module
            • mixle.stats.univariate.continuous.rayleigh module
            • mixle.stats.univariate.continuous.rician module
            • mixle.stats.univariate.continuous.skew_normal module
            • mixle.stats.univariate.continuous.student_t module
            • mixle.stats.univariate.continuous.tweedie module
            • mixle.stats.univariate.continuous.uniform module
            • mixle.stats.univariate.continuous.weibull module
          • mixle.stats.univariate.discrete package
            • mixle.stats.univariate.discrete.bernoulli module
            • mixle.stats.univariate.discrete.beta_binomial module
            • mixle.stats.univariate.discrete.binomial module
            • mixle.stats.univariate.discrete.categorical module
            • mixle.stats.univariate.discrete.geometric module
            • mixle.stats.univariate.discrete.integer_categorical module
            • mixle.stats.univariate.discrete.integer_uniform_spike module
            • mixle.stats.univariate.discrete.logseries module
            • mixle.stats.univariate.discrete.negative_binomial module
            • mixle.stats.univariate.discrete.point_mass module
            • mixle.stats.univariate.discrete.poisson module
            • mixle.stats.univariate.discrete.skellam module
        • mixle.stats.missing module
      • mixle.substrate package
        • mixle.substrate.act module
        • mixle.substrate.answer module
        • mixle.substrate.context module
        • mixle.substrate.core module
        • mixle.substrate.factuality module
        • mixle.substrate.freshness module
        • mixle.substrate.governance module
        • mixle.substrate.harness module
        • mixle.substrate.ingest module
        • mixle.substrate.interop module
        • mixle.substrate.kg_rag module
        • mixle.substrate.multihop module
        • mixle.substrate.reasoner module
        • mixle.substrate.retrieve module
        • mixle.substrate.security module
        • mixle.substrate.spaces module
        • mixle.substrate.trust module
      • mixle.task package
        • mixle.task.active module
        • mixle.task.artifact module
        • mixle.task.calibrate module
        • mixle.task.cascade module
        • mixle.task.constrained module
        • mixle.task.density module
        • mixle.task.design module
        • mixle.task.distill module
        • mixle.task.distill_methods module
        • mixle.task.economics module
        • mixle.task.edge module
        • mixle.task.extract module
        • mixle.task.generative_text module
        • mixle.task.harness module
        • mixle.task.llm module
        • mixle.task.model module
        • mixle.task.multilabel module
        • mixle.task.plan module
        • mixle.task.quantize module
        • mixle.task.recommend module
        • mixle.task.regress module
        • mixle.task.router module
        • mixle.task.scorecard module
        • mixle.task.sft_plan module
        • mixle.task.solve module
        • mixle.task.structured_out module
        • mixle.task.toolcall module
        • mixle.task.traces module
        • mixle.task.tune module
      • mixle.telemetry package
        • mixle.telemetry.core module
        • mixle.telemetry.dashboard module
      • mixle.utils package
        • mixle.utils.automatic package
          • mixle.utils.automatic.detectors package
            • mixle.utils.automatic.detectors.beta module
            • mixle.utils.automatic.detectors.exgaussian module
            • mixle.utils.automatic.detectors.generalized_extreme_value module
            • mixle.utils.automatic.detectors.generalized_gaussian module
            • mixle.utils.automatic.detectors.generalized_pareto module
            • mixle.utils.automatic.detectors.gumbel module
            • mixle.utils.automatic.detectors.inverse_gaussian module
            • mixle.utils.automatic.detectors.laplace module
            • mixle.utils.automatic.detectors.logistic module
            • mixle.utils.automatic.detectors.negative_binomial module
            • mixle.utils.automatic.detectors.pareto module
            • mixle.utils.automatic.detectors.skew_normal module
            • mixle.utils.automatic.detectors.tweedie module
            • mixle.utils.automatic.detectors.weibull module
          • mixle.utils.automatic.factories module
          • mixle.utils.automatic.profiling module
        • mixle.utils.hvis package
          • mixle.utils.hvis.affinity module
          • mixle.utils.hvis.embed module
          • mixle.utils.hvis.neighbors module
          • mixle.utils.hvis.tsne module
        • mixle.utils.parallel package
          • mixle.utils.parallel.balance module
          • mixle.utils.parallel.dcp_checkpoint module
          • mixle.utils.parallel.lightning_data module
          • mixle.utils.parallel.model_decomposition module
          • mixle.utils.parallel.model_parallel module
          • mixle.utils.parallel.mpi module
          • mixle.utils.parallel.multiprocessing module
          • mixle.utils.parallel.planner module
          • mixle.utils.parallel.ray_data module
          • mixle.utils.parallel.torch_neural module
          • mixle.utils.parallel.torchrun module
        • mixle.utils.aliasing module
        • mixle.utils.evaluation module
        • mixle.utils.metrics module
        • mixle.utils.optional_deps module
        • mixle.utils.optsutil module
        • mixle.utils.pvalues module
        • mixle.utils.serialization module
        • mixle.utils.special module
        • mixle.utils.vector module
      • mixle.capability module
      • mixle.contracts module
      • mixle.dist module
      • mixle.lifecycle module
      • mixle.ops module
      • mixle.process module
      • mixle.program module
      • mixle.relations module
      • mixle.scientist module

Architecture Notes

  • Architecture Notes
Back to top
View this page

Evolution And Search¶

mixle.evolve is the self-improvement layer: measure, propose, verify, and promote. It is designed for model iteration where a candidate must earn its way into production through a proper objective and an anti-regression gate.

The package adds orchestration. It does not replace the modeling stack. It uses existing Mixle scoring, calibration, estimation, automatic model selection, and decision utilities, then organizes them into repeatable improvement loops.

The Loop¶

The core loop has four phases:

  1. Measure a champion model with an Objective.

  2. Propose challengers with ImprovementOperator objects.

  3. Verify challenger performance on held-out data.

  4. Promote only if the Verdict passes the gate.

from mixle.evolve import improve, nll_objective

result = improve(
    champion,
    data,
    objective=nll_objective(),
    holdout=0.25,
    alpha=0.05,
    min_effect=0.01,
)

model = result.model

If result.verified is true, the returned model beat the champion under the specified gate. If not, the champion is retained.

Objectives¶

Objective builders include:

  • nll_objective;

  • log_score_objective;

  • crps_objective;

  • interval_objective;

  • calibration_objective;

  • decision_regret_objective.

Use likelihood objectives when the model is generative and the probability assignment itself matters. Use calibration and interval objectives when uncertainty quality matters. Use decision regret when the model ultimately drives an action.

Verification¶

challenger_beats_champion compares two fitted models on the same held-out data. The verification gate can include:

  • paired objective comparison;

  • a practical minimum effect size;

  • calibration no-regression checks;

  • non-nested model comparison for family swaps;

  • multiplicity adjustment when several challengers are tried;

  • optional LOO or WAIC pointwise arrays when available.

from mixle.evolve import challenger_beats_champion, log_score_objective

verdict = challenger_beats_champion(
    champion,
    challenger,
    heldout,
    objective=log_score_objective(),
    nonnested=True,
)

if verdict.promote:
    champion = challenger

The verification step is the difference between automatic improvement and automatic churn.

Improvement Operators¶

Built-in operators include:

  • Refit for fitting the same family on fresh data;

  • OnlineUpdate for streaming-compatible updates;

  • AutoSelect for automatic family selection;

  • Recalibrate for calibration repair;

  • Recompose and Mutate for structural moves, registered but expensive and off by default in conservative loops.

Operators advertise applicability and a cost hint. improve can use a budget so cheap candidates are tried before expensive candidates.

Ledgers¶

EvolutionLedger records attempts, operators, deltas, costs, verdicts, and metadata. Use it whenever an improvement loop affects a model that another person or process will rely on.

from mixle.evolve import EvolutionLedger

ledger = EvolutionLedger()
result = improve(champion, data, objective=nll_objective(), ledger=ledger)

A ledger makes it possible to answer the important operational questions: which candidates were tried, why were they rejected, and what evidence justified promotion?

Automatic Selection¶

auto_select infers and fits a model from raw data. With criterion="bic" it delegates to automatic in-sample selection. With a proper-score objective, it can add a held-out verification gate.

from mixle.evolve import auto_select, nll_objective

result = auto_select(data, criterion=nll_objective(), verify=True)

For user-facing model design and LLM-proposed specifications, see Automatic Inference. evolve.auto_select is the promotion-oriented version: it is concerned with whether the selected model should be trusted under a gate.

Typed Search Spaces¶

Space describes a typed search space over Real, Integer, and Categorical dimensions.

from mixle.evolve import Categorical, Integer, Real, Space

space = Space({
    "components": Integer(1, 6),
    "alpha": Real(0.1, 5.0, log=True),
    "family": Categorical(["gaussian", "student_t"]),
})

The search surface is model-agnostic. You provide a build_fn that maps a configuration dictionary to a fitted model.

from mixle.evolve import search, nll_objective

result = search(
    space,
    data,
    objective=nll_objective(),
    build_fn=fit_from_config,
    method="evolutionary",
    n_iter=30,
)

best_model = result.best_model

Search methods include:

  • "bo" for Bayesian optimization over the encoded numeric box;

  • "evolutionary" for population search over samples and neighbors;

  • "bandit" for an operator policy that learns which moves help.

Structure Search¶

model_signature, tree_edit_distance, and structural_distance expose distance between compositional model trees. Recompose and Mutate use that structure to propose model changes.

This is intentionally conservative. Structural search can be powerful, but it has high variance and a larger blast radius than recalibration or refitting. Use it with held-out gates, ledgers, and clear budgets.

Production Standard¶

Use mixle.evolve when model changes should be auditable. A mature loop should state:

  • the champion model and lineage hash;

  • the objective being optimized;

  • the held-out split or verification data;

  • every operator tried;

  • the statistical and practical promotion thresholds;

  • the calibration and decision no-regression checks;

  • the final verdict and ledger entry.

That standard is the path from automatic inference to automatic improvement: models can become more capable over time without making silent regressions easy to hide.

API Inventory¶

Area

Imports

Improvement results

ImprovementResult, Verdict

Operator registry

register_operator, unregister_operator, registered_operators, default_operators

Search results

SearchResult, Population, OperatorBandit

Next
Production Workflows
Previous
Analysis Utilities
Copyright © 2014-2026, Grant Boquet and contributors
Made with Sphinx and @pradyunsg's Furo
On this page
  • Evolution And Search
    • The Loop
    • Objectives
    • Verification
    • Improvement Operators
    • Ledgers
    • Automatic Selection
    • Typed Search Spaces
    • Structure Search
    • Production Standard
    • API Inventory