Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean #5

Merged
merged 122 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 121 commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
d5ff0df
added test case and initial testing and and code for shardingoutput t…
Oufattole May 25, 2024
4a486aa
added static feature pivoting
Oufattole May 26, 2024
19f0f4e
added docstrings and a smiple test case checking the number of subjec…
Oufattole May 26, 2024
fd1731f
Refactor scripts into separate modules for improved clarity:
Oufattole May 27, 2024
63b9ba6
fixed doctests and updated github workflow tests to use python 3.12
Oufattole May 27, 2024
cd067f8
Implement data processing for MEDS format to pivot tables into two in…
Oufattole May 27, 2024
c8ca3bb
Enhance data aggregation framework with dynamic window and aggregatio…
Oufattole May 27, 2024
7fdc37d
Update src/MEDS_tabular_automl/generate_summarized_reps.py
mmcdermott May 27, 2024
4dd3cad
Update src/MEDS_tabular_automl/generate_summarized_reps.py
mmcdermott May 27, 2024
720a533
Update src/MEDS_tabular_automl/generate_summarized_reps.py
mmcdermott May 27, 2024
548e29a
Added doctest and updated docstrings in identiy_columns.py. [WIP] add…
Oufattole May 27, 2024
d9ba7e7
Merge branch 'esgpt_caching' of github.com:mmcdermott/MEDS_Tabular_Au…
Oufattole May 27, 2024
f0b1cbb
working on xgboost
teyaberg May 28, 2024
ba954ef
current state
Oufattole May 28, 2024
df2750a
Removed tqdm, fixed deprecated groupbys, fixed doctest long-line issue.
mmcdermott May 28, 2024
4bbbc20
Fixed one of the summary doctests.
mmcdermott May 28, 2024
d39bf1a
updates based on formats... still many to dos
teyaberg May 28, 2024
41fe4b4
using sparse matrices for generating time series representations
Oufattole May 29, 2024
cb5f689
still working on sparse matrix to external memory xgboost
teyaberg May 29, 2024
8bc9a16
same problem
teyaberg May 29, 2024
1e27526
cleaned some testing
teyaberg May 29, 2024
97938a8
sped up the tabularize_ts script by about 30% by concatenating the sp…
Oufattole May 29, 2024
c28e6b2
got iterator working with csr_matrices for X and numpy arrays for y
teyaberg May 29, 2024
6f3b1ec
added support for sparse aggregations
Oufattole May 29, 2024
6753609
passing unit tests for sparse aggregations (only code/count and value…
Oufattole May 29, 2024
f125600
added significant speed improvements for rolling window aggregations
Oufattole May 29, 2024
2acc3bc
improved speed, by removing conversion from sparse scipy matrix to sp…
Oufattole May 29, 2024
eec05e2
takes about an hour to run through a shard. The speed gain is from me…
Oufattole May 30, 2024
bd9bdae
added scripts to the readme
Oufattole May 30, 2024
29c8c5f
save before breaking it
teyaberg May 30, 2024
4c7d3e7
added support for parallelism using mapper warp function. We cache fe…
Oufattole May 30, 2024
ba796e5
wip
teyaberg May 30, 2024
3678d30
automl
teyaberg May 30, 2024
82b3903
Merge branch 'esgpt_caching' into xgboost
Oufattole May 30, 2024
ffa0f3c
working on collect_in_memory
teyaberg May 31, 2024
c8f26ea
collect in memory fixed
teyaberg May 31, 2024
f6a3751
added hf_cohort scripts
May 31, 2024
2ec1860
Apply suggestions from code review
mmcdermott May 31, 2024
db18dc5
cleaning
teyaberg May 31, 2024
abba3d2
local WIP--changing to sparse matrix implementation
teyaberg May 31, 2024
77f296f
added merging of static and time series data
May 31, 2024
e8f26eb
Merge branch 'esgpt_caching' of github.com:mmcdermott/MEDS_Tabular_Au…
May 31, 2024
958906d
merging script runs, but the output is 50GB
Oufattole May 31, 2024
7668382
merging script works and is efficient
Oufattole May 31, 2024
b6b8d43
fixed bug with sparse matrix shape being too small for merging static…
Oufattole May 31, 2024
e6a88a7
changed to sparse format
teyaberg Jun 1, 2024
e8d64fd
added script for extracting tasks using aces
Oufattole Jun 1, 2024
5b2f7f7
merged xgboost code
Oufattole Jun 1, 2024
5c5dc8e
added dependencies
Oufattole Jun 1, 2024
357845e
Merge branch 'xgboost' into esgpt_caching
Oufattole Jun 1, 2024
d99e274
added support for loading cached labels and event indexes
Oufattole Jun 1, 2024
cadc603
updated readme
Oufattole Jun 1, 2024
285ccbf
size issues for loading sparse matrix
teyaberg Jun 1, 2024
795b532
push updates
teyaberg Jun 1, 2024
b9d057b
4x speed increase for tabularization to sparse matrix by caching wind…
Oufattole Jun 1, 2024
85f38b5
Merge branch 'xgboost' into esgpt_caching
Oufattole Jun 1, 2024
7ea3230
standardized file storage using file_name.py and updated from using n…
Oufattole Jun 2, 2024
23a2e3b
cleaned up file paths so we can load all aggregations selectively and…
Oufattole Jun 2, 2024
c225c47
fixed bug with codes that are only in the test and validation set (no…
Jun 2, 2024
cb21821
fixed bug with summarization script crashing for min and max value ag…
Jun 2, 2024
3a412a0
removed overwrite killing of jobs which causes errors in multirun
Jun 2, 2024
a4f1843
Xgboost is able to load all concatenated windows and aggregations. Fi…
Oufattole Jun 2, 2024
800ab7e
fixed timedelta overflow bug
Jun 2, 2024
820e194
Merge branch 'esgpt_caching' of github.com:mmcdermott/MEDS_Tabular_Au…
Jun 2, 2024
4b0637a
fixed bug with loading feature columns json for aces task script
Jun 2, 2024
127d04a
added memory profiling to hf_cohort e2e script
Oufattole Jun 2, 2024
23877ad
Merge branch 'esgpt_caching' of github.com:mmcdermott/MEDS_Tabular_Au…
Oufattole Jun 2, 2024
36f54a3
Made tests ignore the hf_cohort directory
mmcdermott Jun 2, 2024
81bf2d9
Pre-commit fixes
mmcdermott Jun 2, 2024
83c4eec
Resolving deprecation warnings
mmcdermott Jun 2, 2024
e7a85ba
Fixed test installation instructions.
mmcdermott Jun 2, 2024
35acb97
Merge branch 'esgpt_caching' into mmd_changes
mmcdermott Jun 2, 2024
bef63b6
Resolved one error (or, rather, shifted it) by making some things pro…
mmcdermott Jun 2, 2024
e9775e2
Shifted more test errors around, but the failures are deeper than exp…
mmcdermott Jun 2, 2024
c8f4144
Merge pull request #4 from mmcdermott/mmd_changes
mmcdermott Jun 2, 2024
91a2056
update iterators to reference correct data
teyaberg Jun 2, 2024
f7605b5
Merge branch 'esgpt_caching' into xgboost
teyaberg Jun 2, 2024
0bbe879
timeable
teyaberg Jun 2, 2024
e091432
Update xgboost.py
mmcdermott Jun 2, 2024
dc8a093
Add time tracking around row selection.
mmcdermott Jun 2, 2024
45470ae
sparse updates
teyaberg Jun 2, 2024
84f5a77
speed up?
teyaberg Jun 3, 2024
a2fffa4
wip
teyaberg Jun 3, 2024
d7c1c13
config updates
teyaberg Jun 3, 2024
f6786f7
fixed tests and added starter code for caching csc matrix
Oufattole Jun 3, 2024
3c1b910
time profiling
teyaberg Jun 3, 2024
99c107a
Merge branch 'xgboost' of github.com:mmcdermott/MEDS_Tabular_AutoML i…
teyaberg Jun 3, 2024
fce9bcc
added code to reduce dtype and filter out zero or nan values from spa…
Oufattole Jun 3, 2024
6f9aa32
Merge branch 'xgboost' of github.com:mmcdermott/MEDS_Tabular_AutoML i…
teyaberg Jun 3, 2024
136204e
updated fixes for yaml
Oufattole Jun 3, 2024
266d785
updated scripts for launching hf cohort meds formatting and e2e tabul…
Oufattole Jun 3, 2024
0606a78
updated tests and added task specific caching script
Oufattole Jun 3, 2024
9aa2d73
fixed misspelled variable in yaml
Jun 3, 2024
51c86c6
all working
teyaberg Jun 3, 2024
425b79d
Merge branch 'xgboost' of github.com:mmcdermott/MEDS_Tabular_AutoML i…
teyaberg Jun 3, 2024
95f5694
updates for task cached shard
teyaberg Jun 3, 2024
15f045d
added cli base code
Oufattole Jun 3, 2024
5f5705f
Merge branch 'xgboost' of github.com:mmcdermott/MEDS_Tabular_AutoML i…
Oufattole Jun 3, 2024
a7b1c14
added cli tests and started adding config hierarchy
Oufattole Jun 3, 2024
d225961
added messy configs
Oufattole Jun 3, 2024
447d23b
added starter configs
mmcdermott Jun 3, 2024
c2b881b
updated configs to include all tasks
Oufattole Jun 3, 2024
9fd33f4
updated describe_codes
Oufattole Jun 4, 2024
e122d66
updated configs for the tabularization
Oufattole Jun 4, 2024
43ac162
updated task caching to use the updated config
Oufattole Jun 4, 2024
6856ee8
added xgboost support for the updated configs
Oufattole Jun 4, 2024
f426263
updated hydra to reference the correct config files, cli seems to be …
Jun 4, 2024
6d68a1e
updated e2e script for heart failure cohort using the cli
Jun 4, 2024
1cda7f5
fixed polars string cache bug
Jun 4, 2024
0111aba
added caching of filtered codes
Jun 4, 2024
3e5ebae
updated cli to take min code frequency
Jun 5, 2024
9f6b0d3
[wip] debugging config path resolutions
Oufattole Jun 5, 2024
bdbe1fc
Added setuptools scm plugin
mmcdermott Jun 5, 2024
3f5a23d
added integration test that reproduces the Could not override 'tabula…
Oufattole Jun 5, 2024
f1e5647
Added init file so tabularize default config path is resolved
Oufattole Jun 5, 2024
1685768
passing integration tests now
Oufattole Jun 5, 2024
b1f5db6
added fix for model.json saving check in integration test
Oufattole Jun 5, 2024
19f7ce7
added xgboost sweeping support
Oufattole Jun 5, 2024
ed193f0
updated to mapper that is more robust to race conditions by using a l…
Oufattole Jun 5, 2024
4047d7c
removed experiment scripts and old bash cli
Jun 5, 2024
a19ad3e
cleaned up formatting for codebase
Jun 5, 2024
ec73910
Merge branch 'main' into clean
Oufattole Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.11"
python-version: "3.12"

- name: Install packages
run: |
pip install -e .
pip install pytest
pip install pytest-cov[toml]
pip install -e .[tests]

#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: |
pytest -v --doctest-modules --cov
pytest -v --doctest-modules --cov --ignore=hf_cohort/

- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ repos:
rev: v2.2.0
hooks:
- id: autoflake
args: [--in-place, --remove-all-unused-imports]

# python upgrading syntax to newer version
- repo: https://github.com/asottile/pyupgrade
Expand Down
111 changes: 86 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Scalable tabularization and tabular feature usage utilities over generic MEDS datasets

This repository provides utilities and scripts to run limited automatic tabular ML pipelines for generic MEDS
datasets.

#### Q1: What do you mean "tabular pipelines"? Isn't _all_ structured EHR data already tabular?

This is a common misconception. _Tabular_ data refers to data that can be organized in a consistent, logical
set of rows/columns such that the entirety of a "sample" or "instance" for modeling or analysis is contained
in a single row, and the set of columns possibly observed (there can be missingness) is consistent across all
Expand All @@ -15,28 +17,62 @@ or future windows in time to produce a single row per patient with a consistent,
(though there may still be missingness).

#### Q2: Why not other systems?
- [TemporAI](https://github.com/vanderschaarlab/temporai) is the most natural competitor, and already
supports AutoML capabilities. However, TemporAI (as of now) does not support generic MEDS datasets, and it
is not clear if their AutoML systems will scale to the size of datasets we need to support. But, further
investigation is needed, and it may be the case that the best solution here is simply to write a custom
data source for MEDS data within TemporAI and leverage their tools.

- [TemporAI](https://github.com/vanderschaarlab/temporai) is the most natural competitor, and already
supports AutoML capabilities. However, TemporAI (as of now) does not support generic MEDS datasets, and it
is not clear if their AutoML systems will scale to the size of datasets we need to support. But, further
investigation is needed, and it may be the case that the best solution here is simply to write a custom
data source for MEDS data within TemporAI and leverage their tools.

# Installation

Clone this repository and install the requirements by running `pip install .` in the root directory.

# Usage

This repository consists of two key pieces:
1. Construction of and efficient loading of tabular (flat, non-longitudinal) summary features describing
patient records in MEDS over arbitrary time-windows (e.g. 1 year, 6 months, etc.) either backwards or
forwards in time from a given index date. Naturally, only "look-back" windows should be used for
future-event prediction tasks; however, the capability to summarize "look-ahead" windows is also useful
for characterizing and describing the differences between patient populations statistically.
2. Running basic AutoML pipelines over these tabular features to predict arbitrary binary classification
downstream tasks defined over these datasets. The "AutoML" part of this is not particularly advanced --
what is more advanced is the efficient construction, storage, and loading of tabular features for the
candidate AutoML models, enabling a far more extensive search over different featurization strategies.

1. Construction of and efficient loading of tabular (flat, non-longitudinal) summary features describing
patient records in MEDS over arbitrary time-windows (e.g. 1 year, 6 months, etc.) either backwards or
forwards in time from a given index date. Naturally, only "look-back" windows should be used for
future-event prediction tasks; however, the capability to summarize "look-ahead" windows is also useful
for characterizing and describing the differences between patient populations statistically.
2. Running basic AutoML pipelines over these tabular features to predict arbitrary binary classification
downstream tasks defined over these datasets. The "AutoML" part of this is not particularly advanced --
what is more advanced is the efficient construction, storage, and loading of tabular features for the
candidate AutoML models, enabling a far more extensive search over different featurization strategies.

### Scripts and Examples

See `tests/test_tabularize_integration.py` for an example of the end-to-end pipeline being run on synthetic data. This
script is a functional test that is also run with `pytest` to verify the correctness of the algorithm.

#### Core Scripts:

1. `scripts/identify_columns.py` loads all training shard to identify which feature columns
to generate tabular data for.
2. `scripts/tabularize_static.py` Iterates through shards and generates tabular vectors for
each patient. There is a single row per patient for each shard.
3. `scripts/summarize_over_windows.py` For each shard, iterates through window sizes and aggregations to and
horizontally concatenates the outputs to generate the final tabular representations at every event time for
every patient.
4. `scripts/tabularize_merge` Aligns the time-series window aggregations (generated in the previous step) with
the static tabular vectors and caches them for training.
5. `scripts/hf_cohort/aces_task_extraction.py` Generates the task labels and caches them with the event_id
indexes which align them with the nearest prior event in the tabular data.
6. `scripts/xgboost_sweep.py` Tunes XGboost on methods. Iterates through the labels and corresponding tabular data.

We run this on an example dataset using the following bash scripts in sequence:

```bash
bash hf_cohort_shard.sh # processes the dataset into meds format
bash hf_cohort_e2e.sh # performs (steps 1-4 above)
bash hf_cohort/aces_task.sh # generates labels (step 5)
bash xgboost.sh # trains xgboos (step 6)
```

## Feature Construction, Storage, and Loading

Tabularization of a (raw) MEDS dataset is done by running the `scripts/data/tabularize.py` script. This script
must inherently do a base level of preprocessing over the MEDS data, then will construct a sharded tabular
representation that respects the overall sharding of the raw data. This script uses [Hydra](https://hydra.cc/)
Expand All @@ -45,14 +81,39 @@ to manage configuration, and the configuration file is located at `configs/tabul
## AutoML Pipelines

# TODOs
1. Leverage the "event bound aggregation" capabilities of [ESGPT Task
Select](https://github.com/justin13601/ESGPTTaskQuerying/) to construct tabular summary features for
event-bound historical windows (e.g., until the prior admission, until the last diagnosis of some type,
etc.).
2. Support more feature aggregation functions.
3. Probably rename this repository, as the focus is really more on the tabularization and feature usage
utilities than on the AutoML pipelines themselves.
4. Import, rather than reimplement, the mapper utilities from the MEDS preprocessing repository.
5. Investigate the feasibility of using TemporAI for this task.
6. Consider splitting the feature construction and AutoML pipeline parts of this repository into separate
repositories.

1. Leverage the "event bound aggregation" capabilities of [ESGPT Task
Select](https://github.com/justin13601/ESGPTTaskQuerying/) to construct tabular summary features for
event-bound historical windows (e.g., until the prior admission, until the last diagnosis of some type,
etc.).
2. Support more feature aggregation functions.
3. Probably rename this repository, as the focus is really more on the tabularization and feature usage
utilities than on the AutoML pipelines themselves.
4. Import, rather than reimplement, the mapper utilities from the MEDS preprocessing repository.
5. Investigate the feasibility of using TemporAI for this task.
6. Consider splitting the feature construction and AutoML pipeline parts of this repository into separate
repositories.

# YAML Configuration File

- `MEDS_cohort_dir`: directory of MEDS format dataset that is ingested.
- `tabularized_data_dir`: output directory of tabularized data.
- `min_code_inclusion_frequency`: The base feature inclusion frequency that should be used to dictate
what features can be included in the flat representation. It can either be a float, in which
case it applies across all measurements, or `None`, in which case no filtering is applied, or
a dictionary from measurement type to a float dictating a per-measurement-type inclusion
cutoff.
- `window_sizes`: Beyond writing out a raw, per-event flattened representation, the dataset also has
the capability to summarize these flattened representations over the historical windows
specified in this argument. These are strings specifying time deltas, using this syntax:
`link`\_. Each window size will be summarized to a separate directory, and will share the same
subject file split as is used in the raw representation files.
- `codes`: A list of codes to include in the flat representation. If `None`, all codes will be included
in the flat representation.
- `aggs`: A list of aggregations to apply to the raw representation. Must have length greater than 0.
- `n_patients_per_sub_shard`: The number of subjects that should be included in each output file.
Lowering this number increases the number of files written, making the process of creating and
leveraging these files slower but more memory efficient.
- `do_overwrite`: If `True`, this function will overwrite the data already stored in the target save
directory.
- `seed`: The seed to use for random number generation.
41 changes: 0 additions & 41 deletions configs/tabularize.yaml

This file was deleted.

27 changes: 19 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "MEDS_tabularization"
version = "0.0.1"
authors = [
{ name="Matthew McDermott", email="[email protected]" },
{ name="Nassim Oufattole", email="[email protected]" },
{ name="Teya Bergamaschi", email="[email protected]" },
]
description = "TODO"
description = "Scalable Tabularization of MEDS format Time-Series data"
readme = "README.md"
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = ["polars", "pyarrow", "loguru", "hydra-core", "numpy"]
dependencies = ["polars", "pyarrow", "loguru", "hydra-core", "numpy", "scipy", "pandas", "tqdm", "xgboost", "scikit-learn", "hydra-optuna-sweeper", "hydra-joblib-launcher", "ml-mixins"]

[project.scripts]
meds-tab-describe = "MEDS_tabular_automl.scripts.describe_codes:main"
meds-tab-tabularize-static = "MEDS_tabular_automl.scripts.tabularize_static:main"
meds-tab-tabularize-time-series = "MEDS_tabular_automl.scripts.tabularize_time_series:main"
meds-tab-cache-task = "MEDS_tabular_automl.scripts.cache_task:main"
meds-tab-xgboost = "MEDS_tabular_automl.scripts.launch_xgboost:main"
meds-tab-xgboost-sweep = "MEDS_tabular_automl.scripts.sweep_xgboost:main"

[project.optional-dependencies]
dev = ["pre-commit"]
tests = ["pytest", "pytest-cov", "rootutils"]
profiling = ["mprofile", "matplotlib"]

[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0", "wheel"]
build-backend = "setuptools.build_meta"

[project.urls]
Homepage = "https://github.com/mmcdermott/MEDS_polars_functions"
Issues = "https://github.com/mmcdermott/MEDS_polars_functions/issues"
Homepage = "https://github.com/mmcdermott/MEDS_Tabular_AutoML"
Issues = "https://github.com/mmcdermott/MEDS_Tabular_AutoML/issues"
Empty file.
17 changes: 17 additions & 0 deletions src/MEDS_tabular_automl/configs/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MEDS_cohort_dir: ???
do_overwrite: False
seed: 1
tqdm: False
worker: 0
loguru_init: False

log_dir: ${output_dir}/.logs/

hydra:
verbose: False
job:
name: MEDS_TAB_${name}_${worker}_{now:%Y-%m-%d_%H-%M-%S}
sweep:
dir: ${log_dir}
run:
dir: ${log_dir}
14 changes: 14 additions & 0 deletions src/MEDS_tabular_automl/configs/describe_codes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
defaults:
- default
- _self_

# split we wish to get metadata for
split: train
# Raw data, must have a subdirectory "train" with the training data split
input_dir: ${MEDS_cohort_dir}/final_cohort/${split}
# Where to store output code frequency data
cache_dir: ${MEDS_cohort_dir}/.cache
output_dir: ${MEDS_cohort_dir}
output_filepath: ${output_dir}/code_metadata.parquet

name: describe_codes
81 changes: 81 additions & 0 deletions src/MEDS_tabular_automl/configs/launch_xgboost.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
defaults:
- default
- tabularization: default
- _self_

task_name: task
# min code frequency used for modeling, can potentially sweep over different values.
modeling_min_code_freq: 10

# Task cached data dir
input_dir: ${MEDS_cohort_dir}/${task_name}/task_cache
# Directory with task labels
input_label_dir: ${MEDS_cohort_dir}/${task_name}/labels
# Where to output the model and cached data
output_dir: ${MEDS_cohort_dir}/model/model_${now:%Y-%m-%d_%H-%M-%S}
output_filepath: ${output_dir}/model_metadata.parquet
cache_dir: ${MEDS_cohort_dir}/.cache

# Model parameters
model_params:
num_boost_round: 1000
early_stopping_rounds: 5
model:
booster: gbtree
device: cpu
nthread: 1
tree_method: hist
objective: binary:logistic
iterator:
keep_data_in_memory: True
binarize_task: True

# Define search space for Optuna
optuna:
study_name: xgboost_sweep_${now:%Y-%m-%d_%H-%M-%S}
storage: null
load_if_exists: False
direction: minimize
sampler: null
pruner: null

n_trials: 10
n_jobs: 1
show_progress_bar: False

params:
suggest_categorical:
window_sizes: ${generate_permutations:${tabularization.window_sizes}}
aggs: ${generate_permutations:${tabularization.aggs}}
suggest_float:
eta:
low: .001
high: 1
log: True
lambda:
low: .001
high: 1
log: True
alpha:
low: .001
high: 1
log: True
subsample:
low: 0.5
high: 1
min_child_weight:
low: 1e-2
high: 100
suggest_int:
num_boost_round:
low: 10
high: 1000
max_depth:
low: 2
high: 16
min_code_inclusion_frequency:
low: 10
high: 1_000_000
log: True

name: launch_xgboost
12 changes: 12 additions & 0 deletions src/MEDS_tabular_automl/configs/tabularization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
defaults:
- default
- tabularization: default
- _self_

# Raw data
# Where the code metadata is stored
input_code_metadata_fp: ${MEDS_cohort_dir}/code_metadata.parquet
input_dir: ${MEDS_cohort_dir}/final_cohort
output_dir: ${MEDS_cohort_dir}/tabularize

name: tabularization
Empty file.
Loading