Utils
- bsix.utils.compute_binary_metrics(evaluation_targets, predictions)[source]
Compute binary metrics for given targets and predictions.
- bsix.utils.compute_metric_confidence_interval(y, prediction, metric_name, n_iterations=1000, confidence_level=0.95, seed=0)[source]
Compute confidence interval using bootstrapping.
- bsix.utils.compute_metrics(train_targets, evaluation_targets, predictions)[source]
Compute metrics for given targets and predictions (experiments).
- bsix.utils.compute_survival_metrics(train_targets, evaluation_targets, predictions)[source]
Compute survival metrics for given targets and predictions.
- bsix.utils.concordanceIndexHarrel(y_true, y_pred)[source]
Computes the Harrell’s Concordance Index (C-index).
- bsix.utils.concordanceIndexIPCW(y_true, y_pred)[source]
Computes the Inverse Probability of Censoring Weighted (IPCW).
- bsix.utils.format_predictions(preds)[source]
Format predictions to be a list of arrays, one per progression. If the model only has one progression, wrap it in a list.
- bsix.utils.from_results_to_metrics(targets, predictions)[source]
Format results to compute metrics.
- bsix.utils.get_data(df=None, data_dir='bsix.datasets', dataset_name='colon.csv', test_size=0.2, validation_size=0.2, scaler_name='standard', scaler=None, to_multitask=False, seed=0)[source]
Load and preprocess the dataset.
- bsix.utils.get_estimator(estimator_name, inputs, labels, valid_data, seed, n_jobs=-1, n_iter=30)[source]
Get estimator (search cv) based on name.
- bsix.utils.get_results(result_folder='./results', estimator_name=None, dataset=None, seed=None)[source]
Get the results for the given estimator name, dataset and seed.
- bsix.utils.get_xai_from_filter(result_folder='./results', estimator_name=None, dataset=None, seed=None, identifier_index=None)[source]
Get the xai for the given estimator name, dataset and seed.
- bsix.utils.get_xai_from_model_list(model_list, seed=None, identifier_index=None)[source]
Get the xai for the given model_list (estimator_name, dataset, model)