Domain knowledge#

Prior knowledge: physical units, shape constraints and symmetries.

  • eqdisco.knowledge.units – unit algebra, dimensional consistency of expressions, Buckingham \(\Pi\) groups;

  • eqdisco.knowledge.constraints – shape constraints (monotonicity, convexity, bounds) checked by interval arithmetic or sampling;

  • eqdisco.knowledge.symmetry – separability and symmetry tests on data or black-box models.

Units and dimensional analysis, shape constraints, symmetry and separability tests.

Classes#

Unit([exponents])

Exponents of the SI base units; supports *, / and **.

ShapeConstraint(kind[, variable, lower, ...])

A constraint on the model or on one of its partial derivatives.

Functions#

parse_unit(text)

Parse a unit such as "kg*m/s^2", "1/s", "N" or "1" (dimensionless).

check_units(equation, units[, ...])

Dimensional analysis of an equation.

unit_violations(expr, units, feature_names)

Number of dimensional violations (used as a penalty by the search).

buckingham_pi(units[, target])

Dimensionless groups of the variables (Buckingham \(\Pi\) theorem).

dimensionless_features(X, feature_names, groups)

Values of the dimensionless groups \(\Pi_k=\prod_j x_j^{a_{kj}}\) from data.

check_constraints(equation, constraints[, ...])

Share of the domain where each constraint is violated.

constraint_violation(expr, constraints, domain)

Mean share of the domain where the constraints fail (0 = all satisfied).

fit_surrogate(X, y[, hidden, random_state, ...])

Smooth neural-network surrogate of the data (standardized inputs and output).

separability(f, X, group_a[, kind, n_pairs, ...])

Relative violation of separability between group_a and the other variables.

interaction_matrix(f, X[, kind, n_pairs, ...])

Pairwise interaction strength: separability of variable i from j with the others fixed.

symmetry_tests(f, X[, feature_names, n, ...])

Translational and scaling symmetries of every pair of variables.

suggest_structure(f, X[, feature_names, tol])

Plain-language list of the separabilities and symmetries detected (threshold tol).