Aaron Blare commited on
Commit
f7d1875
Β·
1 Parent(s): 58887fd

Model renaming

Browse files
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. app.py +24 -24
  3. configs/{immuno-regression β†’ cytokines-regression}/DataConfig.yaml +13 -13
  4. configs/{immuno-regression β†’ cytokines-regression}/OptimizerConfig.yaml +22 -22
  5. configs/{immuno-regression β†’ cytokines-regression}/TrainerConfig.yaml +26 -26
  6. configs/{immuno-regression β†’ cytokines-regression}/models/CategoryEmbeddingModelConfig.yaml +26 -26
  7. configs/{immuno-regression β†’ cytokines-regression}/models/DANetConfig.yaml +26 -26
  8. configs/{immuno-regression β†’ cytokines-regression}/models/FTTransformerConfig.yaml +28 -28
  9. configs/{immuno-regression β†’ cytokines-regression}/models/GANDALFConfig.yaml +24 -24
  10. configs/{immuno-regression β†’ cytokines-regression}/models/TabNetModelConfig.yaml +28 -28
  11. models/EpImAge/custom_params.sav +0 -0
  12. models/{EpImAge β†’ EpInflammAge}/config.yml +118 -118
  13. models/EpInflammAge/custom_params.sav +3 -0
  14. models/{EpImAge β†’ EpInflammAge}/datamodule.sav +0 -0
  15. models/{EpImAge β†’ EpInflammAge}/model.ckpt +0 -0
  16. models/Immunomarkers/CCL11/custom_params.sav +0 -0
  17. models/Immunomarkers/CCL11/datamodule.sav +0 -0
  18. models/Immunomarkers/CCL2/custom_params.sav +0 -0
  19. models/Immunomarkers/CCL2/datamodule.sav +0 -0
  20. models/Immunomarkers/CCL22/custom_params.sav +0 -0
  21. models/Immunomarkers/CCL22/datamodule.sav +0 -0
  22. models/Immunomarkers/CCL3/custom_params.sav +0 -0
  23. models/Immunomarkers/CCL3/datamodule.sav +0 -0
  24. models/Immunomarkers/CCL4/custom_params.sav +0 -0
  25. models/Immunomarkers/CCL4/datamodule.sav +0 -0
  26. models/Immunomarkers/CCL7/custom_params.sav +0 -0
  27. models/Immunomarkers/CCL7/datamodule.sav +0 -0
  28. models/Immunomarkers/CD40LG/custom_params.sav +0 -0
  29. models/Immunomarkers/CD40LG/datamodule.sav +0 -0
  30. models/Immunomarkers/CSF1/custom_params.sav +0 -0
  31. models/Immunomarkers/CSF1/datamodule.sav +0 -0
  32. models/Immunomarkers/CX3CL1/custom_params.sav +0 -0
  33. models/Immunomarkers/CX3CL1/datamodule.sav +0 -0
  34. models/Immunomarkers/CXCL1/custom_params.sav +0 -0
  35. models/Immunomarkers/CXCL1/datamodule.sav +0 -0
  36. models/Immunomarkers/CXCL10/custom_params.sav +0 -0
  37. models/Immunomarkers/CXCL10/datamodule.sav +0 -0
  38. models/Immunomarkers/CXCL9/custom_params.sav +0 -0
  39. models/Immunomarkers/CXCL9/datamodule.sav +0 -0
  40. models/Immunomarkers/FLT3L/custom_params.sav +0 -0
  41. models/Immunomarkers/FLT3L/datamodule.sav +0 -0
  42. models/Immunomarkers/GCSF/custom_params.sav +0 -0
  43. models/Immunomarkers/GCSF/datamodule.sav +0 -0
  44. models/Immunomarkers/IFNA2/custom_params.sav +0 -0
  45. models/Immunomarkers/IFNA2/datamodule.sav +0 -0
  46. models/Immunomarkers/IL12Bp40/custom_params.sav +0 -0
  47. models/Immunomarkers/IL12Bp40/datamodule.sav +0 -0
  48. models/Immunomarkers/IL13/custom_params.sav +0 -0
  49. models/Immunomarkers/IL13/datamodule.sav +0 -0
  50. models/Immunomarkers/IL15/custom_params.sav +0 -0
.gitattributes CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  data/examples/Our[[:space:]]data.xlsx filter=lfs diff=lfs merge=lfs -text
37
  models/EpImAge/datamodule.sav filter=lfs diff=lfs merge=lfs -text
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  data/examples/Our[[:space:]]data.xlsx filter=lfs diff=lfs merge=lfs -text
37
  models/EpImAge/datamodule.sav filter=lfs diff=lfs merge=lfs -text
38
+ *.sav filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -23,17 +23,17 @@ if Path(dir_out).exists():
23
  shutil.rmtree(Path(dir_out))
24
  Path(dir_out).mkdir(parents=True, exist_ok=True)
25
 
26
- df_imms = pd.read_excel(f"{dir_root}/models/Immunomarkers/Immunomarkers.xlsx", index_col='feature')
27
  imms = df_imms.index.values
28
  imms_log = [f"{f}_log" for f in imms]
29
- cpgs = pd.read_excel(f"{dir_root}/models/Immunomarkers/CpGs.xlsx", index_col=0).index.values
30
 
31
  models_imms = {}
32
  for imm in (pbar := tqdm(imms)):
33
  pbar.set_description(f"Loading model for {imm}")
34
- models_imms[imm] = TabularModel.load_model(f"{dir_root}/models/Immunomarkers/{imm}")
35
 
36
- model_age = TabularModel.load_model(f"{dir_root}/models/EpImAge")
37
 
38
  bkgrd_xai = pd.read_pickle(f"{dir_root}/models/background-xai.pkl")
39
  bkgrd_imp = pd.read_pickle(f"{dir_root}/models/background-imputation.pkl")
@@ -60,7 +60,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
60
 
61
  gr.Markdown(
62
  """
63
- # EpImAge Calculator
64
  ## Submit epigenetics data
65
  """
66
  )
@@ -70,12 +70,12 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
70
  gr.Markdown(
71
  """
72
  ### Instruction
73
- - Upload your methylation data for 2228 CpGs from [File](https://github.com/GillianGrayson/EpImAge/tree/main/data/CpGs.xlsx).
74
  - The first column must be a sample ID.
75
  - Your data must contain `Age` column for metrics (MAE and Pearson Rho) and Age Acceleration calculation.
76
  - Missing values should be `NA` in the corresponding cells.
77
  - [Imputation](https://scikit-learn.org/stable/modules/impute.html) of missing values can be performed using KNN, Mean, and Median methods with all methylation data from the [Paper]().
78
- - Data example for GSE87571: [File](https://github.com/GillianGrayson/EpImAge/tree/main/data/examples/GSE87571.xlsx).
79
  - Calculations take a few minutes, the plot can be displayed slightly later than the results. If imputation is performed, the calculations will take longer.
80
  """,
81
  )
@@ -98,12 +98,12 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
98
 
99
  with gr.Row():
100
  with gr.Column():
101
- shap_dropdown = gr.Dropdown(label='Choose a sample to get an explanation of the EpImAge prediction', filterable=True, visible=False)
102
  shap_button = gr.Button("Get explanation", variant="primary", visible=False)
103
  with gr.Row():
104
  shap_text_id = gr.Text(label='Sample', visible=False)
105
  shap_text_age = gr.Text(label='Age', visible=False)
106
- shap_text_epimage = gr.Text(label='EpImAge', visible=False)
107
  shap_markdown_cytokines = gr.Markdown(
108
  """
109
  ### Most important cytokines:
@@ -189,7 +189,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
189
  data = pd.read_pickle(f"{dir_out}/{str(request.session_hash)}/data.pkl")
190
  trgt_id = input
191
  trgt_age = data.at[trgt_id, 'Age']
192
- trgt_pred = data.at[trgt_id, 'EpImAge']
193
  trgt_aa = trgt_pred - trgt_age
194
 
195
  n_closest = 200
@@ -210,7 +210,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
210
  fig = make_subplots(rows=1, cols=2, shared_yaxes=True, shared_xaxes=False, column_widths=[2.5, 1], horizontal_spacing=0.05, row_titles=[''])
211
  fig.add_trace(
212
  go.Waterfall(
213
- hovertext=["Chrono Age", "EpImAge"],
214
  orientation="h",
215
  measure=['absolute', 'relative'],
216
  y=[-1.5, df_shap.shape[0] + 0.5],
@@ -255,7 +255,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
255
  automargin=True,
256
  tickmode="array",
257
  tickvals=[-1.5] + list(range(df_shap.shape[0])) + [df_shap.shape[0] + 0.5],
258
- ticktext=["Chrono Age"] + df_shap.index.to_list() + ["EpImAge"],
259
  tickfont=dict(size=16),
260
  )
261
  fig.update_xaxes(
@@ -321,7 +321,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
321
  fig.update_layout(barmode="relative")
322
  fig.update_layout(
323
  legend=dict(
324
- title=dict(text="Immunomarkers disribution<br>in samples with same age", side="top"),
325
  orientation="h",
326
  yanchor="bottom",
327
  y=0.95,
@@ -388,26 +388,26 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
388
  data.loc[data.index, cpgs] = data_all.loc[data.index, cpgs]
389
 
390
  # Models' inference
391
- progress(0.9, desc="Immunology models' inference")
392
  for imm in imms:
393
  data[f"{imm}_log"] = models_imms[imm].predict(data)
394
- progress(0.95, desc='EpImAge model inference')
395
- data['EpImAge'] = model_age.predict(data.loc[:, [f"{imm}_log" for imm in imms]])
396
- data['Age Acceleration'] = data['EpImAge'] - data['Age']
397
  data.to_pickle(f'{dir_out}/{str(request.session_hash)}/data.pkl')
398
 
399
- data_res = data[['Age', 'EpImAge', 'Age Acceleration'] + list(imms_log)]
400
  data_res.rename(columns={f"{imm}_log": imm for imm in imms}).to_excel(f'{dir_out}/{str(request.session_hash)}/Result.xlsx', index_label='ID')
401
 
402
  if len(data_res) > 1:
403
- mae = mean_absolute_error(data['Age'].values, data['EpImAge'].values)
404
- rho = scipy.stats.pearsonr(data['Age'].values, data['EpImAge'].values).statistic
405
 
406
  # Plot scatter
407
  progress(0.98, desc='Plotting scatter')
408
  fig = make_subplots(rows=1, cols=2, shared_yaxes=False, shared_xaxes=False, column_widths=[5, 3], horizontal_spacing=0.15)
409
- min_plot_age = data[["Age", "EpImAge"]].min().min()
410
- max_plot_age = data[["Age", "EpImAge"]].max().max()
411
  shift_plot_age = max_plot_age - min_plot_age
412
  min_plot_age -= 0.1 * shift_plot_age
413
  max_plot_age += 0.1 * shift_plot_age
@@ -426,7 +426,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
426
  go.Scatter(
427
  name='Scatter',
428
  x=data.loc[:, 'Age'].values,
429
- y=data.loc[:, 'EpImAge'].values,
430
  text=data.index.values,
431
  hovertext=data.index.values,
432
  showlegend=False,
@@ -476,7 +476,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title='EpImAge', js=js_func, delete_cache
476
  row=1,
477
  col=1,
478
  automargin=True,
479
- title_text=f"EpImAge",
480
  # scaleanchor="x",
481
  # scaleratio=1,
482
  autorange=False,
 
23
  shutil.rmtree(Path(dir_out))
24
  Path(dir_out).mkdir(parents=True, exist_ok=True)
25
 
26
+ df_imms = pd.read_excel(f"{dir_root}/models/InflammatoryMarkers/InflammatoryMarkers.xlsx", index_col='feature')
27
  imms = df_imms.index.values
28
  imms_log = [f"{f}_log" for f in imms]
29
+ cpgs = pd.read_excel(f"{dir_root}/models/InflammatoryMarkers/CpGs.xlsx", index_col=0).index.values
30
 
31
  models_imms = {}
32
  for imm in (pbar := tqdm(imms)):
33
  pbar.set_description(f"Loading model for {imm}")
34
+ models_imms[imm] = TabularModel.load_model(f"{dir_root}/models/InflammatoryMarkers/{imm}")
35
 
36
+ model_age = TabularModel.load_model(f"{dir_root}/models/EpInflammAge")
37
 
38
  bkgrd_xai = pd.read_pickle(f"{dir_root}/models/background-xai.pkl")
39
  bkgrd_imp = pd.read_pickle(f"{dir_root}/models/background-imputation.pkl")
 
60
 
61
  gr.Markdown(
62
  """
63
+ # EpInflammAge Calculator
64
  ## Submit epigenetics data
65
  """
66
  )
 
70
  gr.Markdown(
71
  """
72
  ### Instruction
73
+ - Upload your methylation data for 2228 CpGs from [File](https://github.com/GillianGrayson/EpInflammAge/tree/main/data/CpGs.xlsx).
74
  - The first column must be a sample ID.
75
  - Your data must contain `Age` column for metrics (MAE and Pearson Rho) and Age Acceleration calculation.
76
  - Missing values should be `NA` in the corresponding cells.
77
  - [Imputation](https://scikit-learn.org/stable/modules/impute.html) of missing values can be performed using KNN, Mean, and Median methods with all methylation data from the [Paper]().
78
+ - Data example for GSE87571: [File](https://github.com/GillianGrayson/EpInflammAge/tree/main/data/examples/GSE87571.xlsx).
79
  - Calculations take a few minutes, the plot can be displayed slightly later than the results. If imputation is performed, the calculations will take longer.
80
  """,
81
  )
 
98
 
99
  with gr.Row():
100
  with gr.Column():
101
+ shap_dropdown = gr.Dropdown(label='Choose a sample to get an explanation of the EpInflammAge prediction', filterable=True, visible=False)
102
  shap_button = gr.Button("Get explanation", variant="primary", visible=False)
103
  with gr.Row():
104
  shap_text_id = gr.Text(label='Sample', visible=False)
105
  shap_text_age = gr.Text(label='Age', visible=False)
106
+ shap_text_epimage = gr.Text(label='EpInflammAge', visible=False)
107
  shap_markdown_cytokines = gr.Markdown(
108
  """
109
  ### Most important cytokines:
 
189
  data = pd.read_pickle(f"{dir_out}/{str(request.session_hash)}/data.pkl")
190
  trgt_id = input
191
  trgt_age = data.at[trgt_id, 'Age']
192
+ trgt_pred = data.at[trgt_id, 'EpInflammAge']
193
  trgt_aa = trgt_pred - trgt_age
194
 
195
  n_closest = 200
 
210
  fig = make_subplots(rows=1, cols=2, shared_yaxes=True, shared_xaxes=False, column_widths=[2.5, 1], horizontal_spacing=0.05, row_titles=[''])
211
  fig.add_trace(
212
  go.Waterfall(
213
+ hovertext=["Chrono Age", "EpInflammAge"],
214
  orientation="h",
215
  measure=['absolute', 'relative'],
216
  y=[-1.5, df_shap.shape[0] + 0.5],
 
255
  automargin=True,
256
  tickmode="array",
257
  tickvals=[-1.5] + list(range(df_shap.shape[0])) + [df_shap.shape[0] + 0.5],
258
+ ticktext=["Chrono Age"] + df_shap.index.to_list() + ["EpInflammAge"],
259
  tickfont=dict(size=16),
260
  )
261
  fig.update_xaxes(
 
321
  fig.update_layout(barmode="relative")
322
  fig.update_layout(
323
  legend=dict(
324
+ title=dict(text="Inflammatory Markers disribution<br>in samples with same age", side="top"),
325
  orientation="h",
326
  yanchor="bottom",
327
  y=0.95,
 
388
  data.loc[data.index, cpgs] = data_all.loc[data.index, cpgs]
389
 
390
  # Models' inference
391
+ progress(0.9, desc="Inflammatory models' inference")
392
  for imm in imms:
393
  data[f"{imm}_log"] = models_imms[imm].predict(data)
394
+ progress(0.95, desc='EpInflammAge model inference')
395
+ data['EpInflammAge'] = model_age.predict(data.loc[:, [f"{imm}_log" for imm in imms]])
396
+ data['Age Acceleration'] = data['EpInflammAge'] - data['Age']
397
  data.to_pickle(f'{dir_out}/{str(request.session_hash)}/data.pkl')
398
 
399
+ data_res = data[['Age', 'EpInflammAge', 'Age Acceleration'] + list(imms_log)]
400
  data_res.rename(columns={f"{imm}_log": imm for imm in imms}).to_excel(f'{dir_out}/{str(request.session_hash)}/Result.xlsx', index_label='ID')
401
 
402
  if len(data_res) > 1:
403
+ mae = mean_absolute_error(data['Age'].values, data['EpInflammAge'].values)
404
+ rho = scipy.stats.pearsonr(data['Age'].values, data['EpInflammAge'].values).statistic
405
 
406
  # Plot scatter
407
  progress(0.98, desc='Plotting scatter')
408
  fig = make_subplots(rows=1, cols=2, shared_yaxes=False, shared_xaxes=False, column_widths=[5, 3], horizontal_spacing=0.15)
409
+ min_plot_age = data[["Age", "EpInflammAge"]].min().min()
410
+ max_plot_age = data[["Age", "EpInflammAge"]].max().max()
411
  shift_plot_age = max_plot_age - min_plot_age
412
  min_plot_age -= 0.1 * shift_plot_age
413
  max_plot_age += 0.1 * shift_plot_age
 
426
  go.Scatter(
427
  name='Scatter',
428
  x=data.loc[:, 'Age'].values,
429
+ y=data.loc[:, 'EpInflammAge'].values,
430
  text=data.index.values,
431
  hovertext=data.index.values,
432
  showlegend=False,
 
476
  row=1,
477
  col=1,
478
  automargin=True,
479
+ title_text=f"EpInflammAge",
480
  # scaleanchor="x",
481
  # scaleratio=1,
482
  autorange=False,
configs/{immuno-regression β†’ cytokines-regression}/DataConfig.yaml RENAMED
@@ -1,14 +1,14 @@
1
- target: []
2
- continuous_cols:
3
- - 'to_replace'
4
- categorical_cols: []
5
- date_columns: []
6
- encode_date_columns: true
7
- validation_split: 0.25
8
- continuous_feature_transform: yeo-johnson
9
- normalize_continuous_features: true
10
- quantile_noise: 0
11
- num_workers: 0
12
- pin_memory: true
13
- handle_unknown_categories: true
14
  handle_missing_values: true
 
1
+ target: []
2
+ continuous_cols:
3
+ - 'to_replace'
4
+ categorical_cols: []
5
+ date_columns: []
6
+ encode_date_columns: true
7
+ validation_split: 0.25
8
+ continuous_feature_transform: yeo-johnson
9
+ normalize_continuous_features: true
10
+ quantile_noise: 0
11
+ num_workers: 0
12
+ pin_memory: true
13
+ handle_unknown_categories: true
14
  handle_missing_values: true
configs/{immuno-regression β†’ cytokines-regression}/OptimizerConfig.yaml RENAMED
@@ -1,23 +1,23 @@
1
- optimizer: Adam
2
- optimizer_params:
3
- weight_decay: 1e-6
4
-
5
- lr_scheduler: ReduceLROnPlateau
6
- lr_scheduler_params:
7
- mode: min
8
- factor: 0.1
9
- patience: 25
10
- threshold: 1e-4
11
-
12
- #lr_scheduler: CosineAnnealingWarmRestarts
13
- #lr_scheduler_params:
14
- # T_0: 10
15
- # T_mult: 1
16
- # eta_min: 1e-5
17
-
18
- #lr_scheduler: StepLR
19
- #lr_scheduler_params:
20
- # step_size: 100
21
- # gamma: 0.75
22
-
23
  lr_scheduler_monitor_metric: valid_loss
 
1
+ optimizer: Adam
2
+ optimizer_params:
3
+ weight_decay: 1e-6
4
+
5
+ lr_scheduler: ReduceLROnPlateau
6
+ lr_scheduler_params:
7
+ mode: min
8
+ factor: 0.1
9
+ patience: 25
10
+ threshold: 1e-4
11
+
12
+ #lr_scheduler: CosineAnnealingWarmRestarts
13
+ #lr_scheduler_params:
14
+ # T_0: 10
15
+ # T_mult: 1
16
+ # eta_min: 1e-5
17
+
18
+ #lr_scheduler: StepLR
19
+ #lr_scheduler_params:
20
+ # step_size: 100
21
+ # gamma: 0.75
22
+
23
  lr_scheduler_monitor_metric: valid_loss
configs/{immuno-regression β†’ cytokines-regression}/TrainerConfig.yaml RENAMED
@@ -1,26 +1,26 @@
1
- batch_size: 1024
2
- fast_dev_run: false
3
- max_epochs: 1000
4
- min_epochs: 1
5
- max_time: null
6
- accelerator: auto
7
- devices: -1
8
- accumulate_grad_batches: 1
9
- auto_lr_find: true
10
- check_val_every_n_epoch: 1
11
- gradient_clip_val: 0.0
12
- overfit_batches: 0.0
13
- profiler: null
14
- early_stopping: valid_loss
15
- early_stopping_min_delta: 0.000001
16
- early_stopping_mode: min
17
- early_stopping_patience: 50
18
- checkpoints: valid_loss
19
- checkpoints_path: ""
20
- checkpoints_every_n_epochs: 5
21
- checkpoints_mode: min
22
- checkpoints_save_top_k: 1
23
- load_best: true
24
- track_grad_norm: -1
25
- progress_bar: none
26
- seed: 1337
 
1
+ batch_size: 1024
2
+ fast_dev_run: false
3
+ max_epochs: 1000
4
+ min_epochs: 1
5
+ max_time: null
6
+ accelerator: auto
7
+ devices: -1
8
+ accumulate_grad_batches: 1
9
+ auto_lr_find: true
10
+ check_val_every_n_epoch: 1
11
+ gradient_clip_val: 0.0
12
+ overfit_batches: 0.0
13
+ profiler: null
14
+ early_stopping: valid_loss
15
+ early_stopping_min_delta: 0.000001
16
+ early_stopping_mode: min
17
+ early_stopping_patience: 50
18
+ checkpoints: valid_loss
19
+ checkpoints_path: ""
20
+ checkpoints_every_n_epochs: 5
21
+ checkpoints_mode: min
22
+ checkpoints_save_top_k: 1
23
+ load_best: true
24
+ track_grad_norm: -1
25
+ progress_bar: none
26
+ seed: 1337
configs/{immuno-regression β†’ cytokines-regression}/models/CategoryEmbeddingModelConfig.yaml RENAMED
@@ -1,26 +1,26 @@
1
- _module_src: models.category_embedding
2
- _model_name: CategoryEmbeddingModel
3
- _backbone_name: CategoryEmbeddingBackbone
4
- _config_name: CategoryEmbeddingModelConfig
5
-
6
- task: regression
7
- head: LinearHead
8
- head_config:
9
- layers: ""
10
- activation: ReLU
11
- dropout: 0.1
12
- use_batch_norm: false
13
- initialization: xavier
14
- learning_rate: 1e-3
15
- loss: L1Loss
16
- metrics:
17
- - mean_absolute_error
18
- - pearson_corrcoef
19
- target_range: null
20
- seed: 1337
21
-
22
- layers: "256-128-64"
23
- activation: ReLU
24
- use_batch_norm: false
25
- initialization: xavier
26
- dropout: 0.1
 
1
+ _module_src: models.category_embedding
2
+ _model_name: CategoryEmbeddingModel
3
+ _backbone_name: CategoryEmbeddingBackbone
4
+ _config_name: CategoryEmbeddingModelConfig
5
+
6
+ task: regression
7
+ head: LinearHead
8
+ head_config:
9
+ layers: ""
10
+ activation: ReLU
11
+ dropout: 0.1
12
+ use_batch_norm: false
13
+ initialization: xavier
14
+ learning_rate: 1e-3
15
+ loss: L1Loss
16
+ metrics:
17
+ - mean_absolute_error
18
+ - pearson_corrcoef
19
+ target_range: null
20
+ seed: 1337
21
+
22
+ layers: "256-128-64"
23
+ activation: ReLU
24
+ use_batch_norm: false
25
+ initialization: xavier
26
+ dropout: 0.1
configs/{immuno-regression β†’ cytokines-regression}/models/DANetConfig.yaml RENAMED
@@ -1,26 +1,26 @@
1
- _module_src: models.danet
2
- _model_name: DANetModel
3
- _backbone_name: DANetBackbone
4
- _config_name: DANetConfig
5
-
6
- task: regression
7
- head: LinearHead
8
- head_config:
9
- layers: ""
10
- activation: ReLU
11
- dropout: 0.1
12
- use_batch_norm: false
13
- initialization: xavier
14
- learning_rate: 1e-3
15
- loss: L1Loss
16
- metrics:
17
- - mean_absolute_error
18
- - pearson_corrcoef
19
- target_range: null
20
- seed: 1337
21
-
22
- n_layers: 8
23
- abstlay_dim_1: 32
24
- abstlay_dim_2: null
25
- k: 5
26
- dropout_rate: 0.1
 
1
+ _module_src: models.danet
2
+ _model_name: DANetModel
3
+ _backbone_name: DANetBackbone
4
+ _config_name: DANetConfig
5
+
6
+ task: regression
7
+ head: LinearHead
8
+ head_config:
9
+ layers: ""
10
+ activation: ReLU
11
+ dropout: 0.1
12
+ use_batch_norm: false
13
+ initialization: xavier
14
+ learning_rate: 1e-3
15
+ loss: L1Loss
16
+ metrics:
17
+ - mean_absolute_error
18
+ - pearson_corrcoef
19
+ target_range: null
20
+ seed: 1337
21
+
22
+ n_layers: 8
23
+ abstlay_dim_1: 32
24
+ abstlay_dim_2: null
25
+ k: 5
26
+ dropout_rate: 0.1
configs/{immuno-regression β†’ cytokines-regression}/models/FTTransformerConfig.yaml RENAMED
@@ -1,29 +1,29 @@
1
- _module_src: models.ft_transformer
2
- _model_name: FTTransformerModel
3
- _backbone_name: FTTransformerBackbone
4
- _config_name: FTTransformerConfig
5
-
6
- task: regression
7
- head: LinearHead
8
- head_config:
9
- layers: ""
10
- activation: ReLU
11
- dropout: 0.1
12
- use_batch_norm: false
13
- initialization: xavier
14
- learning_rate: 1e-3
15
- loss: L1Loss
16
- metrics:
17
- - mean_absolute_error
18
- - pearson_corrcoef
19
- target_range: null
20
- seed: 1337
21
-
22
- attn_feature_importance: false
23
- num_heads: 8
24
- num_attn_blocks: 6
25
- attn_dropout: 0.1
26
- add_norm_dropout: 0.1
27
- ff_dropout: 0.1
28
- ff_hidden_multiplier: 4
29
  transformer_activation: GEGLU
 
1
+ _module_src: models.ft_transformer
2
+ _model_name: FTTransformerModel
3
+ _backbone_name: FTTransformerBackbone
4
+ _config_name: FTTransformerConfig
5
+
6
+ task: regression
7
+ head: LinearHead
8
+ head_config:
9
+ layers: ""
10
+ activation: ReLU
11
+ dropout: 0.1
12
+ use_batch_norm: false
13
+ initialization: xavier
14
+ learning_rate: 1e-3
15
+ loss: L1Loss
16
+ metrics:
17
+ - mean_absolute_error
18
+ - pearson_corrcoef
19
+ target_range: null
20
+ seed: 1337
21
+
22
+ attn_feature_importance: false
23
+ num_heads: 8
24
+ num_attn_blocks: 6
25
+ attn_dropout: 0.1
26
+ add_norm_dropout: 0.1
27
+ ff_dropout: 0.1
28
+ ff_hidden_multiplier: 4
29
  transformer_activation: GEGLU
configs/{immuno-regression β†’ cytokines-regression}/models/GANDALFConfig.yaml RENAMED
@@ -1,24 +1,24 @@
1
- _module_src: models.gandalf
2
- _model_name: GANDALFModel
3
- _backbone_name: GANDALFBackbone
4
- _config_name: GANDALFConfig
5
-
6
- task: regression
7
- head: LinearHead
8
- head_config:
9
- layers: ""
10
- activation: ReLU
11
- dropout: 0.1
12
- use_batch_norm: false
13
- initialization: xavier
14
- learning_rate: 1e-3
15
- loss: L1Loss
16
- metrics:
17
- - mean_absolute_error
18
- - pearson_corrcoef
19
- target_range: null
20
- seed: 1337
21
-
22
- gflu_stages: 6
23
- gflu_dropout: 0.0
24
- gflu_feature_init_sparsity: 0.3
 
1
+ _module_src: models.gandalf
2
+ _model_name: GANDALFModel
3
+ _backbone_name: GANDALFBackbone
4
+ _config_name: GANDALFConfig
5
+
6
+ task: regression
7
+ head: LinearHead
8
+ head_config:
9
+ layers: ""
10
+ activation: ReLU
11
+ dropout: 0.1
12
+ use_batch_norm: false
13
+ initialization: xavier
14
+ learning_rate: 1e-3
15
+ loss: L1Loss
16
+ metrics:
17
+ - mean_absolute_error
18
+ - pearson_corrcoef
19
+ target_range: null
20
+ seed: 1337
21
+
22
+ gflu_stages: 6
23
+ gflu_dropout: 0.0
24
+ gflu_feature_init_sparsity: 0.3
configs/{immuno-regression β†’ cytokines-regression}/models/TabNetModelConfig.yaml RENAMED
@@ -1,29 +1,29 @@
1
- _module_src: models.tabnet
2
- _model_name: TabNetModel
3
- _backbone_name: TabNetBackbone
4
- _config_name: TabNetModelConfig
5
-
6
- task: regression
7
- head: LinearHead
8
- head_config:
9
- layers: ""
10
- activation: ReLU
11
- dropout: 0.1
12
- use_batch_norm: false
13
- initialization: xavier
14
- learning_rate: 1e-3
15
- loss: L1Loss
16
- metrics:
17
- - mean_absolute_error
18
- - pearson_corrcoef
19
- target_range: null
20
- seed: 1337
21
-
22
- n_d: 8
23
- n_a: 8
24
- n_steps: 3
25
- gamma: 1.3
26
- n_independent: 2
27
- n_shared: 2
28
- virtual_batch_size: 512
29
  mask_type: sparsemax
 
1
+ _module_src: models.tabnet
2
+ _model_name: TabNetModel
3
+ _backbone_name: TabNetBackbone
4
+ _config_name: TabNetModelConfig
5
+
6
+ task: regression
7
+ head: LinearHead
8
+ head_config:
9
+ layers: ""
10
+ activation: ReLU
11
+ dropout: 0.1
12
+ use_batch_norm: false
13
+ initialization: xavier
14
+ learning_rate: 1e-3
15
+ loss: L1Loss
16
+ metrics:
17
+ - mean_absolute_error
18
+ - pearson_corrcoef
19
+ target_range: null
20
+ seed: 1337
21
+
22
+ n_d: 8
23
+ n_a: 8
24
+ n_steps: 3
25
+ gamma: 1.3
26
+ n_independent: 2
27
+ n_shared: 2
28
+ virtual_batch_size: 512
29
  mask_type: sparsemax
models/EpImAge/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/{EpImAge β†’ EpInflammAge}/config.yml RENAMED
@@ -1,118 +1,118 @@
1
- target:
2
- - Age
3
- continuous_cols:
4
- - CXCL9_log
5
- - CCL11_log
6
- - IL27_log
7
- - IL5_log
8
- - CSF1_log
9
- - CCL2_log
10
- - IL1B_log
11
- - IL6_log
12
- - GCSF_log
13
- - CXCL10_log
14
- - VEGFA_log
15
- - TNF_log
16
- - PDGFB_log
17
- - IL8_log
18
- - PDGFA_log
19
- - IL12Bp40_log
20
- - IL15_log
21
- - CXCL1_log
22
- - CCL4_log
23
- - IFNA2_log
24
- - IL13_log
25
- - FLT3L_log
26
- - CD40LG_log
27
- - CCL22_log
28
- categorical_cols: []
29
- date_columns: []
30
- encode_date_columns: true
31
- validation_split: 0.25
32
- continuous_feature_transform: yeo-johnson
33
- normalize_continuous_features: true
34
- quantile_noise: 0
35
- num_workers: 0
36
- pin_memory: true
37
- handle_unknown_categories: true
38
- handle_missing_values: true
39
- task: regression
40
- head: LinearHead
41
- head_config:
42
- layers: ''
43
- activation: ReLU
44
- dropout: 0.23377289048411876
45
- use_batch_norm: false
46
- initialization: xavier
47
- embedding_dims: null
48
- embedding_dropout: 0.0
49
- batch_norm_continuous_input: true
50
- learning_rate: 0.029204372085555506
51
- loss: L1Loss
52
- metrics:
53
- - mean_absolute_error
54
- - pearson_corrcoef
55
- metrics_prob_input:
56
- - false
57
- - false
58
- metrics_params:
59
- - {}
60
- - {}
61
- target_range: null
62
- virtual_batch_size: 256
63
- seed: 1984
64
- _module_src: models.danet
65
- _model_name: DANetModel
66
- _backbone_name: DANetBackbone
67
- _config_name: DANetConfig
68
- n_layers: 28
69
- abstlay_dim_1: 8
70
- abstlay_dim_2: 64
71
- k: 2
72
- dropout_rate: 0.2320482225690916
73
- block_activation: LeakyReLU
74
- batch_size: 1024
75
- data_aware_init_batch_size: 2000
76
- fast_dev_run: false
77
- max_epochs: 256
78
- min_epochs: 1
79
- max_time: null
80
- accelerator: auto
81
- devices: -1
82
- devices_list: null
83
- accumulate_grad_batches: 1
84
- auto_lr_find: false
85
- auto_select_gpus: true
86
- check_val_every_n_epoch: 1
87
- gradient_clip_val: 0.0
88
- overfit_batches: 0.0
89
- deterministic: false
90
- profiler: null
91
- early_stopping: valid_loss
92
- early_stopping_min_delta: 0.001
93
- early_stopping_mode: min
94
- early_stopping_patience: 20
95
- early_stopping_kwargs: {}
96
- checkpoints: valid_loss
97
- checkpoints_path: D:/YandexDisk/Work/bbd/immunology/003_EpImAge/imp_source(imm)_method(knn)_params(5)/no_harm/mrmr_100/EpImAge/pytorch_tabular
98
- checkpoints_every_n_epochs: 1
99
- checkpoints_name: null
100
- checkpoints_mode: min
101
- checkpoints_save_top_k: 1
102
- checkpoints_kwargs: {}
103
- load_best: true
104
- track_grad_norm: -1
105
- progress_bar: none
106
- precision: 32
107
- trainer_kwargs: {}
108
- optimizer: Adam
109
- optimizer_params:
110
- weight_decay: 2.149173764897728e-08
111
- lr_scheduler: ReduceLROnPlateau
112
- lr_scheduler_params:
113
- mode: min
114
- factor: 0.7071915700100401
115
- patience: 10
116
- threshold: 0.0001
117
- lr_scheduler_monitor_metric: valid_loss
118
- enable_checkpointing: true
 
1
+ target:
2
+ - Age
3
+ continuous_cols:
4
+ - CXCL9_log
5
+ - CCL11_log
6
+ - IL27_log
7
+ - IL5_log
8
+ - CSF1_log
9
+ - CCL2_log
10
+ - IL1B_log
11
+ - IL6_log
12
+ - GCSF_log
13
+ - CXCL10_log
14
+ - VEGFA_log
15
+ - TNF_log
16
+ - PDGFB_log
17
+ - IL8_log
18
+ - PDGFA_log
19
+ - IL12Bp40_log
20
+ - IL15_log
21
+ - CXCL1_log
22
+ - CCL4_log
23
+ - IFNA2_log
24
+ - IL13_log
25
+ - FLT3L_log
26
+ - CD40LG_log
27
+ - CCL22_log
28
+ categorical_cols: []
29
+ date_columns: []
30
+ encode_date_columns: true
31
+ validation_split: 0.25
32
+ continuous_feature_transform: yeo-johnson
33
+ normalize_continuous_features: true
34
+ quantile_noise: 0
35
+ num_workers: 0
36
+ pin_memory: true
37
+ handle_unknown_categories: true
38
+ handle_missing_values: true
39
+ task: regression
40
+ head: LinearHead
41
+ head_config:
42
+ layers: ''
43
+ activation: ReLU
44
+ dropout: 0.23377289048411876
45
+ use_batch_norm: false
46
+ initialization: xavier
47
+ embedding_dims: null
48
+ embedding_dropout: 0.0
49
+ batch_norm_continuous_input: true
50
+ learning_rate: 0.029204372085555506
51
+ loss: L1Loss
52
+ metrics:
53
+ - mean_absolute_error
54
+ - pearson_corrcoef
55
+ metrics_prob_input:
56
+ - false
57
+ - false
58
+ metrics_params:
59
+ - {}
60
+ - {}
61
+ target_range: null
62
+ virtual_batch_size: 256
63
+ seed: 1984
64
+ _module_src: models.danet
65
+ _model_name: DANetModel
66
+ _backbone_name: DANetBackbone
67
+ _config_name: DANetConfig
68
+ n_layers: 28
69
+ abstlay_dim_1: 8
70
+ abstlay_dim_2: 64
71
+ k: 2
72
+ dropout_rate: 0.2320482225690916
73
+ block_activation: LeakyReLU
74
+ batch_size: 1024
75
+ data_aware_init_batch_size: 2000
76
+ fast_dev_run: false
77
+ max_epochs: 256
78
+ min_epochs: 1
79
+ max_time: null
80
+ accelerator: auto
81
+ devices: -1
82
+ devices_list: null
83
+ accumulate_grad_batches: 1
84
+ auto_lr_find: false
85
+ auto_select_gpus: true
86
+ check_val_every_n_epoch: 1
87
+ gradient_clip_val: 0.0
88
+ overfit_batches: 0.0
89
+ deterministic: false
90
+ profiler: null
91
+ early_stopping: valid_loss
92
+ early_stopping_min_delta: 0.001
93
+ early_stopping_mode: min
94
+ early_stopping_patience: 20
95
+ early_stopping_kwargs: {}
96
+ checkpoints: valid_loss
97
+ checkpoints_path: D:/YandexDisk/Work/bbd/immunology/003_EpImAge/imp_source(imm)_method(knn)_params(5)/no_harm/mrmr_100/EpImAge/pytorch_tabular
98
+ checkpoints_every_n_epochs: 1
99
+ checkpoints_name: null
100
+ checkpoints_mode: min
101
+ checkpoints_save_top_k: 1
102
+ checkpoints_kwargs: {}
103
+ load_best: true
104
+ track_grad_norm: -1
105
+ progress_bar: none
106
+ precision: 32
107
+ trainer_kwargs: {}
108
+ optimizer: Adam
109
+ optimizer_params:
110
+ weight_decay: 2.149173764897728e-08
111
+ lr_scheduler: ReduceLROnPlateau
112
+ lr_scheduler_params:
113
+ mode: min
114
+ factor: 0.7071915700100401
115
+ patience: 10
116
+ threshold: 0.0001
117
+ lr_scheduler_monitor_metric: valid_loss
118
+ enable_checkpointing: true
models/EpInflammAge/custom_params.sav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e66e47b6f4047b2a3a2b3581ff778d82b6d9a193030ba322fd3a47baf67c0655
3
+ size 127
models/{EpImAge β†’ EpInflammAge}/datamodule.sav RENAMED
File without changes
models/{EpImAge β†’ EpInflammAge}/model.ckpt RENAMED
File without changes
models/Immunomarkers/CCL11/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CCL11/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CCL2/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CCL2/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/CCL22/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CCL22/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/CCL3/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CCL3/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CCL4/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CCL4/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CCL7/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CCL7/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CD40LG/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CD40LG/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CSF1/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CSF1/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CX3CL1/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CX3CL1/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CXCL1/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CXCL1/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/CXCL10/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CXCL10/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/CXCL9/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/CXCL9/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/FLT3L/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/FLT3L/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/GCSF/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/GCSF/datamodule.sav DELETED
Binary file (131 kB)
 
models/Immunomarkers/IFNA2/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/IFNA2/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/IL12Bp40/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/IL12Bp40/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/IL13/custom_params.sav DELETED
Binary file (127 Bytes)
 
models/Immunomarkers/IL13/datamodule.sav DELETED
Binary file (132 kB)
 
models/Immunomarkers/IL15/custom_params.sav DELETED
Binary file (127 Bytes)