eqdisco.llm.LLMGuidedRegressor#
- class eqdisco.llm.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,RegressorMixinIterative 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:
- proposer
callable() proposer(prompt) -> text.- n_iterations
int, default=10 - n_proposals
int, default=5 - n_feedback
int, default=5 Number of best equations shown in the prompt.
- description
str,optional Scientific context of the task.
- variable_descriptions
dict,optional Meaning (and units) of the variables.
- seed_equations
listofstr,optional Initial pool.
- proposer
- Attributes:
- equation_
Equation - pareto_front_
listofEquation - history_
pandas.DataFrame - prompts_
listofstr The prompts sent (for auditing).
- equation_