OCDocker.OCScore.Analysis.SHAP.Studies module¶
Manage Optuna studies used by SHAP analysis.
Usage:
from OCDocker.OCScore.Analysis.SHAP.Studies import select_best_from_studies
- class OCDocker.OCScore.Analysis.SHAP.Studies.StudyHandles(ao_study_name, nn_study_name, seed_study_name, mask_study_name, storage)[source]
Bases:
objectContainer for Optuna study handles and storage information.
- Parameters:
ao_study_name (str) –
nn_study_name (str) –
seed_study_name (str) –
mask_study_name (str) –
storage (str) –
- ao_study_name
Name of the autoencoder optimization study.
- Type:
str
- nn_study_name
Name of the neural network optimization study.
- Type:
str
- seed_study_name
Name of the random seed optimization study.
- Type:
str
- mask_study_name
Name of the feature mask optimization study.
- Type:
str
- storage
Storage path/URL for Optuna studies.
- Type:
str
- ao_study_name: str
- nn_study_name: str
- seed_study_name: str
- mask_study_name: str
- storage: str
- class OCDocker.OCScore.Analysis.SHAP.Studies.BestSelections(autoencoder_params, nn_params, seed, mask)[source]
Bases:
objectContainer for best parameters selected from Optuna studies.
- Parameters:
autoencoder_params (Dict[str, int | float | str | bool]) –
nn_params (Dict[str, int | float | str | bool]) –
seed (int) –
mask (ndarray) –
- autoencoder_params
Best autoencoder parameters.
- Type:
Dict[str, Union[int, float, str, bool]]
- nn_params
Best neural network parameters.
- Type:
Dict[str, Union[int, float, str, bool]]
- seed
Best random seed.
- Type:
int
- mask
Best feature mask as a binary array.
- Type:
np.ndarray
- autoencoder_params: Dict[str, int | float | str | bool]
- nn_params: Dict[str, int | float | str | bool]
- seed: int
- mask: ndarray
- OCDocker.OCScore.Analysis.SHAP.Studies.select_best_from_studies(handles)[source]
Select best parameters from multiple Optuna optimization studies.
- Parameters:
handles (StudyHandles) – Container with study names and storage information.
- Returns:
Container with best parameters from all studies (autoencoder, neural network, seed, mask).
- Return type:
BestSelections