Visualization#

Static visualizations of equations, searches and analyses (matplotlib).

Every function returns the matplotlib Axes (or the Figure of a multi-panel plot) and accepts ax= to draw into an existing axes. Colors follow the house style of the ComplexSystemsIntelligence toolboxes: the Okabe–Ito palette for data and node classes, Pannon blue for structure, gray for context.

Matplotlib views of expressions, searches, models and diagnostics.

Functions#

plot_tree(model[, ax, digits, fontsize, ...])

Draw an expression tree: functions blue, variables green, parameters orange.

plot_pareto(models[, X, y, ax, selected, ...])

Error--complexity front; the selected model is highlighted.

plot_convergence(history[, ax, loss, size, ...])

Best (and median) loss per generation; mean program size on a second axis.

plot_parity(y, yhat[, ax, label, color, s])

Predicted against measured values with the identity line and \(R^2\).

plot_residuals(y, yhat[, order])

Two panels: residuals against fitted values, and a normal Q--Q plot.

plot_partial_dependence(model, X[, ...])

Response curves of the model along each variable (others at sampled values).

plot_sensitivity(table[, ax, column])

Horizontal bars of a sensitivity table (eqdisco.analysis.local_sensitivity()).

plot_sobol(table[, ax])

First-order and total Sobol indices side by side.

plot_terms(table[, ax, value, max_label])

Bars of the error reduction ratios (or unique contributions) of the additive terms.

plot_err_path(result[, ax, labels])

Cumulative ERR along a forward OLS selection (eqdisco.ols.forward_ols()).

plot_building_blocks(G[, ax, max_label, seed])

Co-occurrence network of building blocks: node area ~ support, edge width ~ lift.

plot_variable_interactions(G[, ax])

Variable interaction network: node area ~ usage, edge width ~ interaction frequency.

plot_families(equations, X[, y, threshold, ...])

Dendrogram of the semantic distances and the map of the model families.

plot_simulation(t, y, y_model[, ax, labels, ...])

Measured and simulated (or predicted) trajectories.

plot_phase_portrait(Z[, Z_model, ax, dims, ...])

Phase portrait of measured and model trajectories.

plot_equation(model[, ax, lhs, digits, fontsize])

Typeset an equation with matplotlib mathtext (falls back to plain text).

plot_prediction_band(x, y, yhat, lower, upper)

Model curve with an uncertainty band over one input variable.

plot_interaction_matrix(M, names[, ax, cmap])

Heat map of a pairwise interaction or separability matrix.

plot_posterior(posterior[, top, ax, ...])

Posterior probabilities (or sample shares, column="share") of the most probable structures.

plot_benchmark(results[, metric, ax, by])

Box plots of a benchmark metric per method (eqdisco.benchmarks.run_benchmark()).

plot_compare_convergence(histories[, ax, ...])

Convergence of several runs or methods on common axes ({name: history}).

plot_drift(report[, ax])

Population stability index per variable and the share of samples outside the training box.

plot_dashboard(estimator, X, y[, X_test, y_test])

One-page report of a fitted search: equation, tree, Pareto front, parity and convergence.

Constants#

BRAND

Pannon blue, used for structure (edges, lines of the model).

OKABE_ITO

The color-blind-safe palette of Okabe and Ito.

PALETTE

Fixed colors of node kinds and plot elements.