helix.pages package¶
Submodules¶
helix.pages.1_New_Experiment module¶
- helix.pages.1_New_Experiment.get_last_column_name(file) str | None ¶
Returns the name of the last column in the uploaded file.
- Parameters:
file – A Streamlit UploadedFile object or None.
- Returns:
The name of the last column as a string, or None if unavailable.
helix.pages.2_Data_Preprocessing module¶
- helix.pages.2_Data_Preprocessing.build_config() PreprocessingOptions ¶
Build the configuration object for preprocessing.
- helix.pages.2_Data_Preprocessing.run_preprocessing_pipeline(data, config, experiment_dir: Path, data_opts, path_to_data_opts, path_to_preproc_opts, logger) None ¶
Run the preprocessing pipeline and save results.
- Parameters:
data – Input data to preprocess
config – Preprocessing configuration
experiment_dir – Path to experiment directory
data_opts – Data options
path_to_data_opts – Path to data options file
path_to_preproc_opts – Path to preprocessing options file
logger – Logger instance
- helix.pages.2_Data_Preprocessing.validate_data(data) tuple[list, bool] ¶
Validate data for preprocessing.
- Parameters:
data – The input data to validate
- Returns:
tuple containing list of non-numeric columns and whether y has non-numeric values
helix.pages.3_Data_Visualisation module¶
- helix.pages.3_Data_Visualisation.load_dataset(path_to_raw_data: Path, path_to_preproc_data: Path, logger) tuple ¶
Load raw and preprocessed data if available.
- Parameters:
path_to_raw_data – Path to raw data file
path_to_preproc_data –
Path to preprocessed data file
logger: Logger instance
- Returns:
(raw_data, preprocessed_data, data_for_tsne)
- Return type:
tuple
- helix.pages.3_Data_Visualisation.visualisation_view(data, data_tsne, prefix: str | None = None)¶
Display visualisation of data.
helix.pages.4_Train_Models module¶
Train Models page for Helix.
This page allows users to configure and train machine learning models on their data.
- helix.pages.4_Train_Models.build_configuration() tuple[MachineLearningOptions, ExecutionOptions, PlottingOptions, DataOptions, str] ¶
Build the configuration options to run the Machine Learning pipeline.
- Returns:
The machine learning options, general execution options, plotting options, data options, experiment name.
- Return type:
tuple[MachineLearningOptions, ExecutionOptions, PlottingOptions, DataOptions, str]
- helix.pages.4_Train_Models.pipeline(ml_opts: MachineLearningOptions, exec_opts: ExecutionOptions, plotting_opts: PlottingOptions, data_opts: DataOptions, experiment_name: str, data: TabularData)¶
This function actually performs the steps of the pipeline. It can be wrapped in a process it doesn’t block the UI.
- Parameters:
ml_opts (MachineLearningOptions) – Options for machine learning.
exec_opts (ExecutionOptions) – General execution options.
plotting_opts (PlottingOptions) – Options for plotting.
experiment_name (str) – The name of the experiment.
data (TabularData) – The data that will be used in the pipeline.
helix.pages.5_Feature_Importance module¶
Feature Importance page for Helix.
This page provides options for analyzing feature importance using various methods: - Global methods (Permutation, SHAP) - Local methods (LIME, SHAP) - Ensemble methods - Fuzzy feature importance
- helix.pages.5_Feature_Importance.build_configuration() tuple[FuzzyOptions | None, FeatureImportanceOptions, ExecutionOptions, PlottingOptions, DataOptions, str, list] ¶
Build the configuration objects for the pipeline.
- Returns:
tuple[ FuzzyOptions | None, FeatureImportanceOptions, ExecutionOptions, PlottingOptions, DataOptions, str, list]: - The options for fuzzy, - The options for feature importance - The options for pipeline execution - The plotting options - The data options - The experiment name - The list of models to explain.
- helix.pages.5_Feature_Importance.display_feature_importance_plots(experiment_dir: Path) None ¶
Display feature importance plots from the given experiment directory.
- Parameters:
experiment_dir – Path to the experiment directory
- helix.pages.5_Feature_Importance.display_fuzzy_plots(experiment_dir: Path) None ¶
Display fuzzy plots from the given experiment directory.
- Parameters:
experiment_dir – Path to the experiment directory
- helix.pages.5_Feature_Importance.pipeline(fuzzy_opts: FuzzyOptions, fi_opts: FeatureImportanceOptions, exec_opts: ExecutionOptions, plot_opts: PlottingOptions, experiment_name: str, explain_models: list, data: TabularData)¶
This function actually performs the steps of the pipeline. It can be wrapped in a process it doesn’t block the UI.
- Parameters:
fuzzy_opts (FuzzyOptions) – Options for fuzzy feature importance.
fi_opts (FeatureImportanceOptions) – Options for feature importance.
exec_opts (ExecutionOptions) – Options for pipeline execution.
plot_opts (PlottingOptions) – Options for plotting.
experiment_name (str) – The experiment name.
explain_models (list) – The models to analyse.
data (TabularData) – The data that will be used in the pipeline.
helix.pages.6_View_Experiments module¶
- helix.pages.6_View_Experiments.display_experiment_logs(experiment_path: Path) None ¶
Display all available logs for the experiment.
- Parameters:
experiment_path – Path to the experiment directory
- helix.pages.6_View_Experiments.display_experiment_plots(experiment_path: Path) None ¶
Display all available plots for the experiment.
- Parameters:
experiment_path – Path to the experiment directory