264 lines
7.1 KiB
JSON
264 lines
7.1 KiB
JSON
{
|
|
"run_name": "v4/ensemble_fused",
|
|
"eval_stage": "hb",
|
|
"config": {
|
|
"_notes": [
|
|
"V4 stage-pipeline: warm \u2192 fusion stages with parallel head stages.",
|
|
"Bridges are pure embedding producers; heads are separate swappable stages.",
|
|
"BCD-eligible heads are sampled during tower_warmup and main phases.",
|
|
"eval_stage names the fusion stage whose primary head is used for final metrics."
|
|
],
|
|
"run_name": "v4/ensemble_fused",
|
|
"num_classes": 2,
|
|
"label_filter": [
|
|
0,
|
|
1
|
|
],
|
|
"split_identity_level": 1,
|
|
"eval_stage": "hb",
|
|
"save_predictions": false,
|
|
"seed": 1234,
|
|
"folds": 5,
|
|
"fold_seed": 100,
|
|
"output_root": "v4/results",
|
|
"out_dir_tags": [
|
|
"binary",
|
|
"ntower"
|
|
],
|
|
"data": {
|
|
"module": "v4.classes.profiles.v4papila",
|
|
"args": {
|
|
"image_dir": "Papila/FundusImages",
|
|
"clinical_dir": "Papila/ClinicalData",
|
|
"label_col": "Diagnosis",
|
|
"iop_corr_method": "ratio",
|
|
"iop_drop_raw": true,
|
|
"exclude_cols": [
|
|
"Axial_Length"
|
|
],
|
|
"in_memory_cache": true
|
|
}
|
|
},
|
|
"towers": [
|
|
{
|
|
"name": "img",
|
|
"module": "v4.classes.towers.image_tower",
|
|
"class": "ImageEncoder",
|
|
"data_source": "image",
|
|
"args": {
|
|
"backbone": "refugelike",
|
|
"freeze_ratio": 0.0,
|
|
"augment": true
|
|
}
|
|
},
|
|
{
|
|
"name": "cd",
|
|
"module": "v4.classes.towers.clinical_tower",
|
|
"class": "ClinicalEncoder",
|
|
"data_source": "matrix",
|
|
"args": {
|
|
"hidden_dim": 128
|
|
}
|
|
}
|
|
],
|
|
"stages": [
|
|
{
|
|
"name": "cd_warm",
|
|
"type": "warm",
|
|
"tower": "cd",
|
|
"level": "eye",
|
|
"epochs": 40
|
|
},
|
|
{
|
|
"name": "img_aux",
|
|
"type": "head",
|
|
"input": "img",
|
|
"train_with": "nt",
|
|
"bcd": true
|
|
},
|
|
{
|
|
"name": "cd_aux",
|
|
"type": "head",
|
|
"input": "cd",
|
|
"train_with": "nt",
|
|
"bcd": true
|
|
},
|
|
{
|
|
"name": "nt",
|
|
"type": "fusion",
|
|
"module": "v4.classes.bridges.fusion_bridge",
|
|
"class": "FusionBridge",
|
|
"inputs": [
|
|
"img",
|
|
"cd"
|
|
],
|
|
"level": "eye",
|
|
"epochs": 36,
|
|
"train_towers": true,
|
|
"warmup": {
|
|
"tower_epochs": 3,
|
|
"fused_epochs": 3
|
|
},
|
|
"args": {
|
|
"fusion_dim": 256
|
|
}
|
|
},
|
|
{
|
|
"name": "nt_head",
|
|
"type": "head",
|
|
"input": "nt",
|
|
"train_with": "nt"
|
|
},
|
|
{
|
|
"name": "hb",
|
|
"type": "fusion",
|
|
"module": "v4.classes.bridges.hyperbridge",
|
|
"class": "HyperBridge",
|
|
"inputs": {
|
|
"a": "nt",
|
|
"b": "nt"
|
|
},
|
|
"level": "patient",
|
|
"epochs": 10,
|
|
"args": {
|
|
"hidden_dim": 256,
|
|
"mode": "embedding_mlp"
|
|
}
|
|
},
|
|
{
|
|
"name": "hb_head",
|
|
"type": "head",
|
|
"input": "hb",
|
|
"train_with": "hb"
|
|
}
|
|
],
|
|
"training": {
|
|
"lr": 0.0001,
|
|
"batch_size": 16,
|
|
"bcd_prob": 0.5,
|
|
"tune_binary_threshold": true
|
|
}
|
|
},
|
|
"mean_val_auc": 0.8926470588235293,
|
|
"std_val_auc": 0.06105155516072669,
|
|
"mean_test_auc": 0.9022058823529413,
|
|
"std_test_auc": 0.035001853633564395,
|
|
"elapsed_s": 1525.9,
|
|
"fold_results": [
|
|
{
|
|
"fold": 0,
|
|
"nt_val_auc": 0.858647936786655,
|
|
"nt_val_acc": 0.8928571428571429,
|
|
"nt_val_n": 84,
|
|
"nt_val_kappa": 0.6272189349112426,
|
|
"nt_val_mcc": 0.6411186083279721,
|
|
"nt_val_f1": 0.8124534854874721,
|
|
"nt_val_threshold": 0.012987074442207813,
|
|
"nt_test_auc": 0.9157155399473222,
|
|
"nt_test_acc": 0.9047619047619048,
|
|
"nt_test_n": 84,
|
|
"hb_val_auc": 0.9080882352941178,
|
|
"hb_val_acc": 0.8333333333333334,
|
|
"hb_val_n": 42,
|
|
"hb_val_kappa": 0.2898550724637682,
|
|
"hb_val_mcc": 0.33633639699815626,
|
|
"hb_val_f1": 0.6338729763387297,
|
|
"hb_val_threshold": 0.011891158297657967,
|
|
"hb_test_auc": 0.9522058823529411,
|
|
"hb_test_acc": 0.9523809523809523,
|
|
"hb_test_n": 42
|
|
},
|
|
{
|
|
"fold": 1,
|
|
"nt_val_auc": 0.8282828282828283,
|
|
"nt_val_acc": 0.8928571428571429,
|
|
"nt_val_n": 84,
|
|
"nt_val_kappa": 0.6111111111111112,
|
|
"nt_val_mcc": 0.6633249580710799,
|
|
"nt_val_f1": 0.801418439716312,
|
|
"nt_val_threshold": 0.008082838729023933,
|
|
"nt_test_auc": 0.8726953467954346,
|
|
"nt_test_acc": 0.8690476190476191,
|
|
"nt_test_n": 84,
|
|
"hb_val_auc": 0.7904411764705882,
|
|
"hb_val_acc": 0.9047619047619048,
|
|
"hb_val_n": 42,
|
|
"hb_val_kappa": 0.6181818181818182,
|
|
"hb_val_mcc": 0.6688560540599386,
|
|
"hb_val_f1": 0.8055555555555556,
|
|
"hb_val_threshold": 0.013159404508769512,
|
|
"hb_test_auc": 0.8970588235294117,
|
|
"hb_test_acc": 0.8571428571428571,
|
|
"hb_test_n": 42
|
|
},
|
|
{
|
|
"fold": 2,
|
|
"nt_val_auc": 0.8906882591093117,
|
|
"nt_val_acc": 0.8452380952380952,
|
|
"nt_val_n": 84,
|
|
"nt_val_kappa": 0.5125,
|
|
"nt_val_mcc": 0.5217535056401378,
|
|
"nt_val_f1": 0.7548821548821549,
|
|
"nt_val_threshold": 0.052708517760038376,
|
|
"nt_test_auc": 0.856060606060606,
|
|
"nt_test_acc": 0.8333333333333334,
|
|
"nt_test_n": 84,
|
|
"hb_val_auc": 0.9117647058823529,
|
|
"hb_val_acc": 0.8333333333333334,
|
|
"hb_val_n": 42,
|
|
"hb_val_kappa": 0.36909871244635195,
|
|
"hb_val_mcc": 0.3833788364965519,
|
|
"hb_val_f1": 0.6814734561213435,
|
|
"hb_val_threshold": 0.0401872955262661,
|
|
"hb_test_auc": 0.8566176470588236,
|
|
"hb_test_acc": 0.8571428571428571,
|
|
"hb_test_n": 42
|
|
},
|
|
{
|
|
"fold": 3,
|
|
"nt_val_auc": 0.921875,
|
|
"nt_val_acc": 0.8928571428571429,
|
|
"nt_val_n": 84,
|
|
"nt_val_kappa": 0.6758147512864494,
|
|
"nt_val_mcc": 0.6797955088067001,
|
|
"nt_val_f1": 0.837593984962406,
|
|
"nt_val_threshold": 0.708580732345581,
|
|
"nt_test_auc": 0.8631578947368421,
|
|
"nt_test_acc": 0.8452380952380952,
|
|
"nt_test_n": 84,
|
|
"hb_val_auc": 0.9779411764705882,
|
|
"hb_val_acc": 0.9285714285714286,
|
|
"hb_val_n": 42,
|
|
"hb_val_kappa": 0.7567567567567568,
|
|
"hb_val_mcc": 0.7592566023652966,
|
|
"hb_val_f1": 0.8782608695652174,
|
|
"hb_val_threshold": 0.04653067886829376,
|
|
"hb_test_auc": 0.875,
|
|
"hb_test_acc": 0.8809523809523809,
|
|
"hb_test_n": 42
|
|
},
|
|
{
|
|
"fold": 4,
|
|
"nt_val_auc": 0.8279192273924496,
|
|
"nt_val_acc": 0.8571428571428571,
|
|
"nt_val_n": 84,
|
|
"nt_val_kappa": 0.46325878594249204,
|
|
"nt_val_mcc": 0.49610717544581684,
|
|
"nt_val_f1": 0.7269772481040087,
|
|
"nt_val_threshold": 0.06419441103935242,
|
|
"nt_test_auc": 0.8961397058823529,
|
|
"nt_test_acc": 0.8928571428571429,
|
|
"nt_test_n": 84,
|
|
"hb_val_auc": 0.875,
|
|
"hb_val_acc": 0.9047619047619048,
|
|
"hb_val_n": 42,
|
|
"hb_val_kappa": 0.6181818181818182,
|
|
"hb_val_mcc": 0.6688560540599386,
|
|
"hb_val_f1": 0.8055555555555556,
|
|
"hb_val_threshold": 0.23509082198143005,
|
|
"hb_test_auc": 0.9301470588235294,
|
|
"hb_test_acc": 0.8809523809523809,
|
|
"hb_test_n": 42
|
|
}
|
|
]
|
|
} |