helix.components package

Subpackages

Submodules

helix.components.configuration module

helix.components.configuration.data_split_options_box(manual: bool = False) DataSplitOptions

Component for configuring data split options.

TODO: in a future PR remove the manual param when we can perform holdout and kfold with grid search.

Parameters:

manual (bool) – Using manual hyperparameter setting?

Returns:

The options used to split the data.

Return type:

DataSplitOptions

helix.components.configuration.display_options(experiment_path: Path) None

Display the options in the sidebar.

helix.components.configuration.plot_options_box(plot_opts: PlottingOptions | None = None)

Expander containing the options for making plots

Parameters:

plot_opts (PlottingOptions, optional) – Plot options loaded from configuration. If provided, use these values instead of defaults.

helix.components.experiments module

helix.components.experiments.data_selector(options: list) Path

Select a model or models to explain. This function creates a multiselect widget to allow the user to select multiple models to explain using the FI pipeline.

Parameters:

options (list) – The list of model names to choose from.

Returns:

The path to the model on disk.

Return type:

Path

helix.components.experiments.experiment_selector(options: list) str

Select

Parameters:

options (list) – The list of experiment names to choose from.

Returns:

The name of the experiment on disk.

Return type:

str

helix.components.experiments.model_selector(options: list) Path

Select a model or models to explain. This function creates a multiselect widget to allow the user to select multiple models to explain using the FI pipeline.

Parameters:

options (list) – The list of model names to choose from.

Returns:

The path to the model on disk.

Return type:

Path

helix.components.logs module

helix.components.logs.log_box(box_title: str, key: Literal[MachineLearningStateKeys.MLLogBox, FeatureImportanceStateKeys.FILogBox, FuzzyStateKeys.FuzzyLogBox])

Display a text area which shows that logs of the current pipeline run.

helix.components.plot_editor module

Component for editing plot appearance.

helix.components.plot_editor.edit_plot_modal(plot_opts: PlottingOptions, plot_type: str) PlottingOptions

Display a modal dialog for editing plot appearance.

Parameters:
  • plot_opts (PlottingOptions) – The current plotting options

  • plot_type (str) – Type of plot being edited (e.g., ‘target_distribution’, ‘heatmap’, ‘pairplot’, ‘tsne’) Used to create unique form IDs for each plot type.

Returns:

The new plotting options for the specific plot.

Return type:

PlottingOptions

helix.components.plot_editor.get_safe_index(value: str, options: list[str], default_value: str) int

Safely get the index of a value in a list, returning the index of a default if not found.

Parameters:
  • value – The value to find in the list

  • options – List of options to search in

  • default_value – Default value to use if value is not found

Returns:

Index of the value in the list, or index of default_value

helix.components.plots module

helix.components.plots.display_metrics_table(metrics_path: Path)

Display a metrics summary table in a Streamlit app.

Parameters:

metrics_path (Path) – The path to the metrics file.

helix.components.plots.display_predictions(predictions_df: DataFrame)

Display the predictions in the UI.

Parameters:

predictions_path (Path) – The path to the predictions file.

helix.components.plots.group_plots_by_model_and_type(plots)

Group plots by model name and type.

Parameters:

plots (list) – List of Path objects representing plot files.

Returns:

Dictionary with model names as keys and plot groups (Train/Test/Coefficients/Other) as values.

Return type:

dict

helix.components.plots.plot_box(plot_dir: Path, box_title: str)

Display the plots in the given directory in the UI.

Parameters:
  • plot_dir (Path) – The directory containing the plots.

  • box_title (str) – The title of the plot box.

helix.components.plots.plot_box_v2(plot_paths: list[Path], box_title: str)

Display the plots given in the list of plot files.

Parameters:
  • plot_paths (list[Path]) – The paths to the plots to display.

  • box_title (str) – The title of the box.

helix.components.preprocessing module

helix.components.preprocessing.original_view(data: DataFrame)

Display the original data to the user.

Parameters:

data (pd.DataFrame) – The original data to show.

helix.components.preprocessing.preprocessed_view(data: DataFrame)

Display the preprocessed data to the user with column count in titles.

Parameters:

data (pd.DataFrame) – The preprocessed data to show.

helix.components.statistical_tests module

Component for displaying statistical test results.

helix.components.statistical_tests.display_normality_test_results(results_df: DataFrame, title: str)

Display normality test results in a formatted table.

Parameters:
  • results_df (pd.DataFrame) – DataFrame containing normality test results

  • title (str) – Title to display above the results table

helix.components.statistical_tests.normality_test_view(data: DataFrame, table_title: str | None = None)

Module contents