pyhealth.utils package¶
Submodules¶
pyhealth.utils.check module¶
- pyhealth.utils.check.check_expdata_dir(expdata_id)[source]¶
- Check whether the exp data folder exist,
If not, will create the folder
Parameters
- expdata_idstr, optional (default=’init.test’)
name of current experiment data
pyhealth.utils.utility module¶
A set of utility functions to support outlier detection.
- pyhealth.utils.utility.check_parameter(param, low=-2147483647, high=2147483647, param_name='', include_left=False, include_right=False)[source]¶
Check if an input is within the defined range.
- Parameters
- Returns
within_range – Whether the parameter is within the range of (low, high)
- Return type
bool or raise errors
pyhealth.utils.utility_parallel module¶
A set of utility functions to support parallel computation.
- pyhealth.utils.utility_parallel.partition_estimators(n_estimators, n_jobs)[source]¶
Private function used to partition estimators between jobs.
- pyhealth.utils.utility_parallel.tqdm_joblib(tqdm_object)[source]¶
Context manager to patch joblib to report into tqdm progress bar given as argument
- pyhealth.utils.utility_parallel.unfold_parallel(lists, n_jobs)[source]¶
Internal function to unfold the results returned from the parallization
- Parameters
lists (list) – The results from the parallelization operations.
n_jobs (optional (default=1)) – The number of jobs to run in parallel for both fit and predict. If -1, then the number of jobs is set to the number of cores.
- Returns
result_list – The list of unfolded result.
- Return type