eqdisco.analysis.select_model#

eqdisco.analysis.select_model(equations, rule='best', X=None, y=None, X_val=None, y_val=None, tolerance=0.05)[source]#

Choose one equation from a list (typically a Pareto front).

Parameters:
rule{“best”, “bic”, “aic”, “knee”, “tolerance”, “score”, “validation”}
  • best – lowest error on (X, y) (or stored MSE);

  • bic/aic – lowest information criterion on (X, y) (the residual sum of squares is floored at \(10^{-10}\) of the total sum of squares, so that exact fits tie; ties go to the simplest model);

  • knee – knee of the error–complexity front;

  • tolerance – simplest equation whose error is at most (1 + tolerance) times the lowest error (plus \(10^{-10}\) times the variance of y, so that exact fits tie);

  • score – the rule of PySR (Cranmer, 2023): among the models whose error is at most 1.5 times the lowest, the one with the largest decrease of the log-error per unit of complexity;

  • validation – lowest error on (X_val, y_val).

Examples using eqdisco.analysis.select_model#

The Pareto front and the choice of one model

The Pareto front and the choice of one model