eqdisco.models.LLMGuidedRegressor#

class eqdisco.models.LLMGuidedRegressor(proposer=None, n_iterations=10, n_proposals=5, n_feedback=5, description=None, variable_descriptions=None, seed_equations=None, model_selection='bic', selection_tolerance=0.01, feature_names=None, random_state=None)[source]#

Bases: BaseEstimator, RegressorMixin

Iterative equation discovery with a proposer (LLM or templates) and constant fitting.

In every iteration the proposer receives the prompt of build_prompt() with the best equations so far; the proposals are parsed, their constants are fitted by Levenberg–Marquardt with restarts, and the pool of evaluated equations is updated. The final model is chosen from the Pareto front of the pool.

Parameters:
proposercallable()

proposer(prompt) -> text.

n_iterationsint, default=10
n_proposalsint, default=5
n_feedbackint, default=5

Number of best equations shown in the prompt.

descriptionstr, optional

Scientific context of the task.

variable_descriptionsdict, optional

Meaning (and units) of the variables.

seed_equationslist of str, optional

Initial pool.

Attributes:
equation_Equation
pareto_front_list of Equation
history_pandas.DataFrame
prompts_list of str

The prompts sent (for auditing).