causalexplain.gui package#
Subpackages#
Submodules#
NiceGUI app for local causalexplain workflows.
- has_active_model(active_model_state)[source]#
Return whether the GUI currently has a trained or loaded model.
Cytoscape helpers for NiceGUI graph rendering.
Helpers for shaping ReX diagnostics for GUI consumption.
- normalize_rex_diagnostics(diagnostics_by_regressor)[source]#
Stack per-regressor diagnostics into GUI-ready dataframes.
- regression_errors_for_all_targets(errors_long)[source]#
Return regression errors for all target variables.
- shap_values_for_target(shap_long, target)[source]#
Filter and sort SHAP mean values for a selected target variable.
- bootstrap_details_for_regressor(bootstrap_matrices, bootstrap_edges_long, regressor)[source]#
Return the matrix and edge table for the selected regressor.
Graph helper utilities for the GUI.
- dag_is_valid(graph, min_edges, max_edges)[source]#
Check that the graph is a DAG within the edge constraints.
File and path utilities for the GUI.
- normalize_output_value(raw_value, required_ext)[source]#
Normalize an output path by enforcing the required extension.
Rendering helpers for graphs, metrics, and diagnostics in the GUI.
- render_cytoscape_overlay(container, status_label, discoverer, ref_graph, *, persist_positions, height='420px')[source]#
Render an interactive overlay chart for predicted vs. reference DAGs.
- render_cytoscape_graph(container, graph, *, height='420px')[source]#
Render a DAG in a NiceGUI container using Cytoscape.
- render_regression_error_chart(errors_frame)[source]#
Return EChart options for grouped regression errors across targets.
- render_shap_mean_chart(shap_for_target, target)[source]#
Return EChart options for grouped SHAP mean values.
- render_bootstrap_heatmap(bootstrap_matrix, regressor)[source]#
Return EChart options for a regressor-specific bootstrap heatmap.
Default settings and persistence helpers for the GUI.
Style helpers for the causalexplain GUI.
UI helper utilities for NiceGUI widgets.
- update_settings(storage, settings_key, target, key, value)[source]#
Update a settings dict and persist it to NiceGUI storage.
- bind_setting(element, storage, settings_key, settings_ref, field)[source]#
Bind UI change events to a settings dictionary.
- async save_upload(upload_event, upload_dir, suffix=None)[source]#
Persist an uploaded file to the GUI upload folder.
Module contents#
GUI entry points for causalexplain.