diff --git a/.gitignore b/.gitignore index bb3ee31f..febe0456 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,45 @@ -poetry.lock +# Personal files scripts/example.py .vscode/ configuration.yaml configuration2.yaml example.py -scripts/main_test.py -scripts/main_test2.py -scripts/main_test_modular.py -*.png /data /data_old example_result.jsonl MedicalNet_pytorch_files2 slurm_logs lightning_logs +MICCAI2026-Latex-Template/ +OUT/ _scratch/ +scripts/analysis/ +scripts/data/ +scripts/visualization_backup/ +scripts/compute_cache.py +scripts/data_preparation.py +scripts/demographics_preparation.py +scripts/download_curia.py +scripts/hydra_main.py +scripts/main.py +scripts/main_test.py +scripts/main_test2.py +scripts/main_test_modular.py +scripts/optimize_training.py +scripts/prepare_data_wrapped.py +scripts/rename_gray_matter_files.py +scripts/interpretability/OUT* +scripts/interpretability/focus/outputs/ + + +# Code files +poetry.lock +*_logs/ +*.png +analysis_results/ +outputs/ +multirun/ +*.parquet # Byte-compiled / optimized / DLL files diff --git a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.aux b/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.aux deleted file mode 100644 index f23e5468..00000000 --- a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.aux +++ /dev/null @@ -1 +0,0 @@ -\relax diff --git a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.log b/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.log deleted file mode 100644 index fbbc011e..00000000 --- a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.log +++ /dev/null @@ -1,245 +0,0 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2026.2.18) 21 FEB 2026 14:28 -entering extended mode - restricted \write18 enabled. - file:line:error style messages enabled. - %&-line parsing enabled. -**"/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy" -(/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.tex -LaTeX2e <2025-11-01> -L3 programming layer <2026-01-19> -(./llncs.cls -Document Class: llncs 2024/01/29 v2.24 - LaTeX document class for Lecture Notes in Computer Science -(/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/article.cls -Document Class: article 2025/01/22 v1.4n Standard LaTeX document class -(/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/size10.clo -File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) -) -\c@part=\count275 -\c@section=\count276 -\c@subsection=\count277 -\c@subsubsection=\count278 -\c@paragraph=\count279 -\c@subparagraph=\count280 -\c@figure=\count281 -\c@table=\count282 -\abovecaptionskip=\skip49 -\belowcaptionskip=\skip50 -\bibindent=\dimen148 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/tools/multicol.sty -Package: multicol 2025/10/21 v2.0b multicolumn formatting (FMi) -\c@tracingmulticols=\count283 -\mult@box=\box53 -\multicol@leftmargin=\dimen149 -\c@unbalance=\count284 -\c@collectmore=\count285 -\doublecol@number=\count286 -\multicoltolerance=\count287 -\multicolpretolerance=\count288 -\full@width=\dimen150 -\page@free=\dimen151 -\premulticols=\dimen152 -\postmulticols=\dimen153 -\multicolsep=\skip51 -\multicolbaselineskip=\skip52 -\partial@page=\box54 -\last@line=\box55 -\mc@boxedresult=\box56 -\maxbalancingoverflow=\dimen154 -\mult@rightbox=\box57 -\mult@grightbox=\box58 -\mult@firstbox=\box59 -\mult@gfirstbox=\box60 -\@tempa=\box61 -\@tempa=\box62 -\@tempa=\box63 -\@tempa=\box64 -\@tempa=\box65 -\@tempa=\box66 -\@tempa=\box67 -\@tempa=\box68 -\@tempa=\box69 -\@tempa=\box70 -\@tempa=\box71 -\@tempa=\box72 -\@tempa=\box73 -\@tempa=\box74 -\@tempa=\box75 -\@tempa=\box76 -\@tempa=\box77 -\@tempa=\box78 -\@tempa=\box79 -\@tempa=\box80 -\@tempa=\box81 -\@tempa=\box82 -\@tempa=\box83 -\@tempa=\box84 -\@tempa=\box85 -\@tempa=\box86 -\@tempa=\box87 -\@tempa=\box88 -\@tempa=\box89 -\@tempa=\box90 -\@tempa=\box91 -\@tempa=\box92 -\@tempa=\box93 -\@tempa=\box94 -\@tempa=\box95 -\@tempa=\box96 -\c@minrows=\count289 -\c@columnbadness=\count290 -\c@finalcolumnbadness=\count291 -\last@try=\dimen155 -\multicolovershoot=\dimen156 -\multicolundershoot=\dimen157 -\mult@nat@firstbox=\box97 -\colbreak@box=\box98 -\mc@col@check@num=\count292 -\g__mc_curr_col_int=\count293 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/oberdiek/aliascnt.sty -Package: aliascnt 2018/09/07 v1.5 Alias counters (HO) -) -\c@chapter=\count294 -LaTeX Font Info: Redeclaring math symbol \Gamma on input line 379. -LaTeX Font Info: Redeclaring math symbol \Delta on input line 380. -LaTeX Font Info: Redeclaring math symbol \Theta on input line 381. -LaTeX Font Info: Redeclaring math symbol \Lambda on input line 382. -LaTeX Font Info: Redeclaring math symbol \Xi on input line 383. -LaTeX Font Info: Redeclaring math symbol \Pi on input line 384. -LaTeX Font Info: Redeclaring math symbol \Sigma on input line 385. -LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 386. -LaTeX Font Info: Redeclaring math symbol \Phi on input line 387. -LaTeX Font Info: Redeclaring math symbol \Psi on input line 388. -LaTeX Font Info: Redeclaring math symbol \Omega on input line 389. -LaTeX Info: Redefining \vec on input line 394. -\tocchpnum=\dimen158 -\tocsecnum=\dimen159 -\tocsectotal=\dimen160 -\tocsubsecnum=\dimen161 -\tocsubsectotal=\dimen162 -\tocsubsubsecnum=\dimen163 -\tocsubsubsectotal=\dimen164 -\tocparanum=\dimen165 -\tocparatotal=\dimen166 -\tocsubparanum=\dimen167 -\@tempcntc=\count295 -\fnindent=\dimen168 -\c@@inst=\count296 -\c@@auth=\count297 -\c@auco=\count298 -\instindent=\dimen169 -\authrun=\box99 -\authorrunning=\toks17 -\tocauthor=\toks18 -\titrun=\box100 -\titlerunning=\toks19 -\toctitle=\toks20 -\c@theorem=\count299 -\c@case=\count300 -\c@conjecture=\count301 -\c@corollary=\count302 -\c@definition=\count303 -\c@example=\count304 -\c@exercise=\count305 -\c@lemma=\count306 -\c@note=\count307 -\c@problem=\count308 -\c@property=\count309 -\c@proposition=\count310 -\c@question=\count311 -\c@solution=\count312 -\c@remark=\count313 -\headlineindent=\dimen170 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty -Package: fontenc 2025/07/18 v2.1d Standard LaTeX package -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty -Package: graphicx 2024/12/31 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty -Package: keyval 2022/05/29 v1.15 key=value parser (DPC) -\KV@toks@=\toks21 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty -Package: graphics 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty -Package: trig 2023/12/02 v1.11 sin cos tan (DPC) -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg -File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration -) -Package graphics Info: Driver file: pdftex.def on input line 106. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def -File: pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex -)) -\Gin@req@height=\dimen171 -\Gin@req@width=\dimen172 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/tools/verbatim.sty -Package: verbatim 2024-01-22 v1.5x LaTeX2e package for verbatim enhancements -\every@verbatim=\toks22 -\verbatim@line=\toks23 -\verbatim@in@stream=\read2 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def -File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX) -\l__color_backend_stack_int=\count314 -) (./MICCAI2026-main conference paper template copy.aux) -\openout1 = `"MICCAI2026-main conference paper template copy.aux"'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii -[Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count315 -\scratchdimen=\dimen173 -\scratchbox=\box101 -\nofMPsegments=\count316 -\nofMParguments=\count317 -\everyMPshowfont=\toks24 -\MPscratchCnt=\count318 -\MPscratchDim=\dimen174 -\MPnumerator=\count319 -\makeMPintoPDFobject=\count320 -\everyMPtoPDFconversion=\toks25 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty -Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf -Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 485. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg -File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live -)) -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <7> on input line 51. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <5> on input line 51. - - -! LaTeX Error: File `reuben.tex' not found. - -Type X to quit or to proceed, -or enter new name. (Default extension: tex) - -Enter file name: -/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.tex:67: Emergency stop. - - -l.67 \input{reuben.tex} - ^^M -*** (cannot \read from terminal in nonstop modes) - - -Here is how much of TeX's memory you used: - 2039 strings out of 469005 - 31931 string characters out of 5450604 - 435756 words of memory out of 5000000 - 30763 multiletter control sequences out of 15000+600000 - 632218 words of font info for 47 fonts, out of 8000000 for 9000 - 319 hyphenation exceptions out of 8191 - 57i,1n,65p,515b,221s stack positions out of 10000i,1000n,20000p,200000b,200000s -/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template copy.tex:67: ==> Fatal error occurred, no output PDF file produced! diff --git a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.aux b/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.aux deleted file mode 100644 index f23e5468..00000000 --- a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.aux +++ /dev/null @@ -1 +0,0 @@ -\relax diff --git a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.log b/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.log deleted file mode 100644 index a994893c..00000000 --- a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.log +++ /dev/null @@ -1,245 +0,0 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2026.2.18) 24 FEB 2026 09:51 -entering extended mode - restricted \write18 enabled. - file:line:error style messages enabled. - %&-line parsing enabled. -**"/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template" -(/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.tex -LaTeX2e <2025-11-01> -L3 programming layer <2026-01-19> -(./llncs.cls -Document Class: llncs 2024/01/29 v2.24 - LaTeX document class for Lecture Notes in Computer Science -(/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/article.cls -Document Class: article 2025/01/22 v1.4n Standard LaTeX document class -(/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/size10.clo -File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) -) -\c@part=\count275 -\c@section=\count276 -\c@subsection=\count277 -\c@subsubsection=\count278 -\c@paragraph=\count279 -\c@subparagraph=\count280 -\c@figure=\count281 -\c@table=\count282 -\abovecaptionskip=\skip49 -\belowcaptionskip=\skip50 -\bibindent=\dimen148 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/tools/multicol.sty -Package: multicol 2025/10/21 v2.0b multicolumn formatting (FMi) -\c@tracingmulticols=\count283 -\mult@box=\box53 -\multicol@leftmargin=\dimen149 -\c@unbalance=\count284 -\c@collectmore=\count285 -\doublecol@number=\count286 -\multicoltolerance=\count287 -\multicolpretolerance=\count288 -\full@width=\dimen150 -\page@free=\dimen151 -\premulticols=\dimen152 -\postmulticols=\dimen153 -\multicolsep=\skip51 -\multicolbaselineskip=\skip52 -\partial@page=\box54 -\last@line=\box55 -\mc@boxedresult=\box56 -\maxbalancingoverflow=\dimen154 -\mult@rightbox=\box57 -\mult@grightbox=\box58 -\mult@firstbox=\box59 -\mult@gfirstbox=\box60 -\@tempa=\box61 -\@tempa=\box62 -\@tempa=\box63 -\@tempa=\box64 -\@tempa=\box65 -\@tempa=\box66 -\@tempa=\box67 -\@tempa=\box68 -\@tempa=\box69 -\@tempa=\box70 -\@tempa=\box71 -\@tempa=\box72 -\@tempa=\box73 -\@tempa=\box74 -\@tempa=\box75 -\@tempa=\box76 -\@tempa=\box77 -\@tempa=\box78 -\@tempa=\box79 -\@tempa=\box80 -\@tempa=\box81 -\@tempa=\box82 -\@tempa=\box83 -\@tempa=\box84 -\@tempa=\box85 -\@tempa=\box86 -\@tempa=\box87 -\@tempa=\box88 -\@tempa=\box89 -\@tempa=\box90 -\@tempa=\box91 -\@tempa=\box92 -\@tempa=\box93 -\@tempa=\box94 -\@tempa=\box95 -\@tempa=\box96 -\c@minrows=\count289 -\c@columnbadness=\count290 -\c@finalcolumnbadness=\count291 -\last@try=\dimen155 -\multicolovershoot=\dimen156 -\multicolundershoot=\dimen157 -\mult@nat@firstbox=\box97 -\colbreak@box=\box98 -\mc@col@check@num=\count292 -\g__mc_curr_col_int=\count293 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/oberdiek/aliascnt.sty -Package: aliascnt 2018/09/07 v1.5 Alias counters (HO) -) -\c@chapter=\count294 -LaTeX Font Info: Redeclaring math symbol \Gamma on input line 379. -LaTeX Font Info: Redeclaring math symbol \Delta on input line 380. -LaTeX Font Info: Redeclaring math symbol \Theta on input line 381. -LaTeX Font Info: Redeclaring math symbol \Lambda on input line 382. -LaTeX Font Info: Redeclaring math symbol \Xi on input line 383. -LaTeX Font Info: Redeclaring math symbol \Pi on input line 384. -LaTeX Font Info: Redeclaring math symbol \Sigma on input line 385. -LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 386. -LaTeX Font Info: Redeclaring math symbol \Phi on input line 387. -LaTeX Font Info: Redeclaring math symbol \Psi on input line 388. -LaTeX Font Info: Redeclaring math symbol \Omega on input line 389. -LaTeX Info: Redefining \vec on input line 394. -\tocchpnum=\dimen158 -\tocsecnum=\dimen159 -\tocsectotal=\dimen160 -\tocsubsecnum=\dimen161 -\tocsubsectotal=\dimen162 -\tocsubsubsecnum=\dimen163 -\tocsubsubsectotal=\dimen164 -\tocparanum=\dimen165 -\tocparatotal=\dimen166 -\tocsubparanum=\dimen167 -\@tempcntc=\count295 -\fnindent=\dimen168 -\c@@inst=\count296 -\c@@auth=\count297 -\c@auco=\count298 -\instindent=\dimen169 -\authrun=\box99 -\authorrunning=\toks17 -\tocauthor=\toks18 -\titrun=\box100 -\titlerunning=\toks19 -\toctitle=\toks20 -\c@theorem=\count299 -\c@case=\count300 -\c@conjecture=\count301 -\c@corollary=\count302 -\c@definition=\count303 -\c@example=\count304 -\c@exercise=\count305 -\c@lemma=\count306 -\c@note=\count307 -\c@problem=\count308 -\c@property=\count309 -\c@proposition=\count310 -\c@question=\count311 -\c@solution=\count312 -\c@remark=\count313 -\headlineindent=\dimen170 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty -Package: fontenc 2025/07/18 v2.1d Standard LaTeX package -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty -Package: graphicx 2024/12/31 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty -Package: keyval 2022/05/29 v1.15 key=value parser (DPC) -\KV@toks@=\toks21 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty -Package: graphics 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty -Package: trig 2023/12/02 v1.11 sin cos tan (DPC) -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg -File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration -) -Package graphics Info: Driver file: pdftex.def on input line 106. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def -File: pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex -)) -\Gin@req@height=\dimen171 -\Gin@req@width=\dimen172 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/tools/verbatim.sty -Package: verbatim 2024-01-22 v1.5x LaTeX2e package for verbatim enhancements -\every@verbatim=\toks22 -\verbatim@line=\toks23 -\verbatim@in@stream=\read2 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def -File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX) -\l__color_backend_stack_int=\count314 -) (./MICCAI2026-main conference paper template.aux) -\openout1 = `"MICCAI2026-main conference paper template.aux"'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii -[Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count315 -\scratchdimen=\dimen173 -\scratchbox=\box101 -\nofMPsegments=\count316 -\nofMParguments=\count317 -\everyMPshowfont=\toks24 -\MPscratchCnt=\count318 -\MPscratchDim=\dimen174 -\MPnumerator=\count319 -\makeMPintoPDFobject=\count320 -\everyMPtoPDFconversion=\toks25 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty -Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf -Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 485. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg -File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live -)) -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <7> on input line 51. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <5> on input line 51. - - -! LaTeX Error: File `reuben.tex' not found. - -Type X to quit or to proceed, -or enter new name. (Default extension: tex) - -Enter file name: -/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.tex:67: Emergency stop. - - -l.67 \input{reuben.tex} - ^^M -*** (cannot \read from terminal in nonstop modes) - - -Here is how much of TeX's memory you used: - 2039 strings out of 469005 - 31881 string characters out of 5450604 - 435756 words of memory out of 5000000 - 30763 multiletter control sequences out of 15000+600000 - 632218 words of font info for 47 fonts, out of 8000000 for 9000 - 319 hyphenation exceptions out of 8191 - 57i,1n,65p,510b,221s stack positions out of 10000i,1000n,20000p,200000b,200000s -/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.tex:67: ==> Fatal error occurred, no output PDF file produced! diff --git a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.pdf b/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.pdf deleted file mode 100644 index dc935ec9..00000000 Binary files a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.pdf and /dev/null differ diff --git a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.tex b/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.tex deleted file mode 100644 index 2825a007..00000000 --- a/MICCAI2026-Latex-Template/MICCAI2026-main conference paper template.tex +++ /dev/null @@ -1,143 +0,0 @@ -% This is a modified version of Springer's LNCS template suitable for anonymized MICCAI 2025 main conference submissions. -% Original file: samplepaper.tex, a sample chapter demonstrating the LLNCS macro package for Springer Computer Science proceedings; Version 2.21 of 2022/01/12 - -\documentclass[runningheads]{llncs} -% -\usepackage[T1]{fontenc} -% T1 fonts will be used to generate the final print and online PDFs, -% so please use T1 fonts in your manuscript whenever possible. -% Other font encodings may result in incorrect characters. -% -\usepackage{graphicx,verbatim} -% Used for displaying a sample figure. If possible, figure files should -% be included in EPS format. -% -% If you use the hyperref package, please uncomment the following two lines -% to display URLs in blue roman font according to Springer's eBook style: -%\usepackage{color} -%\renewcommand\UrlFont{\color{blue}\rmfamily} -%\urlstyle{rm} -% -\begin{document} -% -\title{Benchmark paper} -%\titlerunning{Abbreviated paper title} -% If the paper title is too long for the running head, you can set -% an abbreviated paper title here -% -\begin{comment} %% Removed for anonymized MICCAI submission -\author{First Author\inst{1}\orcidID{0000-1111-2222-3333} \and -Second Author\inst{2,3}\orcidID{1111-2222-3333-4444} \and -Third Author\inst{3}\orcidID{2222--3333-4444-5555}} -% -\authorrunning{F. Author et al.} -% First names are abbreviated in the running head. -% If there are more than two authors, 'et al.' is used. -% -\institute{Princeton University, Princeton NJ 08544, USA \and -Springer Heidelberg, Tiergartenstr. 17, 69121 Heidelberg, Germany -\email{lncs@springer.com}\\ -\url{http://www.springer.com/gp/computer-science/lncs} \and -ABC Institute, Rupert-Karls-University Heidelberg, Heidelberg, Germany\\ -\email{\{abc,lncs\}@uni-heidelberg.de}} - -\end{comment} - -\author{Anonymized Authors} %% Added for anonymized MICCAI submission -\authorrunning{Anonymized Author et al.} -\institute{Anonymized Affiliations \\ - \email{email@anonymized.com}} - -\maketitle % typeset the header of the contribution -% -\begin{abstract} -% The abstract should briefly summarize the contents of the paper in 150--250 words. If you are to include a link to your Repository, please make sure it is anonymized for the double-blind review phase. -Diffusion MRI is widely used to explore brain microstructure, and numerous machine learning methods have been proposed to extract predictive information. Yet progress remains difficult to assess: studies rely on single datasets, heterogeneous pipelines, limited evaluation, and often lack accessible code, preventing meaningful comparison and reproducibility. - -We introduce a modular and transparent benchmarking framework for machine learning in dMRI microstructure. The benchmark unifies multiple representative datasets within a standardized end-to-end pipeline and enables systematic comparison across tissue types, feature representations and models. - -It reveals differences between white and gray matter analyses, quantify the impact of diffusion microstructure feature choices, and show that fast linear baselines can rival more complex deep learning methods. Standardized benchmarking is essential to move the field beyond proxy tasks and toward robust methods with real clinical relevance. -\keywords{Benchmark \and Brain \and diffusion MRI.} -% Authors must provide keywords and are not allowed to remove this Keyword section. - -\end{abstract} -% -% -% -\input{reuben.tex} - -\section{Introduction} -\input{introduction.tex} - -\section{Benchmark} -\input{benchmark.tex} - -\section{Results} -\input{results.tex} - -\section{Conclusion} -\input{conclusion.tex} - - -For citations of references, we prefer the use of square brackets -and consecutive numbers. Citations using labels or the author/year -convention are also acceptable. Multiple citations are grouped -\cite{chen2024deep}, -\cite{basser1994mr}. - - %% removed for anonymized MICCAI submission. - - % The following acknowledgement and disclaimer sections can be removed for the double-blind review process. If and when your paper is accepted, reinsert the acknowledgement and the disclaimer clause in your final camera-ready version. - % IF you opted to include the acknowledgement and disclaimer sections, they will count towards the 8-page limit. - -\begin{credits} -\subsubsection{\ackname} A bold run-in heading in small font size at the end of the paper is -used for general acknowledgments, for example: This study was funded -by X (grant number Y). - -\subsubsection{\discintname} -It is now necessary to declare any competing interests or to specifically -state that the authors have no competing interests. Please place the -statement with a bold run-in heading in small font size beneath the -(optional) acknowledgments\footnote{If EquinOCS, our proceedings submission -system, is used, then the disclaimer can be provided directly in the system.}, -for example: The authors have no competing interests to declare that are -relevant to the content of this article. Or: Author A has received research -grants from Company W. Author B has received a speaker honorarium from -Company X and owns stock in Company Y. Author C is a member of committee Z. -\end{credits} - - -% -% ---- Bibliography ---- -% -% BibTeX users should specify bibliography style 'splncs04'. -% References will then be sorted and formatted in the correct style. -% -% \bibliographystyle{splncs04} -% \bibliography{mybibliography} -% -% \begin{thebibliography}{8} -% \bibitem{ref_article1} -% Author, F.: Article title. Journal \textbf{2}(5), 99--110 (2016) - -% \bibitem{ref_lncs1} -% Author, F., Author, S.: Title of a proceedings paper. In: Editor, -% F., Editor, S. (eds.) CONFERENCE 2016, LNCS, vol. 9999, pp. 1--13. -% Springer, Heidelberg (2016). \doi{10.10007/1234567890} - -% \bibitem{ref_book1} -% Author, F., Author, S., Author, T.: Book title. 2nd edn. Publisher, -% Location (1999) - -% \bibitem{ref_proc1} -% Author, A.-B.: Contribution title. In: 9th International Proceedings -% on Proceedings, pp. 1--2. Publisher, Location (2010) - -% \bibitem{ref_url1} -% LNCS Homepage, \url{http://www.springer.com/lncs}, last accessed 2023/10/25 -% \end{thebibliography} -% \end{document} -\bibliographystyle{splncs04} -\bibliography{references} -\end{document} diff --git a/MICCAI2026-Latex-Template/OLD_scheme.pdf b/MICCAI2026-Latex-Template/OLD_scheme.pdf deleted file mode 100644 index 0b34a582..00000000 Binary files a/MICCAI2026-Latex-Template/OLD_scheme.pdf and /dev/null differ diff --git a/MICCAI2026-Latex-Template/OLD_scheme1.pdf b/MICCAI2026-Latex-Template/OLD_scheme1.pdf deleted file mode 100644 index 57182d65..00000000 Binary files a/MICCAI2026-Latex-Template/OLD_scheme1.pdf and /dev/null differ diff --git a/MICCAI2026-Latex-Template/fig1.eps b/MICCAI2026-Latex-Template/fig1.eps deleted file mode 100644 index 715b4800..00000000 Binary files a/MICCAI2026-Latex-Template/fig1.eps and /dev/null differ diff --git a/MICCAI2026-Latex-Template/history.txt b/MICCAI2026-Latex-Template/history.txt deleted file mode 100644 index 74824b60..00000000 --- a/MICCAI2026-Latex-Template/history.txt +++ /dev/null @@ -1,157 +0,0 @@ -Version history for the LLNCS LaTeX2e class - - date filename version action/reason/acknowledgements ----------------------------------------------------------------------------- - 29.5.96 letter.txt beta naming problems (subject index file) - thanks to Dr. Martin Held, Salzburg, AT - - subjindx.ind renamed to subjidx.ind as required - by llncs.dem - - history.txt introducing this file - - 30.5.96 llncs.cls incompatibility with new article.cls of - 1995/12/20 v1.3q Standard LaTeX document class, - \if@openbib is no longer defined, - reported by Ralf Heckmann and Graham Gough - solution by David Carlisle - - 10.6.96 llncs.cls problems with fragile commands in \author field - reported by Michael Gschwind, TU Wien - - 25.7.96 llncs.cls revision a corrects: - wrong size of text area, floats not \small, - some LaTeX generated texts - reported by Michael Sperber, Uni Tuebingen - - 16.4.97 all files 2.1 leaving beta state, - raising version counter to 2.1 - - 8.6.97 llncs.cls 2.1a revision a corrects: - unbreakable citation lists, reported by - Sergio Antoy of Portland State University - -11.12.97 llncs.cls 2.2 "general" headings centered; two new elements - for the article header: \email and \homedir; - complete revision of special environments: - \newtheorem replaced with \spnewtheorem, - introduced the theopargself environment; - two column parts made with multicol package; - add ons to work with the hyperref package - -07.01.98 llncs.cls 2.2 changed \email to simply switch to \tt - -25.03.98 llncs.cls 2.3 new class option "oribibl" to suppress - changes to the thebibliograpy environment - and retain pure LaTeX codes - useful - for most BibTeX applications - -16.04.98 llncs.cls 2.3 if option "oribibl" is given, extend the - thebibliograpy hook with "\small", suggested - by Clemens Ballarin, University of Cambridge - -20.11.98 llncs.cls 2.4 pagestyle "titlepage" - useful for - compilation of whole LNCS volumes - -12.01.99 llncs.cls 2.5 counters of orthogonal numbered special - environments are reset each new contribution - -27.04.99 llncs.cls 2.6 new command \thisbottomragged for the - actual page; indention of the footnote - made variable with \fnindent (default 1em); - new command \url that copys its argument - - 2.03.00 llncs.cls 2.7 \figurename and \tablename made compatible - to babel, suggested by Jo Hereth, TU Darmstadt; - definition of \url moved \AtBeginDocument - (allows for url package of Donald Arseneau), - suggested by Manfred Hauswirth, TU of Vienna; - \large for part entries in the TOC - -16.04.00 llncs.cls 2.8 new option "orivec" to preserve the original - vector definition, read "arrow" accent - -17.01.01 llncs.cls 2.9 hardwired texts made polyglot, - available languages: english (default), - french, german - all are "babel-proof" - -20.06.01 splncs.bst public release of a BibTeX style for LNCS, - nobly provided by Jason Noble - -14.08.01 llncs.cls 2.10 TOC: authors flushleft, - entries without hyphenation; suggested - by Wiro Niessen, Imaging Center - Utrecht - -23.01.02 llncs.cls 2.11 fixed footnote number confusion with - \thanks, numbered institutes, and normal - footnote entries; error reported by - Saverio Cittadini, Istituto Tecnico - Industriale "Tito Sarrocchi" - Siena - -28.01.02 llncs.cls 2.12 fixed footnote fix; error reported by - Chris Mesterharm, CS Dept. Rutgers - NJ - -28.01.02 llncs.cls 2.13 fixed the fix (programmer needs vacation) - -17.08.04 llncs.cls 2.14 TOC: authors indented, smart \and handling - for the TOC suggested by Thomas Gabel - University of Osnabrueck - -07.03.06 splncs.bst fix for BibTeX entries without year; patch - provided by Jerry James, Utah State University - -14.06.06 splncs_srt.bst a sorting BibTeX style for LNCS, feature - provided by Tobias Heindel, FMI Uni-Stuttgart - -16.10.06 llncs.dem 2.3 removed affiliations from \tocauthor demo - -11.12.07 llncs.doc note on online visibility of given e-mail address - -15.06.09 splncs03.bst new BibTeX style compliant with the current - requirements, provided by Maurizio "Titto" - Patrignani of Universita' Roma Tre - -30.03.10 llncs.cls 2.15 fixed broken hyperref interoperability; - patch provided by Sven Koehler, - Hamburg University of Technology - -15.04.10 llncs.cls 2.16 fixed hyperref warning for informatory TOC entries; - introduced \keywords command - finally; - blank removed from \keywordname, flaw reported - by Armin B. Wagner, IGW TU Vienna - -15.04.10 llncs.cls 2.17 fixed missing switch "openright" used by \backmatter; - flaw reported by Tobias Pape, University of Potsdam - -27.09.13 llncs.cls 2.18 fixed "ngerman" incompatibility; solution provided - by Bastian Pfleging, University of Stuttgart - -04.09.17 llncs.cls 2.19 introduced \orcidID command - -10.03.18 llncs.cls 2.20 adjusted \doi according to CrossRef requirements; - TOC: removed affiliation numbers - - splncs04.bst added doi field; - bold journal numbers - - samplepaper.tex new sample paper - - llncsdoc.pdf new LaTeX class documentation - -12.01.22 llncs.cls 2.21 fixed German and French \maketitle, bug reported by - Alexander Malkis, Technical University of Munich; - use detokenized argument in the definition of \doi - to allow underscores in DOIs - -05.09.22 llncs.cls 2.22 robust redefinition of \vec (bold italics), bug - reported by Alexander Malkis, TUM - -02.11.23 llncs.cls 2.23 \ackname changed from "Acknowledgements" (BE) to - "Acknowledgments" (AE). - \discintname introduced for the new, mandatory - section "Disclosure of Interests". - New "credits" environment introduced to provide - small run-in headings for "Acknowledgments" and - the "Disclosure of Interests". - -29.01.22 llncs.cls 2.24 bugfixes for options envcountsame and envcountsect diff --git a/MICCAI2026-Latex-Template/llncs.cls b/MICCAI2026-Latex-Template/llncs.cls deleted file mode 100644 index ea17bb35..00000000 --- a/MICCAI2026-Latex-Template/llncs.cls +++ /dev/null @@ -1,1244 +0,0 @@ -% LLNCS DOCUMENT CLASS -- version 2.24 (29-Jan-2024) -% Springer Verlag LaTeX2e support for Lecture Notes in Computer Science -% -%% -%% \CharacterTable -%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} -%% -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{llncs}[2024/01/29 v2.24 -^^J LaTeX document class for Lecture Notes in Computer Science] -% Options -\let\if@envcntreset\iffalse -\DeclareOption{envcountreset}{\let\if@envcntreset\iftrue} -\DeclareOption{citeauthoryear}{\let\citeauthoryear=Y} -\DeclareOption{oribibl}{\let\oribibl=Y} -\let\if@custvec\iftrue -\DeclareOption{orivec}{\let\if@custvec\iffalse} -\let\if@envcntsame\iffalse -\DeclareOption{envcountsame}{\let\if@envcntsame\iftrue} -\let\if@envcntsect\iffalse -\DeclareOption{envcountsect}{\let\if@envcntsect\iftrue} -\let\if@runhead\iffalse -\DeclareOption{runningheads}{\let\if@runhead\iftrue} - -\let\if@openright\iftrue -\let\if@openbib\iffalse -\DeclareOption{openbib}{\let\if@openbib\iftrue} - -% languages -\let\switcht@@therlang\relax -\def\ds@deutsch{\def\switcht@@therlang{\switcht@deutsch}} -\def\ds@francais{\def\switcht@@therlang{\switcht@francais}} - -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} - -\ProcessOptions - -\LoadClass[twoside]{article} -\RequirePackage{multicol} % needed for the list of participants, index -\RequirePackage{aliascnt} - -\setlength{\textwidth}{12.2cm} -\setlength{\textheight}{19.3cm} -\renewcommand\@pnumwidth{2em} -\renewcommand\@tocrmarg{3.5em} -% -\def\@dottedtocline#1#2#3#4#5{% - \ifnum #1>\c@tocdepth \else - \vskip \z@ \@plus.2\p@ - {\leftskip #2\relax \rightskip \@tocrmarg \advance\rightskip by 0pt plus 2cm - \parfillskip -\rightskip \pretolerance=10000 - \parindent #2\relax\@afterindenttrue - \interlinepenalty\@M - \leavevmode - \@tempdima #3\relax - \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip - {#4}\nobreak - \leaders\hbox{$\m@th - \mkern \@dotsep mu\hbox{.}\mkern \@dotsep - mu$}\hfill - \nobreak - \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}% - \par}% - \fi} -% -\def\switcht@albion{% -\def\abstractname{Abstract.} -\def\ackname{Acknowledgments.} -\def\andname{and} -\def\lastandname{\unskip, and} -\def\appendixname{Appendix} -\def\chaptername{Chapter} -\def\claimname{Claim} -\def\conjecturename{Conjecture} -\def\contentsname{Table of Contents} -\def\corollaryname{Corollary} -\def\definitionname{Definition} -\def\discintname{Disclosure of Interests.} -\def\examplename{Example} -\def\exercisename{Exercise} -\def\figurename{Fig.} -\def\keywordname{{\bf Keywords:}} -\def\indexname{Index} -\def\lemmaname{Lemma} -\def\contriblistname{List of Contributors} -\def\listfigurename{List of Figures} -\def\listtablename{List of Tables} -\def\mailname{{\it Correspondence to\/}:} -\def\noteaddname{Note added in proof} -\def\notename{Note} -\def\partname{Part} -\def\problemname{Problem} -\def\proofname{Proof} -\def\propertyname{Property} -\def\propositionname{Proposition} -\def\questionname{Question} -\def\remarkname{Remark} -\def\seename{see} -\def\solutionname{Solution} -\def\subclassname{{\it Subject Classifications\/}:} -\def\tablename{Table} -\def\theoremname{Theorem}} -\switcht@albion -% Names of theorem like environments are already defined -% but must be translated if another language is chosen -% -% French section -\def\switcht@francais{%\typeout{On parle francais.}% - \def\abstractname{R\'esum\'e.}% - \def\ackname{Remerciements.}% - \def\andname{et}% - \def\lastandname{ et}% - \def\appendixname{Appendice}% - \def\chaptername{Chapitre}% - \def\claimname{Pr\'etention}% - \def\conjecturename{Hypoth\`ese}% - \def\contentsname{Table des mati\`eres}% - \def\corollaryname{Corollaire}% - \def\definitionname{D\'efinition}% - \def\discintname{Mention des Int\'{e}r\^{e}ts.} - \def\examplename{Exemple}% - \def\exercisename{Exercice}% - \def\figurename{Fig.}% - \def\keywordname{{\bf Mots-cl\'e:}}% - \def\indexname{Index}% - \def\lemmaname{Lemme}% - \def\contriblistname{Liste des contributeurs}% - \def\listfigurename{Liste des figures}% - \def\listtablename{Liste des tables}% - \def\mailname{{\it Correspondence to\/}:}% - \def\noteaddname{Note ajout\'ee \`a l'\'epreuve}% - \def\notename{Remarque}% - \def\partname{Partie}% - \def\problemname{Probl\`eme}% - \def\proofname{Preuve}% - \def\propertyname{Caract\'eristique}% -%\def\propositionname{Proposition}% - \def\questionname{Question}% - \def\remarkname{Remarque}% - \def\seename{voir}% - \def\solutionname{Solution}% - \def\subclassname{{\it Subject Classifications\/}:}% - \def\tablename{Tableau}% - \def\theoremname{Th\'eor\`eme}% -} -% -% German section -\def\switcht@deutsch{%\typeout{Man spricht deutsch.}% - \def\abstractname{Zusammenfassung.}% - \def\ackname{Danksagung.}% - \def\andname{und}% - \def\lastandname{ und}% - \def\appendixname{Anhang}% - \def\chaptername{Kapitel}% - \def\claimname{Behauptung}% - \def\conjecturename{Hypothese}% - \def\contentsname{Inhaltsverzeichnis}% - \def\corollaryname{Korollar}% -%\def\definitionname{Definition}% - \def\discintname{Offenlegung von Interessen.} - \def\examplename{Beispiel}% - \def\exercisename{\"Ubung}% - \def\figurename{Abb.}% - \def\keywordname{{\bf Schl\"usselw\"orter:}}% - \def\indexname{Index}% -%\def\lemmaname{Lemma}% - \def\contriblistname{Mitarbeiter}% - \def\listfigurename{Abbildungsverzeichnis}% - \def\listtablename{Tabellenverzeichnis}% - \def\mailname{{\it Correspondence to\/}:}% - \def\noteaddname{Nachtrag}% - \def\notename{Anmerkung}% - \def\partname{Teil}% -%\def\problemname{Problem}% - \def\proofname{Beweis}% - \def\propertyname{Eigenschaft}% -%\def\propositionname{Proposition}% - \def\questionname{Frage}% - \def\remarkname{Anmerkung}% - \def\seename{siehe}% - \def\solutionname{L\"osung}% - \def\subclassname{{\it Subject Classifications\/}:}% - \def\tablename{Tabelle}% -%\def\theoremname{Theorem}% -} - -% Ragged bottom for the actual page -\def\thisbottomragged{\def\@textbottom{\vskip\z@ plus.0001fil -\global\let\@textbottom\relax}} - -\renewcommand\small{% - \@setfontsize\small\@ixpt{11}% - \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ - \abovedisplayshortskip \z@ \@plus2\p@ - \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ - \def\@listi{\leftmargin\leftmargini - \parsep 0\p@ \@plus1\p@ \@minus\p@ - \topsep 8\p@ \@plus2\p@ \@minus4\p@ - \itemsep0\p@}% - \belowdisplayskip \abovedisplayskip -} - -% Switch to small font size for the credits at the end of the paper -% (i.e. Acknowlegments and Disclosure of Interests) -\newenvironment{credits}{% -\begingroup\small% -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-12\p@ \@plus -4\p@ \@minus -4\p@}% - {-0.5em \@plus -0.22em \@minus -0.1em}% - {\normalfont\small\bfseries\boldmath}} -\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% - {-8\p@ \@plus -4\p@ \@minus -4\p@}% - {-0.5em \@plus -0.22em \@minus -0.1em}% - {\normalfont\small\itshape}}% -}{\endgroup} - -\frenchspacing -\widowpenalty=10000 -\clubpenalty=10000 - -\setlength\oddsidemargin {63\p@} -\setlength\evensidemargin {63\p@} -\setlength\marginparwidth {90\p@} - -\setlength\headsep {16\p@} - -\setlength\footnotesep{7.7\p@} -\setlength\textfloatsep{8mm\@plus 2\p@ \@minus 4\p@} -\setlength\intextsep {8mm\@plus 2\p@ \@minus 2\p@} - -\setcounter{secnumdepth}{2} - -\newcounter {chapter} -\renewcommand\thechapter {\@arabic\c@chapter} - -\newif\if@mainmatter \@mainmattertrue -\newcommand\frontmatter{\cleardoublepage - \@mainmatterfalse\pagenumbering{Roman}} -\newcommand\mainmatter{\cleardoublepage - \@mainmattertrue\pagenumbering{arabic}} -\newcommand\backmatter{\if@openright\cleardoublepage\else\clearpage\fi - \@mainmatterfalse} - -\renewcommand\part{\cleardoublepage - \thispagestyle{empty}% - \if@twocolumn - \onecolumn - \@tempswatrue - \else - \@tempswafalse - \fi - \null\vfil - \secdef\@part\@spart} - -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >-2\relax - \refstepcounter{part}% - \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% - \else - \addcontentsline{toc}{part}{#1}% - \fi - \markboth{}{}% - {\centering - \interlinepenalty \@M - \normalfont - \ifnum \c@secnumdepth >-2\relax - \huge\bfseries \partname~\thepart - \par - \vskip 20\p@ - \fi - \Huge \bfseries #2\par}% - \@endpart} -\def\@spart#1{% - {\centering - \interlinepenalty \@M - \normalfont - \Huge \bfseries #1\par}% - \@endpart} -\def\@endpart{\vfil\newpage - \if@twoside - \null - \thispagestyle{empty}% - \newpage - \fi - \if@tempswa - \twocolumn - \fi} - -\newcommand\chapter{\clearpage - \thispagestyle{empty}% - \global\@topnum\z@ - \@afterindentfalse - \secdef\@chapter\@schapter} -\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}#1}% - \else - \addcontentsline{toc}{chapter}{#1}% - \fi - \else - \addcontentsline{toc}{chapter}{#1}% - \fi - \chaptermark{#1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \if@twocolumn - \@topnewpage[\@makechapterhead{#2}]% - \else - \@makechapterhead{#2}% - \@afterheading - \fi} -\def\@makechapterhead#1{% -% \vspace*{50\p@}% - {\centering - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \large\bfseries \@chapapp{} \thechapter - \par\nobreak - \vskip 20\p@ - \fi - \fi - \interlinepenalty\@M - \Large \bfseries #1\par\nobreak - \vskip 40\p@ - }} -\def\@schapter#1{\if@twocolumn - \@topnewpage[\@makeschapterhead{#1}]% - \else - \@makeschapterhead{#1}% - \@afterheading - \fi} -\def\@makeschapterhead#1{% -% \vspace*{50\p@}% - {\centering - \normalfont - \interlinepenalty\@M - \Large \bfseries #1\par\nobreak - \vskip 40\p@ - }} - -\renewcommand\section{\@startsection{section}{1}{\z@}% - {-18\p@ \@plus -4\p@ \@minus -4\p@}% - {12\p@ \@plus 4\p@ \@minus 4\p@}% - {\normalfont\large\bfseries\boldmath - \rightskip=\z@ \@plus 8em\pretolerance=10000 }} -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-18\p@ \@plus -4\p@ \@minus -4\p@}% - {8\p@ \@plus 4\p@ \@minus 4\p@}% - {\normalfont\normalsize\bfseries\boldmath - \rightskip=\z@ \@plus 8em\pretolerance=10000 }} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-18\p@ \@plus -4\p@ \@minus -4\p@}% - {-0.5em \@plus -0.22em \@minus -0.1em}% - {\normalfont\normalsize\bfseries\boldmath}} -\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% - {-12\p@ \@plus -4\p@ \@minus -4\p@}% - {-0.5em \@plus -0.22em \@minus -0.1em}% - {\normalfont\normalsize\itshape}} -\renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not use - \string\subparagraph\space with this class}\vskip0.5cm -You should not use \verb|\subparagraph| with this class.\vskip0.5cm} - -\DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00} -\DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01} -\DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02} -\DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03} -\DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04} -\DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05} -\DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06} -\DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07} -\DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08} -\DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09} -\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A} - -\let\footnotesize\small - -\if@custvec -\DeclareRobustCommand\vec[1]{\mathchoice{\mbox{\boldmath$\displaystyle#1$}} -{\mbox{\boldmath$\textstyle#1$}} -{\mbox{\boldmath$\scriptstyle#1$}} -{\mbox{\boldmath$\scriptscriptstyle#1$}}} -\fi - -\def\squareforqed{\hbox{\rlap{$\sqcap$}$\sqcup$}} -\def\qed{\ifmmode\squareforqed\else{\unskip\nobreak\hfil -\penalty50\hskip1em\null\nobreak\hfil\squareforqed -\parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi} - -\def\getsto{\mathrel{\mathchoice {\vcenter{\offinterlineskip -\halign{\hfil -$\displaystyle##$\hfil\cr\gets\cr\to\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr\gets -\cr\to\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr\gets -\cr\to\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr -\gets\cr\to\cr}}}}} -\def\lid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil -$\displaystyle##$\hfil\cr<\cr\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr<\cr -\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr<\cr -\noalign{\vskip1pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr -<\cr -\noalign{\vskip0.9pt}=\cr}}}}} -\def\gid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil -$\displaystyle##$\hfil\cr>\cr\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr>\cr -\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr>\cr -\noalign{\vskip1pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr ->\cr -\noalign{\vskip0.9pt}=\cr}}}}} -\def\grole{\mathrel{\mathchoice {\vcenter{\offinterlineskip -\halign{\hfil -$\displaystyle##$\hfil\cr>\cr\noalign{\vskip-1pt}<\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr ->\cr\noalign{\vskip-1pt}<\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr ->\cr\noalign{\vskip-0.8pt}<\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr ->\cr\noalign{\vskip-0.3pt}<\cr}}}}} -\def\bbbr{{\rm I\!R}} %reelle Zahlen -\def\bbbm{{\rm I\!M}} -\def\bbbn{{\rm I\!N}} %natuerliche Zahlen -\def\bbbf{{\rm I\!F}} -\def\bbbh{{\rm I\!H}} -\def\bbbk{{\rm I\!K}} -\def\bbbp{{\rm I\!P}} -\def\bbbone{{\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} -{\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}} -\def\bbbc{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}}} -\def\bbbq{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm -Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle\rm Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle\rm Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}}}} -\def\bbbt{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm -T$}\hbox{\hbox to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle\rm T$}\hbox{\hbox -to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle\rm T$}\hbox{\hbox -to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm T$}\hbox{\hbox -to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}}} -\def\bbbs{{\mathchoice -{\setbox0=\hbox{$\displaystyle \rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox -to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle \rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox -to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle \rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox -to0pt{\kern0.5\wd0\vrule height0.45\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.4\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox -to0pt{\kern0.55\wd0\vrule height0.45\ht0\hss}\box0}}}} -\def\bbbz{{\mathchoice {\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}} -{\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}} -{\hbox{$\mathsf\scriptstyle Z\kern-0.3em Z$}} -{\hbox{$\mathsf\scriptscriptstyle Z\kern-0.2em Z$}}}} - -\let\ts\, - -\setlength\leftmargini {17\p@} -\setlength\leftmargin {\leftmargini} -\setlength\leftmarginii {\leftmargini} -\setlength\leftmarginiii {\leftmargini} -\setlength\leftmarginiv {\leftmargini} -\setlength \labelsep {.5em} -\setlength \labelwidth{\leftmargini} -\addtolength\labelwidth{-\labelsep} - -\def\@listI{\leftmargin\leftmargini - \parsep 0\p@ \@plus1\p@ \@minus\p@ - \topsep 8\p@ \@plus2\p@ \@minus4\p@ - \itemsep0\p@} -\let\@listi\@listI -\@listi -\def\@listii {\leftmargin\leftmarginii - \labelwidth\leftmarginii - \advance\labelwidth-\labelsep - \topsep 0\p@ \@plus2\p@ \@minus\p@} -\def\@listiii{\leftmargin\leftmarginiii - \labelwidth\leftmarginiii - \advance\labelwidth-\labelsep - \topsep 0\p@ \@plus\p@\@minus\p@ - \parsep \z@ - \partopsep \p@ \@plus\z@ \@minus\p@} - -\renewcommand\labelitemi{\normalfont\bfseries --} -\renewcommand\labelitemii{$\m@th\bullet$} - -\setlength\arraycolsep{1.4\p@} -\setlength\tabcolsep{1.4\p@} - -\def\tableofcontents{\chapter*{\contentsname\@mkboth{{\contentsname}}% - {{\contentsname}}} - \def\authcount##1{\setcounter{auco}{##1}\setcounter{@auth}{1}} - \def\lastand{\ifnum\value{auco}=2\relax - \unskip{} \andname\ - \else - \unskip \lastandname\ - \fi}% - \def\and{\stepcounter{@auth}\relax - \ifnum\value{@auth}=\value{auco}% - \lastand - \else - \unskip, - \fi}% - \@starttoc{toc}\if@restonecol\twocolumn\fi} - -\def\l@part#1#2{\addpenalty{\@secpenalty}% - \addvspace{2em plus\p@}% % space above part line - \begingroup - \parindent \z@ - \rightskip \z@ plus 5em - \hrule\vskip5pt - \large % same size as for a contribution heading - \bfseries\boldmath % set line in boldface - \leavevmode % TeX command to enter horizontal mode. - #1\par - \vskip5pt - \hrule - \vskip1pt - \nobreak % Never break after part entry - \endgroup} - -\def\@dotsep{2} - -\let\phantomsection=\relax - -\def\hyperhrefextend{\ifx\hyper@anchor\@undefined\else -{}\fi} - -\def\addnumcontentsmark#1#2#3{% -\addtocontents{#1}{\protect\contentsline{#2}{\protect\numberline - {\thechapter}#3}{\thepage}\hyperhrefextend}}% -\def\addcontentsmark#1#2#3{% -\addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}\hyperhrefextend}}% -\def\addcontentsmarkwop#1#2#3{% -\addtocontents{#1}{\protect\contentsline{#2}{#3}{0}\hyperhrefextend}}% - -\def\@adcmk[#1]{\ifcase #1 \or -\def\@gtempa{\addnumcontentsmark}% - \or \def\@gtempa{\addcontentsmark}% - \or \def\@gtempa{\addcontentsmarkwop}% - \fi\@gtempa{toc}{chapter}% -} -\def\addtocmark{% -\phantomsection -\@ifnextchar[{\@adcmk}{\@adcmk[3]}% -} - -\def\l@chapter#1#2{\addpenalty{-\@highpenalty} - \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup - \parindent \z@ \rightskip \@tocrmarg - \advance\rightskip by 0pt plus 2cm - \parfillskip -\rightskip \pretolerance=10000 - \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip - {\large\bfseries\boldmath#1}\ifx0#2\hfil\null - \else - \nobreak - \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern - \@dotsep mu$}\hfill - \nobreak\hbox to\@pnumwidth{\hss #2}% - \fi\par - \penalty\@highpenalty \endgroup} - -\def\l@title#1#2{\addpenalty{-\@highpenalty} - \addvspace{8pt plus 1pt} - \@tempdima \z@ - \begingroup - \parindent \z@ \rightskip \@tocrmarg - \advance\rightskip by 0pt plus 2cm - \parfillskip -\rightskip \pretolerance=10000 - \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip - #1\nobreak - \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern - \@dotsep mu$}\hfill - \nobreak\hbox to\@pnumwidth{\hss #2}\par - \penalty\@highpenalty \endgroup} - -\def\l@author#1#2{\addpenalty{\@highpenalty} - \@tempdima=15\p@ %\z@ - \begingroup - \parindent \z@ \rightskip \@tocrmarg - \advance\rightskip by 0pt plus 2cm - \pretolerance=10000 - \leavevmode \advance\leftskip\@tempdima %\hskip -\leftskip - \textit{#1}\par - \penalty\@highpenalty \endgroup} - -\setcounter{tocdepth}{0} -\newdimen\tocchpnum -\newdimen\tocsecnum -\newdimen\tocsectotal -\newdimen\tocsubsecnum -\newdimen\tocsubsectotal -\newdimen\tocsubsubsecnum -\newdimen\tocsubsubsectotal -\newdimen\tocparanum -\newdimen\tocparatotal -\newdimen\tocsubparanum -\tocchpnum=\z@ % no chapter numbers -\tocsecnum=15\p@ % section 88. plus 2.222pt -\tocsubsecnum=23\p@ % subsection 88.8 plus 2.222pt -\tocsubsubsecnum=27\p@ % subsubsection 88.8.8 plus 1.444pt -\tocparanum=35\p@ % paragraph 88.8.8.8 plus 1.666pt -\tocsubparanum=43\p@ % subparagraph 88.8.8.8.8 plus 1.888pt -\def\calctocindent{% -\tocsectotal=\tocchpnum -\advance\tocsectotal by\tocsecnum -\tocsubsectotal=\tocsectotal -\advance\tocsubsectotal by\tocsubsecnum -\tocsubsubsectotal=\tocsubsectotal -\advance\tocsubsubsectotal by\tocsubsubsecnum -\tocparatotal=\tocsubsubsectotal -\advance\tocparatotal by\tocparanum} -\calctocindent - -\def\l@section{\@dottedtocline{1}{\tocchpnum}{\tocsecnum}} -\def\l@subsection{\@dottedtocline{2}{\tocsectotal}{\tocsubsecnum}} -\def\l@subsubsection{\@dottedtocline{3}{\tocsubsectotal}{\tocsubsubsecnum}} -\def\l@paragraph{\@dottedtocline{4}{\tocsubsubsectotal}{\tocparanum}} -\def\l@subparagraph{\@dottedtocline{5}{\tocparatotal}{\tocsubparanum}} - -\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn - \fi\section*{\listfigurename\@mkboth{{\listfigurename}}{{\listfigurename}}} - \@starttoc{lof}\if@restonecol\twocolumn\fi} -\def\l@figure{\@dottedtocline{1}{0em}{1.5em}} - -\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn - \fi\section*{\listtablename\@mkboth{{\listtablename}}{{\listtablename}}} - \@starttoc{lot}\if@restonecol\twocolumn\fi} -\let\l@table\l@figure - -\renewcommand\listoffigures{% - \section*{\listfigurename - \@mkboth{\listfigurename}{\listfigurename}}% - \@starttoc{lof}% - } - -\renewcommand\listoftables{% - \section*{\listtablename - \@mkboth{\listtablename}{\listtablename}}% - \@starttoc{lot}% - } - -\ifx\oribibl\undefined -\ifx\citeauthoryear\undefined -\renewenvironment{thebibliography}[1] - {\section*{\refname} - \def\@biblabel##1{##1.} - \small - \list{\@biblabel{\@arabic\c@enumiv}}% - {\settowidth\labelwidth{\@biblabel{#1}}% - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \if@openbib - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \fi - \usecounter{enumiv}% - \let\p@enumiv\@empty - \renewcommand\theenumiv{\@arabic\c@enumiv}}% - \if@openbib - \renewcommand\newblock{\par}% - \else - \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}% - \fi - \sloppy\clubpenalty4000\widowpenalty4000% - \sfcode`\.=\@m} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \endlist} -\def\@lbibitem[#1]#2{\item[{[#1]}\hfill]\if@filesw - {\let\protect\noexpand\immediate - \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} -\newcount\@tempcntc -\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi - \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do - {\@ifundefined - {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bfseries - ?}\@warning - {Citation `\@citeb' on page \thepage \space undefined}}% - {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}% - \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne - \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}% - \else - \advance\@tempcntb\@ne - \ifnum\@tempcntb=\@tempcntc - \else\advance\@tempcntb\m@ne\@citeo - \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}} -\def\@citeo{\ifnum\@tempcnta>\@tempcntb\else - \@citea\def\@citea{,\,\hskip\z@skip}% - \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else - {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else - \def\@citea{--}\fi - \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi} -\else -\renewenvironment{thebibliography}[1] - {\section*{\refname} - \small - \list{}% - {\settowidth\labelwidth{}% - \leftmargin\parindent - \itemindent=-\parindent - \labelsep=\z@ - \if@openbib - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \fi - \usecounter{enumiv}% - \let\p@enumiv\@empty - \renewcommand\theenumiv{}}% - \if@openbib - \renewcommand\newblock{\par}% - \else - \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}% - \fi - \sloppy\clubpenalty4000\widowpenalty4000% - \sfcode`\.=\@m} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \endlist} - \def\@cite#1{#1}% - \def\@lbibitem[#1]#2{\item[]\if@filesw - {\def\protect##1{\string ##1\space}\immediate - \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} - \fi -\else -\@cons\@openbib@code{\noexpand\small} -\fi - -\def\idxquad{\hskip 10\p@}% space that divides entry from number - -\def\@idxitem{\par\hangindent 10\p@} - -\def\subitem{\par\setbox0=\hbox{--\enspace}% second order - \noindent\hangindent\wd0\box0}% index entry - -\def\subsubitem{\par\setbox0=\hbox{--\,--\enspace}% third - \noindent\hangindent\wd0\box0}% order index entry - -\def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax} - -\renewenvironment{theindex} - {\@mkboth{\indexname}{\indexname}% - \thispagestyle{empty}\parindent\z@ - \parskip\z@ \@plus .3\p@\relax - \let\item\par - \def\,{\relax\ifmmode\mskip\thinmuskip - \else\hskip0.2em\ignorespaces\fi}% - \normalfont\small - \begin{multicols}{2}[\@makeschapterhead{\indexname}]% - } - {\end{multicols}} - -\renewcommand\footnoterule{% - \kern-3\p@ - \hrule\@width 2truecm - \kern2.6\p@} - \newdimen\fnindent - \fnindent1em -\long\def\@makefntext#1{% - \parindent \fnindent% - \leftskip \fnindent% - \noindent - \llap{\hb@xt@1em{\hss\@makefnmark\ }}\ignorespaces#1} - -\long\def\@makecaption#1#2{% - \small - \vskip\abovecaptionskip - \sbox\@tempboxa{{\bfseries #1.} #2}% - \ifdim \wd\@tempboxa >\hsize - {\bfseries #1.} #2\par - \else - \global \@minipagefalse - \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% - \fi - \vskip\belowcaptionskip} - -\def\fps@figure{htbp} -\def\fnum@figure{\figurename\thinspace\thefigure} -\def \@floatboxreset {% - \reset@font - \small - \@setnobreak - \@setminipage -} -\def\fps@table{htbp} -\def\fnum@table{\tablename~\thetable} -\renewenvironment{table} - {\setlength\abovecaptionskip{0\p@}% - \setlength\belowcaptionskip{10\p@}% - \@float{table}} - {\end@float} -\renewenvironment{table*} - {\setlength\abovecaptionskip{0\p@}% - \setlength\belowcaptionskip{10\p@}% - \@dblfloat{table}} - {\end@dblfloat} - -\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname - ext@#1\endcsname}{#1}{\protect\numberline{\csname - the#1\endcsname}{\ignorespaces #2}}\begingroup - \@parboxrestore - \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par - \endgroup} - -% LaTeX does not provide a command to enter the authors institute -% addresses. The \institute command is defined here. - -\newcounter{@inst} -\newcounter{@auth} -\newcounter{auco} -\newdimen\instindent -\newbox\authrun -\newtoks\authorrunning -\newtoks\tocauthor -\newbox\titrun -\newtoks\titlerunning -\newtoks\toctitle - -\def\clearheadinfo{\gdef\@author{No Author Given}% - \gdef\@title{No Title Given}% - \gdef\@subtitle{}% - \gdef\@institute{No Institute Given}% - \gdef\@thanks{}% - \global\titlerunning={}\global\authorrunning={}% - \global\toctitle={}\global\tocauthor={}} - -\def\institute#1{\gdef\@institute{#1}} - -\def\institutename{\par - \begingroup - \parskip=\z@ - \parindent=\z@ - \setcounter{@inst}{1}% - \def\and{\par\stepcounter{@inst}% - \noindent$^{\the@inst}$\enspace\ignorespaces}% - \setbox0=\vbox{\def\thanks##1{}\@institute}% - \ifnum\c@@inst=1\relax - \gdef\fnnstart{0}% - \else - \xdef\fnnstart{\c@@inst}% - \setcounter{@inst}{1}% - \noindent$^{\the@inst}$\enspace - \fi - \ignorespaces - \@institute\par - \endgroup} - -\def\@fnsymbol#1{\ensuremath{\ifcase#1\or\star\or{\star\star}\or - {\star\star\star}\or \dagger\or \ddagger\or - \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger - \or \ddagger\ddagger \else\@ctrerr\fi}} - -\def\inst#1{\unskip$^{#1}$} -\def\orcidID#1{\unskip$^{[#1]}$} % added MR 2018-03-10 -\def\fnmsep{\unskip$^,$} -\def\email#1{{\tt#1}} - -\AtBeginDocument{\@ifundefined{url}{\def\url#1{#1}}{}% -\@ifpackageloaded{babel}{% -\@ifundefined{extrasenglish}{}{\addto\extrasenglish{\switcht@albion}}% -\@ifundefined{extrasfrenchb}{}{\addto\extrasfrenchb{\switcht@francais}}% -\@ifundefined{extrasgerman}{}{\addto\extrasgerman{\switcht@deutsch}}% -\@ifundefined{extrasngerman}{}{\addto\extrasngerman{\switcht@deutsch}}% -}{\switcht@@therlang}% -\providecommand{\keywords}[1]{\def\and{{\textperiodcentered} }% -\par\addvspace\baselineskip -\noindent\keywordname\enspace\ignorespaces#1}% -\@ifpackageloaded{hyperref}{% -\def\doi#1{\href{https://doi.org/\detokenize{#1}}{\url{https://doi.org/#1}}}}{ -\def\doi#1{https://doi.org/\detokenize{#1}}} -} -\def\homedir{\~{ }} - -\def\subtitle#1{\gdef\@subtitle{#1}} -\clearheadinfo -% -%%% to avoid hyperref warnings -\providecommand*{\toclevel@author}{999} -%%% to make title-entry parent of section-entries -\providecommand*{\toclevel@title}{0} -% -\renewcommand\maketitle{\newpage -\phantomsection - \refstepcounter{chapter}% - \stepcounter{section}% - \setcounter{section}{0}% - \setcounter{subsection}{0}% - \setcounter{figure}{0} - \setcounter{table}{0} - \setcounter{equation}{0} - \setcounter{footnote}{0}% - \begingroup - \parindent=\z@ - \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \if@twocolumn - \ifnum \col@number=\@ne - \@maketitle - \else - \twocolumn[\@maketitle]% - \fi - \else - \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. - \@maketitle - \fi - \thispagestyle{empty}\@thanks -% - \def\\{\unskip\ \ignorespaces}\def\inst##1{\unskip{}}% - \def\thanks##1{\unskip{}}\def\fnmsep{\unskip}% - \instindent=\hsize - \advance\instindent by-\headlineindent - \if!\the\toctitle!\addcontentsline{toc}{title}{\@title}\else - \addcontentsline{toc}{title}{\the\toctitle}\fi - \if@runhead - \if!\the\titlerunning!\else - \edef\@title{\the\titlerunning}% - \fi - \global\setbox\titrun=\hbox{\small\rm\unboldmath\ignorespaces\@title}% - \ifdim\wd\titrun>\instindent - \typeout{Title too long for running head. Please supply}% - \typeout{a shorter form with \string\titlerunning\space prior to - \string\maketitle}% - \global\setbox\titrun=\hbox{\small\rm - Title Suppressed Due to Excessive Length}% - \fi - \xdef\@title{\copy\titrun}% - \fi -% - \if!\the\tocauthor!\relax - {\def\and{\noexpand\protect\noexpand\and}% - \def\inst##1{}% added MR 2017-09-20 to remove inst numbers from the TOC - \def\orcidID##1{}% added MR 2017-09-20 to remove ORCID ids from the TOC - \protected@xdef\toc@uthor{\@author}}% - \else - \def\\{\noexpand\protect\noexpand\newline}% - \protected@xdef\scratch{\the\tocauthor}% - \protected@xdef\toc@uthor{\scratch}% - \fi - \addtocontents{toc}{\noexpand\protect\noexpand\authcount{\the\c@auco}}% - \addcontentsline{toc}{author}{\toc@uthor}% - \if@runhead - \if!\the\authorrunning! - \value{@inst}=\value{@auth}% - \setcounter{@auth}{1}% - \else - \edef\@author{\the\authorrunning}% - \fi - \global\setbox\authrun=\hbox{\def\inst##1{}% added MR 2017-09-20 to remove inst numbers from the runninghead - \def\orcidID##1{}% added MR 2017-09-20 to remove ORCID ids from the runninghead - \small\unboldmath\@author\unskip}% - \ifdim\wd\authrun>\instindent - \typeout{Names of authors too long for running head. Please supply}% - \typeout{a shorter form with \string\authorrunning\space prior to - \string\maketitle}% - \global\setbox\authrun=\hbox{\small\rm - Authors Suppressed Due to Excessive Length}% - \fi - \xdef\@author{\copy\authrun}% - \markboth{\@author}{\@title}% - \fi - \endgroup - \setcounter{footnote}{\fnnstart}% - \clearheadinfo} -% -\def\@maketitle{\newpage - \markboth{}{}% - \def\lastand{\ifnum\value{@inst}=2\relax - \unskip{} \andname\ - \else - \unskip \lastandname\ - \fi}% - \def\and{\stepcounter{@auth}\relax - \ifnum\value{@auth}=\value{@inst}% - \lastand - \else - \unskip, - \fi}% - \begin{center}% - \let\newline\\ - {\Large \bfseries\boldmath - \pretolerance=10000 - \@title \par}\vskip .8cm -\if!\@subtitle!\else {\large \bfseries\boldmath - \vskip -.65cm - \pretolerance=10000 - \@subtitle \par}\vskip .8cm\fi - \setbox0=\vbox{\setcounter{@auth}{1}\def\and{\stepcounter{@auth}}% - \def\thanks##1{}\@author}% - \global\value{@inst}=\value{@auth}% - \global\value{auco}=\value{@auth}% - \setcounter{@auth}{1}% -{\lineskip .5em -\noindent\ignorespaces -\@author\vskip.35cm} - {\small\institutename} - \end{center}% - } - -% definition of the "\spnewtheorem" command. -% -% Usage: -% -% \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font} -% or \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font} -% or \spnewtheorem*{env_nam}{caption}{cap_font}{body_font} -% -% New is "cap_font" and "body_font". It stands for -% fontdefinition of the caption and the text itself. -% -% "\spnewtheorem*" gives a theorem without number. -% -% A defined spnewthoerem environment is used as described -% by Lamport. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\edef\@thmcountersep{} -\edef\@thmcounterend{.} - -\def\spnewtheorem{\@ifstar{\@sthm}{\@Sthm}} - -% definition of \spnewtheorem with number - -\def\@spnthm#1#2{\@ifnextchar[{\@spxnthm{#1}{#2}}{\@spynthm{#1}{#2}}} -\def\@Sthm#1{\@ifnextchar[{\@spothm{#1}}{\@spnthm{#1}}} - -% theorem-like environment with standard counter -\def\@spynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname - {\@definecounter{#1}% - \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}% - \expandafter\xdef\csname #1name\endcsname{#2}% - \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#3}{#4}}% - \global\@namedef{end#1}{\@endtheorem}}} - -% theorem-like environment with section-wise counter (envcountsect) -\def\@spxnthm#1#2[#3]#4#5{\expandafter\@ifdefinable\csname #1\endcsname - {\@definecounter{#1}\@addtoreset{#1}{#3}% - \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand - \csname the#3\endcsname \noexpand\@thmcountersep \@thmcounter{#1}}% - \expandafter\xdef\csname #1name\endcsname{#2}% - \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}% - \global\@namedef{end#1}{\@endtheorem}}} - -% theorem-like environment with shared counter (envcountsame) -\def\@spothm#1[#2]#3#4#5{% - \@ifundefined{c@#2}{\@latexerr{No theorem environment `#2' defined}\@eha}% - {\expandafter\@ifdefinable\csname #1\endcsname - {\newaliascnt{#1}{#2}% - \expandafter\xdef\csname #1name\endcsname{#3}% - \if@envcntsect - % the following line, introduced in v2.24, fixes incorrect hypertexnames - % when envcountsect is used in combination with envcountsame - \@addtoreset{#1}{section} - \fi - \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}% - \global\@namedef{end#1}{\@endtheorem}}}} - - - -\def\@spthm#1#2#3#4{\topsep 7\p@ \@plus2\p@ \@minus4\p@ -\refstepcounter{#1}% -\@ifnextchar[{\@spythm{#1}{#2}{#3}{#4}}{\@spxthm{#1}{#2}{#3}{#4}}} - -\def\@spxthm#1#2#3#4{\@spbegintheorem{#2}{\csname the#1\endcsname}{#3}{#4}% - \ignorespaces} - -\def\@spythm#1#2#3#4[#5]{\@spopargbegintheorem{#2}{\csname - the#1\endcsname}{#5}{#3}{#4}\ignorespaces} - -\def\@spbegintheorem#1#2#3#4{\trivlist - \item[\hskip\labelsep{#3#1\ #2\@thmcounterend}]#4} - -\def\@spopargbegintheorem#1#2#3#4#5{\trivlist - \item[\hskip\labelsep{#4#1\ #2}]{#4(#3)\@thmcounterend\ }#5} - -% definition of \spnewtheorem* without number - -\def\@sthm#1#2{\@Ynthm{#1}{#2}} - -\def\@Ynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname - {\global\@namedef{#1}{\@Thm{\csname #1name\endcsname}{#3}{#4}}% - \expandafter\xdef\csname #1name\endcsname{#2}% - \global\@namedef{end#1}{\@endtheorem}}} - -\def\@Thm#1#2#3{\topsep 7\p@ \@plus2\p@ \@minus4\p@ -\@ifnextchar[{\@Ythm{#1}{#2}{#3}}{\@Xthm{#1}{#2}{#3}}} - -\def\@Xthm#1#2#3{\@Begintheorem{#1}{#2}{#3}\ignorespaces} - -\def\@Ythm#1#2#3[#4]{\@Opargbegintheorem{#1} - {#4}{#2}{#3}\ignorespaces} - -\def\@Begintheorem#1#2#3{#3\trivlist - \item[\hskip\labelsep{#2#1\@thmcounterend}]} - -\def\@Opargbegintheorem#1#2#3#4{#4\trivlist - \item[\hskip\labelsep{#3#1}]{#3(#2)\@thmcounterend\ }} - -\if@envcntsect - \def\@thmcountersep{.} - \spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape} -\else - \spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape} - \if@envcntreset - \@addtoreset{theorem}{section} - \else - \@addtoreset{theorem}{chapter} - \fi -\fi - -%definition of various theorem environments -\spnewtheorem*{claim}{Claim}{\itshape}{\rmfamily} -\spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily} -\if@envcntsame % alle Umgebungen wie Theorem. - \def\spn@wtheorem#1#2#3#4{\@spothm{#1}[theorem]{#2}{#3}{#4}} -\else % alle Umgebungen mit eigenem Zaehler - \if@envcntsect % mit section numeriert - \def\spn@wtheorem#1#2#3#4{\@spxnthm{#1}{#2}[section]{#3}{#4}} - \else % nicht mit section numeriert - \if@envcntreset - \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4} - \@addtoreset{#1}{section}} - \else - \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4} - \@addtoreset{#1}{chapter}}% - \fi - \fi -\fi -\spn@wtheorem{case}{Case}{\itshape}{\rmfamily} -\spn@wtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily} -\spn@wtheorem{corollary}{Corollary}{\bfseries}{\itshape} -\spn@wtheorem{definition}{Definition}{\bfseries}{\itshape} -\spn@wtheorem{example}{Example}{\itshape}{\rmfamily} -\spn@wtheorem{exercise}{Exercise}{\itshape}{\rmfamily} -\spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape} -\spn@wtheorem{note}{Note}{\itshape}{\rmfamily} -\spn@wtheorem{problem}{Problem}{\itshape}{\rmfamily} -\spn@wtheorem{property}{Property}{\itshape}{\rmfamily} -\spn@wtheorem{proposition}{Proposition}{\bfseries}{\itshape} -\spn@wtheorem{question}{Question}{\itshape}{\rmfamily} -\spn@wtheorem{solution}{Solution}{\itshape}{\rmfamily} -\spn@wtheorem{remark}{Remark}{\itshape}{\rmfamily} - -\def\@takefromreset#1#2{% - \def\@tempa{#1}% - \let\@tempd\@elt - \def\@elt##1{% - \def\@tempb{##1}% - \ifx\@tempa\@tempb\else - \@addtoreset{##1}{#2}% - \fi}% - \expandafter\expandafter\let\expandafter\@tempc\csname cl@#2\endcsname - \expandafter\def\csname cl@#2\endcsname{}% - \@tempc - \let\@elt\@tempd} - -\def\theopargself{\def\@spopargbegintheorem##1##2##3##4##5{\trivlist - \item[\hskip\labelsep{##4##1\ ##2}]{##4##3\@thmcounterend\ }##5} - \def\@Opargbegintheorem##1##2##3##4{##4\trivlist - \item[\hskip\labelsep{##3##1}]{##3##2\@thmcounterend\ }} - } - -\renewenvironment{abstract}{% - \list{}{\advance\topsep by0.35cm\relax\small - \leftmargin=1cm - \labelwidth=\z@ - \listparindent=\z@ - \itemindent\listparindent - \rightmargin\leftmargin}\item[\hskip\labelsep - \bfseries\abstractname]} - {\endlist} - -\newdimen\headlineindent % dimension for space between -\headlineindent=1.166cm % number and text of headings. - -\def\ps@headings{\let\@mkboth\@gobbletwo - \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}% - \leftmark\hfil} - \def\@oddhead{\normalfont\small\hfil\rightmark\hspace{\headlineindent}% - \llap{\thepage}} - \def\chaptermark##1{}% - \def\sectionmark##1{}% - \def\subsectionmark##1{}} - -\def\ps@titlepage{\let\@mkboth\@gobbletwo - \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}% - \hfil} - \def\@oddhead{\normalfont\small\hfil\hspace{\headlineindent}% - \llap{\thepage}} - \def\chaptermark##1{}% - \def\sectionmark##1{}% - \def\subsectionmark##1{}} - -\if@runhead\ps@headings\else -\ps@empty\fi - -\setlength\arraycolsep{1.4\p@} -\setlength\tabcolsep{1.4\p@} - -\endinput -%end of file llncs.cls diff --git a/MICCAI2026-Latex-Template/llncsdoc.pdf b/MICCAI2026-Latex-Template/llncsdoc.pdf deleted file mode 100644 index 58f26008..00000000 Binary files a/MICCAI2026-Latex-Template/llncsdoc.pdf and /dev/null differ diff --git a/MICCAI2026-Latex-Template/main.aux b/MICCAI2026-Latex-Template/main.aux deleted file mode 100644 index 2e2e8756..00000000 --- a/MICCAI2026-Latex-Template/main.aux +++ /dev/null @@ -1,109 +0,0 @@ -\relax -\citation{novikov2019quantifying} -\citation{chen2024deep,he2022model,chen2020generalization,de2018age,dibaji2024sex} -\citation{egle2022prediction,wen2021reproducible} -\citation{kotikalapudi2025replicability,menon2020microstructural} -\citation{chen2024deep} -\citation{menon2020microstructural} -\citation{chen2023deep,he2022model} -\@writefile{toc}{\contentsline {title}{ DiffBench: A Reproducible Benchmark in Diffusion MRI Prediction }{1}{}\protected@file@percent } -\@writefile{toc}{\authcount {1}} -\@writefile{toc}{\contentsline {author}{Anonymized Authors}{1}{}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{}\protected@file@percent } -\citation{wu2023challenges,genon2022linking,rosenblatt2024power} -\citation{wen2021reproducible} -\citation{rosenblatt2024power} -\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Overview of the proposed diffusion MRI benchmark pipeline end-to-end.}}{2}{}\protected@file@percent } -\newlabel{fig:benchmark_overview}{{1}{2}{}{figure.1}{}} -\citation{van2013wu} -\citation{shafto2014cambridge} -\citation{di2017enhancing} -\citation{Garyfallidis2014} -\citation{esteban2019fmriprep} -\citation{Smith2004} -\citation{Avants2009} -\citation{Dale1999a} -\citation{Cox1996} -\citation{Veraart2016a,Cordero-Grande2019} -\citation{Veraart2016a} -\citation{Veraart2016b} -\citation{Andersson2016} -\citation{greve2009accurate} -\citation{hwang2021prediction,he2022model,chen2023deep,cardenas2025autism} -\@writefile{toc}{\contentsline {section}{\numberline {2}Benchmark Pipeline}{3}{}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Datasets}{3}{}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}DiffBench Preprocessing}{3}{}\protected@file@percent } -\citation{basser1994mr} -\citation{jensen2005diffusional} -\citation{tournier2004direct} -\citation{pasternak2009free} -\citation{desikan2006automated} -\citation{greve2009accurate} -\citation{smith2006tract} -\citation{mori2008stereotaxic} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Data Preparation}{4}{}\protected@file@percent } -\citation{wen2021reproducible,cardenas2025autism} -\citation{menon2020microstructural} -\citation{oquab2023dinov2} -\citation{dancette2025curia} -\citation{chen2019med3d} -\citation{cardenas2025autism} -\citation{chen2024deep,dibaji2024sex} -\citation{chen2020generalization,de2018age,hwang2021prediction} -\citation{gorgolewski2016brain} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Prediction and validation}{5}{}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {2.5}Benchmark implementation}{5}{}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {3}Results}{5}{}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces \textit {(Left)} Model-family performance normalized across metrics and folds (dummy = 0, perfect = 1) reveals no consistent advantage of any model class. \textit {(Right)} Preprocessing sensitivity across (feature, tissue) configurations demonstrates that performance strongly depends on representation and tissue selection. }}{6}{}\protected@file@percent } -\newlabel{fig:model_family}{{2}{6}{}{figure.2}{}} -\@writefile{toc}{\contentsline {subsubsection}{Impact of tissue type.}{6}{}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Fold-level paired differences ($\Delta = \text {white} - \text {gray}$) were computed under identical settings, after removing microstructural representation baseline effects. Significance was assessed via a nonparametric paired bootstrap test with Benjamini–Hochberg FDR correction across all (dataset, task, model family) combinations ($\alpha $ = 0.05) HCP favors white matter, CamCAN favors gray matter and no visible preference in ABIDE. }}{7}{}\protected@file@percent } -\newlabel{fig:white_vs_gray}{{3}{7}{}{figure.3}{}} -\@writefile{toc}{\contentsline {subsubsection}{Impact of diffusion microstructure features}{7}{}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Proportion of models outperforming the non-diffusion baseline (b0), stratified by task and microstructural feature, based on fold-level normalized differences ($\Delta = \text {microstructure feature} - \text {b0}$). Given the large number of configurations and multiple comparisons, we adopt a robustness-based criterion (median $\Delta \geq 0.05$ and $\geq $80\% positive folds) rather than formal hypothesis testing. Benefits are task-specific rather than universal. }}{8}{}\protected@file@percent } -\newlabel{fig:feature_impact}{{4}{8}{}{figure.4}{}} -\@writefile{toc}{\contentsline {section}{\numberline {4}Conclusion}{8}{}\protected@file@percent } -\bibstyle{splncs04} -\bibdata{references} -\bibcite{Andersson2016}{1} -\bibcite{Avants2009}{2} -\bibcite{basser1994mr}{3} -\bibcite{cardenas2025autism}{4} -\bibcite{chen2020generalization}{5} -\bibcite{chen2023deep}{6} -\bibcite{chen2024deep}{7} -\bibcite{chen2019med3d}{8} -\bibcite{Cordero-Grande2019}{9} -\bibcite{Cox1996}{10} -\bibcite{Dale1999a}{11} -\bibcite{dancette2025curia}{12} -\bibcite{desikan2006automated}{13} -\bibcite{di2017enhancing}{14} -\bibcite{dibaji2024sex}{15} -\bibcite{egle2022prediction}{16} -\bibcite{esteban2019fmriprep}{17} -\bibcite{Garyfallidis2014}{18} -\bibcite{genon2022linking}{19} -\bibcite{gorgolewski2016brain}{20} -\bibcite{greve2009accurate}{21} -\bibcite{he2022model}{22} -\bibcite{hwang2021prediction}{23} -\bibcite{jensen2005diffusional}{24} -\bibcite{kotikalapudi2025replicability}{25} -\bibcite{menon2020microstructural}{26} -\bibcite{de2018age}{27} -\bibcite{mori2008stereotaxic}{28} -\bibcite{novikov2019quantifying}{29} -\bibcite{oquab2023dinov2}{30} -\bibcite{pasternak2009free}{31} -\bibcite{rosenblatt2024power}{32} -\bibcite{shafto2014cambridge}{33} -\bibcite{smith2006tract}{34} -\bibcite{Smith2004}{35} -\bibcite{tournier2004direct}{36} -\bibcite{van2013wu}{37} -\bibcite{Veraart2016b}{38} -\bibcite{Veraart2016a}{39} -\bibcite{wen2021reproducible}{40} -\bibcite{wu2023challenges}{41} -\gdef \@abspage@last{11} diff --git a/MICCAI2026-Latex-Template/main.bbl b/MICCAI2026-Latex-Template/main.bbl deleted file mode 100644 index c5744016..00000000 --- a/MICCAI2026-Latex-Template/main.bbl +++ /dev/null @@ -1,237 +0,0 @@ -\begin{thebibliography}{10} -\providecommand{\url}[1]{\texttt{#1}} -\providecommand{\urlprefix}{URL } -\providecommand{\doi}[1]{https://doi.org/#1} - -\bibitem{Andersson2016} -Andersson, J.L.R., Sotiropoulos, S.N.: An integrated approach to correction for - off-resonance effects and subject movement in diffusion {{MR}} imaging. - NeuroImage \textbf{125}, 1063--1078 (Jan 2016) - -\bibitem{Avants2009} -Avants, B.B., Tustison, N., Johnson, H.: Advanced {{Normalization Tools}} - ({{ANTS}}) \textbf{2}(365), 1--35 (2009) - -\bibitem{basser1994mr} -Basser, P.J., Mattiello, J., LeBihan, D.: Mr diffusion tensor spectroscopy and - imaging. Biophysical journal \textbf{66}(1), 259--267 (1994) - -\bibitem{cardenas2025autism} -Cardenas-Hernandez, N.A., Perez-Diaz, M., Garc{\'\i}a-Ram{\'o}, K.B., - Vald{\'e}s~Hern{\'a}ndez, M.d.C.: Autism spectrum disorder detection using - diffusion tensor imaging and machine learning. PLOS Digital Health - \textbf{4}(12), e0001155 (2025) - -\bibitem{chen2020generalization} -Chen, C.L., Hsu, Y.C., Yang, L.Y., Tung, Y.H., Luo, W.B., Liu, C.M., Hwang, - T.J., Hwu, H.G., Tseng, W.Y.I.: Generalization of diffusion magnetic - resonance imaging--based brain age prediction model through transfer - learning. NeuroImage \textbf{217}, 116831 (2020) - -\bibitem{chen2023deep} -Chen, G., Hong, Y., Huynh, K.M., Yap, P.T.: Deep learning prediction of - diffusion mri data with microstructure-sensitive loss functions. Medical - image analysis \textbf{85}, 102742 (2023) - -\bibitem{chen2024deep} -Chen, J., Bayanagari, V.L., Chung, S., Wang, Y., Lui, Y.W.: Deep learning with - diffusion mri as in vivo microscope reveals sex-related differences in human - white matter microstructure. Scientific reports \textbf{14}(1), ~9835 (2024) - -\bibitem{chen2019med3d} -Chen, S., Ma, K., Zheng, Y.: Med3d: Transfer learning for 3d medical image - analysis. arXiv preprint arXiv:1904.00625 (2019) - -\bibitem{Cordero-Grande2019} -{Cordero-Grande}, L., Christiaens, D., Hutter, J., Price, A.N., Hajnal, J.V.: - Complex diffusion-weighted image estimation via matrix recovery under general - noise models. NeuroImage \textbf{200}, 391--404 (Oct 2019) - -\bibitem{Cox1996} -Cox, R.W.: {{AFNI}}: {{Software}} for {{Analysis}} and {{Visualization}} of - {{Functional Magnetic Resonance Neuroimages}}. Computers and Biomedical - Research \textbf{29}(3), 162--173 (Jun 1996) - -\bibitem{Dale1999a} -Dale, A.M., Fischl, B., Sereno, M.I.: Cortical {{Surface-Based Analysis}}: - {{I}}. {{Segmentation}} and {{Surface Reconstruction}}. NeuroImage - \textbf{9}(2), 179--194 (Feb 1999) - -\bibitem{dancette2025curia} -Dancette, C., Khlaut, J., Saporta, A., Philippe, H., Ferreres, E., Callard, B., - Danielou, T., Alberge, L., Machado, L., Tordjman, D., et~al.: Curia: A - multi-modal foundation model for radiology. arXiv preprint arXiv:2509.06830 - (2025) - -\bibitem{desikan2006automated} -Desikan, R.S., S{\'e}gonne, F., Fischl, B., Quinn, B.T., Dickerson, B.C., - Blacker, D., Buckner, R.L., Dale, A.M., Maguire, R.P., Hyman, B.T., et~al.: - An automated labeling system for subdividing the human cerebral cortex on mri - scans into gyral based regions of interest. Neuroimage \textbf{31}(3), - 968--980 (2006) - -\bibitem{di2017enhancing} -Di~Martino, A., O’connor, D., Chen, B., Alaerts, K., Anderson, J.S., Assaf, - M., Balsters, J.H., Baxter, L., Beggiato, A., Bernaerts, S., et~al.: - Enhancing studies of the connectome in autism using the autism brain imaging - data exchange ii. Scientific data \textbf{4}(1), 1--15 (2017) - -\bibitem{dibaji2024sex} -Dibaji, M., Ospel, J., Souza, R., Bento, M.: Sex differences in brain mri using - deep learning toward fairer healthcare outcomes. Frontiers in Computational - Neuroscience \textbf{18}, 1452457 (2024) - -\bibitem{egle2022prediction} -Egle, M., Hilal, S., Tuladhar, A.M., Pirpamer, L., Hofer, E., Duering, M., - Wason, J., Morris, R.G., Dichgans, M., Schmidt, R., et~al.: Prediction of - dementia using diffusion tensor mri measures: the optimal collaboration. - Journal of Neurology, Neurosurgery \& Psychiatry \textbf{93}(1), 14--23 - (2022) - -\bibitem{esteban2019fmriprep} -Esteban, O., Markiewicz, C.J., Blair, R.W., Moodie, C.A., Isik, A.I., - Erramuzpe, A., Kent, J.D., Goncalves, M., DuPre, E., Snyder, M., et~al.: - fmriprep: a robust preprocessing pipeline for functional mri. Nature methods - \textbf{16}(1), 111--116 (2019) - -\bibitem{Garyfallidis2014} -Garyfallidis, E., Brett, M., Amirbekian, B., Rokem, A., Van Der~Walt, S., - Descoteaux, M., Nimmo-Smith, I.: Dipy, a library for the analysis of - diffusion {MRI} data. Frontiers in Neuroinformatics \textbf{8} (Feb 2014) - -\bibitem{genon2022linking} -Genon, S., Eickhoff, S.B., Kharabian, S.: Linking interindividual variability - in brain structure to behaviour. Nature Reviews Neuroscience \textbf{23}(5), - 307--318 (2022) - -\bibitem{gorgolewski2016brain} -Gorgolewski, K.J., Auer, T., Calhoun, V.D., Craddock, R.C., Das, S., Duff, - E.P., Flandin, G., Ghosh, S.S., Glatard, T., Halchenko, Y.O., et~al.: The - brain imaging data structure, a format for organizing and describing outputs - of neuroimaging experiments. Scientific data \textbf{3}(1), ~1--9 (2016) - -\bibitem{greve2009accurate} -Greve, D.N., Fischl, B.: Accurate and robust brain image alignment using - boundary-based registration. Neuroimage \textbf{48}(1), 63--72 (2009) - -\bibitem{he2022model} -He, H., Zhang, F., Pieper, S., Makris, N., Rathi, Y., Wells, W., O’Donnell, - L.J.: Model and predict age and sex in healthy subjects using brain white - matter features: a deep learning approach. In: 2022 IEEE 19th International - Symposium on Biomedical Imaging (ISBI). pp.~1--5. IEEE (2022) - -\bibitem{hwang2021prediction} -Hwang, I., Yeon, E.K., Lee, J.Y., Yoo, R.E., Kang, K.M., Yun, T.J., Choi, S.H., - Sohn, C.H., Kim, H., Kim, J.h.: Prediction of brain age from routine - t2-weighted spin-echo brain magnetic resonance images with a deep - convolutional neural network. Neurobiology of Aging \textbf{105}, 78--85 - (2021) - -\bibitem{jensen2005diffusional} -Jensen, J.H., Helpern, J.A., Ramani, A., Lu, H., Kaczynski, K.: Diffusional - kurtosis imaging: the quantification of non-gaussian water diffusion by means - of magnetic resonance imaging. Magnetic Resonance in Medicine: An Official - Journal of the International Society for Magnetic Resonance in Medicine - \textbf{53}(6), 1432--1440 (2005) - -\bibitem{kotikalapudi2025replicability} -Kotikalapudi, R., Kincses, B., Gallitto, G., Englert, R., Hofffschlag, K., Li, - J., B{\"u}chel, C., Bingel, U., Spisak, T.: On the replicability of diffusion - weighted mri-based brain-behavior models. Communications Biology - \textbf{8}(1), ~1512 (2025) - -\bibitem{menon2020microstructural} -Menon, V., Gallardo, G., Pinsk, M.A., Nguyen, V.D., Li, J.R., Cai, W., - Wassermann, D.: Microstructural organization of human insula is linked to its - macrofunctional circuitry and predicts cognitive control. elife \textbf{9}, - e53470 (2020) - -\bibitem{de2018age} -de~Mooij, S.M., Henson, R.N., Waldorp, L.J., Kievit, R.A.: Age differentiation - within gray matter, white matter, and between memory and white matter in an - adult life span cohort. Journal of Neuroscience \textbf{38}(25), 5826--5836 - (2018) - -\bibitem{mori2008stereotaxic} -Mori, S., Oishi, K., Jiang, H., Jiang, L., Li, X., Akhter, K., Hua, K., Faria, - A.V., Mahmood, A., Woods, R., et~al.: Stereotaxic white matter atlas based on - diffusion tensor imaging in an icbm template. Neuroimage \textbf{40}(2), - 570--582 (2008) - -\bibitem{novikov2019quantifying} -Novikov, D.S., Fieremans, E., Jespersen, S.N., Kiselev, V.G.: Quantifying brain - microstructure with diffusion mri: Theory and parameter estimation. NMR in - Biomedicine \textbf{32}(4), e3998 (2019) - -\bibitem{oquab2023dinov2} -Oquab, M., Darcet, T., Moutakanni, T., Vo, H., Szafraniec, M., Khalidov, V., - Fernandez, P., Haziza, D., Massa, F., El-Nouby, A., et~al.: Dinov2: Learning - robust visual features without supervision. arXiv preprint arXiv:2304.07193 - (2023) - -\bibitem{pasternak2009free} -Pasternak, O., Sochen, N., Gur, Y., Intrator, N., Assaf, Y.: Free water - elimination and mapping from diffusion mri. Magnetic Resonance in Medicine: - An Official Journal of the International Society for Magnetic Resonance in - Medicine \textbf{62}(3), 717--730 (2009) - -\bibitem{rosenblatt2024power} -Rosenblatt, M., Tejavibulya, L., Sun, H., Camp, C.C., Khaitova, M., Adkinson, - B.D., Jiang, R., Westwater, M.L., Noble, S., Scheinost, D.: Power and - reproducibility in the external validation of brain-phenotype predictions. - Nature Human Behaviour \textbf{8}(10), 2018--2033 (2024) - -\bibitem{shafto2014cambridge} -Shafto, M.A., Tyler, L.K., Dixon, M., Taylor, J.R., Rowe, J.B., Cusack, R., - Calder, A.J., Marslen-Wilson, W.D., Duncan, J., Dalgleish, T., et~al.: The - cambridge centre for ageing and neuroscience (cam-can) study protocol: a - cross-sectional, lifespan, multidisciplinary examination of healthy cognitive - ageing. BMC neurology \textbf{14}(1), ~204 (2014) - -\bibitem{smith2006tract} -Smith, S.M., Jenkinson, M., Johansen-Berg, H., Rueckert, D., Nichols, T.E., - Mackay, C.E., Watkins, K.E., Ciccarelli, O., Cader, M.Z., Matthews, P.M., - et~al.: Tract-based spatial statistics: voxelwise analysis of multi-subject - diffusion data. Neuroimage \textbf{31}(4), 1487--1505 (2006) - -\bibitem{Smith2004} -Smith, S.M., Jenkinson, M., Woolrich, M.W., Beckmann, C.F., Behrens, T.E.J., - {Johansen-Berg}, H., Bannister, P.R., De~Luca, M., Drobnjak, I., Flitney, - D.E., Niazy, R.K., Saunders, J., Vickers, J., Zhang, Y., De~Stefano, N., - Brady, J.M., Matthews, P.M.: Advances in functional and structural {{MR}} - image analysis and implementation as {{FSL}}. NeuroImage \textbf{23}, - S208--S219 (Jan 2004) - -\bibitem{tournier2004direct} -Tournier, J.D., Calamante, F., Gadian, D.G., Connelly, A.: Direct estimation of - the fiber orientation density function from diffusion-weighted mri data using - spherical deconvolution. Neuroimage \textbf{23}(3), 1176--1185 (2004) - -\bibitem{van2013wu} -Van~Essen, D.C., Smith, S.M., Barch, D.M., Behrens, T.E., Yacoub, E., Ugurbil, - K., Consortium, W.M.H., et~al.: The wu-minn human connectome project: an - overview. Neuroimage \textbf{80}, 62--79 (2013) - -\bibitem{Veraart2016b} -Veraart, J., Fieremans, E., Jelescu, I.O., Knoll, F., Novikov, D.S.: Gibbs - ringing in diffusion {{MRI}}. Magnetic Resonance in Medicine \textbf{76}(1), - 301--314 (2016) - -\bibitem{Veraart2016a} -Veraart, J., Novikov, D.S., Christiaens, D., {Ades-aron}, B., Sijbers, J., - Fieremans, E.: Denoising of diffusion {{MRI}} using random matrix theory. - NeuroImage \textbf{142}, 394--406 (Nov 2016) - -\bibitem{wen2021reproducible} -Wen, J., Samper-Gonz{\'a}lez, J., Bottani, S., Routier, A., Burgos, N., - Jacquemont, T., Fontanella, S., Durrleman, S., Epelbaum, S., Bertrand, A., - et~al.: Reproducible evaluation of diffusion mri features for automatic - classification of patients with alzheimer’s disease. Neuroinformatics - \textbf{19}(1), 57--78 (2021) - -\bibitem{wu2023challenges} -Wu, J., Li, J., Eickhoff, S.B., Scheinost, D., Genon, S.: The challenges and - prospects of brain-based prediction of behaviour. Nature Human Behaviour - \textbf{7}(8), 1255--1264 (2023) - -\end{thebibliography} diff --git a/MICCAI2026-Latex-Template/main.blg b/MICCAI2026-Latex-Template/main.blg deleted file mode 100644 index cadd93cb..00000000 --- a/MICCAI2026-Latex-Template/main.blg +++ /dev/null @@ -1,48 +0,0 @@ -This is BibTeX, Version 0.99d (TeX Live 2025) -Capacity: max_strings=200000, hash_size=200000, hash_prime=170003 -The top-level auxiliary file: main.aux -The style file: splncs04.bst -Database file #1: references.bib -Warning--empty journal in Avants2009 -You've used 41 entries, - 2850 wiz_defined-function locations, - 855 strings with 15829 characters, -and the built_in function-call counts, 32271 in all, are: -= -- 2520 -> -- 1507 -< -- 74 -+ -- 617 -- -- 570 -* -- 2326 -:= -- 4100 -add.period$ -- 42 -call.type$ -- 41 -change.case$ -- 398 -chr.to.int$ -- 0 -cite$ -- 42 -duplicate$ -- 2672 -empty$ -- 2402 -format.name$ -- 610 -if$ -- 6826 -int.to.chr$ -- 0 -int.to.str$ -- 41 -missing$ -- 605 -newline$ -- 129 -num.names$ -- 82 -pop$ -- 1031 -preamble$ -- 1 -purify$ -- 355 -quote$ -- 0 -skip$ -- 828 -stack$ -- 0 -substring$ -- 1712 -swap$ -- 1823 -text.length$ -- 74 -text.prefix$ -- 0 -top$ -- 0 -type$ -- 164 -warning$ -- 1 -while$ -- 224 -width$ -- 43 -write$ -- 411 -(There was 1 warning) diff --git a/MICCAI2026-Latex-Template/main.log b/MICCAI2026-Latex-Template/main.log deleted file mode 100644 index a2e61174..00000000 --- a/MICCAI2026-Latex-Template/main.log +++ /dev/null @@ -1,387 +0,0 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2026.2.18) 26 FEB 2026 15:04 -entering extended mode - restricted \write18 enabled. - file:line:error style messages enabled. - %&-line parsing enabled. -**/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/main -(/data/parietal/store3/work/ggomezji/projects/diff_benchmark/MICCAI2026-Latex-Template/main.tex -LaTeX2e <2025-11-01> -L3 programming layer <2026-01-19> -(./llncs.cls -Document Class: llncs 2024/01/29 v2.24 - LaTeX document class for Lecture Notes in Computer Science -(/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/article.cls -Document Class: article 2025/01/22 v1.4n Standard LaTeX document class -(/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/size10.clo -File: size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) -) -\c@part=\count275 -\c@section=\count276 -\c@subsection=\count277 -\c@subsubsection=\count278 -\c@paragraph=\count279 -\c@subparagraph=\count280 -\c@figure=\count281 -\c@table=\count282 -\abovecaptionskip=\skip49 -\belowcaptionskip=\skip50 -\bibindent=\dimen148 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/tools/multicol.sty -Package: multicol 2025/10/21 v2.0b multicolumn formatting (FMi) -\c@tracingmulticols=\count283 -\mult@box=\box53 -\multicol@leftmargin=\dimen149 -\c@unbalance=\count284 -\c@collectmore=\count285 -\doublecol@number=\count286 -\multicoltolerance=\count287 -\multicolpretolerance=\count288 -\full@width=\dimen150 -\page@free=\dimen151 -\premulticols=\dimen152 -\postmulticols=\dimen153 -\multicolsep=\skip51 -\multicolbaselineskip=\skip52 -\partial@page=\box54 -\last@line=\box55 -\mc@boxedresult=\box56 -\maxbalancingoverflow=\dimen154 -\mult@rightbox=\box57 -\mult@grightbox=\box58 -\mult@firstbox=\box59 -\mult@gfirstbox=\box60 -\@tempa=\box61 -\@tempa=\box62 -\@tempa=\box63 -\@tempa=\box64 -\@tempa=\box65 -\@tempa=\box66 -\@tempa=\box67 -\@tempa=\box68 -\@tempa=\box69 -\@tempa=\box70 -\@tempa=\box71 -\@tempa=\box72 -\@tempa=\box73 -\@tempa=\box74 -\@tempa=\box75 -\@tempa=\box76 -\@tempa=\box77 -\@tempa=\box78 -\@tempa=\box79 -\@tempa=\box80 -\@tempa=\box81 -\@tempa=\box82 -\@tempa=\box83 -\@tempa=\box84 -\@tempa=\box85 -\@tempa=\box86 -\@tempa=\box87 -\@tempa=\box88 -\@tempa=\box89 -\@tempa=\box90 -\@tempa=\box91 -\@tempa=\box92 -\@tempa=\box93 -\@tempa=\box94 -\@tempa=\box95 -\@tempa=\box96 -\c@minrows=\count289 -\c@columnbadness=\count290 -\c@finalcolumnbadness=\count291 -\last@try=\dimen155 -\multicolovershoot=\dimen156 -\multicolundershoot=\dimen157 -\mult@nat@firstbox=\box97 -\colbreak@box=\box98 -\mc@col@check@num=\count292 -\g__mc_curr_col_int=\count293 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/oberdiek/aliascnt.sty -Package: aliascnt 2018/09/07 v1.5 Alias counters (HO) -) -\c@chapter=\count294 -LaTeX Font Info: Redeclaring math symbol \Gamma on input line 379. -LaTeX Font Info: Redeclaring math symbol \Delta on input line 380. -LaTeX Font Info: Redeclaring math symbol \Theta on input line 381. -LaTeX Font Info: Redeclaring math symbol \Lambda on input line 382. -LaTeX Font Info: Redeclaring math symbol \Xi on input line 383. -LaTeX Font Info: Redeclaring math symbol \Pi on input line 384. -LaTeX Font Info: Redeclaring math symbol \Sigma on input line 385. -LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 386. -LaTeX Font Info: Redeclaring math symbol \Phi on input line 387. -LaTeX Font Info: Redeclaring math symbol \Psi on input line 388. -LaTeX Font Info: Redeclaring math symbol \Omega on input line 389. -LaTeX Info: Redefining \vec on input line 394. -\tocchpnum=\dimen158 -\tocsecnum=\dimen159 -\tocsectotal=\dimen160 -\tocsubsecnum=\dimen161 -\tocsubsectotal=\dimen162 -\tocsubsubsecnum=\dimen163 -\tocsubsubsectotal=\dimen164 -\tocparanum=\dimen165 -\tocparatotal=\dimen166 -\tocsubparanum=\dimen167 -\@tempcntc=\count295 -\fnindent=\dimen168 -\c@@inst=\count296 -\c@@auth=\count297 -\c@auco=\count298 -\instindent=\dimen169 -\authrun=\box99 -\authorrunning=\toks17 -\tocauthor=\toks18 -\titrun=\box100 -\titlerunning=\toks19 -\toctitle=\toks20 -\c@theorem=\count299 -\c@case=\count300 -\c@conjecture=\count301 -\c@corollary=\count302 -\c@definition=\count303 -\c@example=\count304 -\c@exercise=\count305 -\c@lemma=\count306 -\c@note=\count307 -\c@problem=\count308 -\c@property=\count309 -\c@proposition=\count310 -\c@question=\count311 -\c@solution=\count312 -\c@remark=\count313 -\headlineindent=\dimen170 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/base/fontenc.sty -Package: fontenc 2025/07/18 v2.1d Standard LaTeX package -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty -Package: graphicx 2024/12/31 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty -Package: keyval 2022/05/29 v1.15 key=value parser (DPC) -\KV@toks@=\toks21 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty -Package: graphics 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty -Package: trig 2023/12/02 v1.11 sin cos tan (DPC) -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg -File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration -) -Package graphics Info: Driver file: pdftex.def on input line 106. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics-def/pdftex.def -File: pdftex.def 2025/09/29 v1.2d Graphics/color driver for pdftex -)) -\Gin@req@height=\dimen171 -\Gin@req@width=\dimen172 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/tools/verbatim.sty -Package: verbatim 2024-01-22 v1.5x LaTeX2e package for verbatim enhancements -\every@verbatim=\toks22 -\verbatim@line=\toks23 -\verbatim@in@stream=\read2 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/amsmath/amsmath.sty -Package: amsmath 2025/07/09 v2.17z AMS math features -\@mathmargin=\skip53 - -For additional information on amsmath, use the `?' option. -(/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/amsmath/amstext.sty -Package: amstext 2024/11/17 v2.01 AMS text - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/amsmath/amsgen.sty -File: amsgen.sty 1999/11/30 v2.0 generic functions -\@emptytoks=\toks24 -\ex@=\dimen173 -)) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/amsmath/amsbsy.sty -Package: amsbsy 1999/11/29 v1.2d Bold Symbols -\pmbraise@=\dimen174 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/amsmath/amsopn.sty -Package: amsopn 2022/04/08 v2.04 operator names -) -\inf@bad=\count314 -LaTeX Info: Redefining \frac on input line 233. -\uproot@=\count315 -\leftroot@=\count316 -LaTeX Info: Redefining \overline on input line 398. -LaTeX Info: Redefining \colon on input line 409. -\classnum@=\count317 -\DOTSCASE@=\count318 -LaTeX Info: Redefining \ldots on input line 495. -LaTeX Info: Redefining \dots on input line 498. -LaTeX Info: Redefining \cdots on input line 619. -\Mathstrutbox@=\box101 -\strutbox@=\box102 -LaTeX Info: Redefining \big on input line 721. -LaTeX Info: Redefining \Big on input line 722. -LaTeX Info: Redefining \bigg on input line 723. -LaTeX Info: Redefining \Bigg on input line 724. -\big@size=\dimen175 -LaTeX Font Info: Redeclaring font encoding OML on input line 742. -LaTeX Font Info: Redeclaring font encoding OMS on input line 743. - - -Package amsmath Warning: Unable to redefine math accent \vec. - -\macc@depth=\count319 -LaTeX Info: Redefining \bmod on input line 904. -LaTeX Info: Redefining \pmod on input line 909. -LaTeX Info: Redefining \smash on input line 939. -LaTeX Info: Redefining \relbar on input line 969. -LaTeX Info: Redefining \Relbar on input line 970. -\c@MaxMatrixCols=\count320 -\dotsspace@=\muskip17 -\c@parentequation=\count321 -\dspbrk@lvl=\count322 -\tag@help=\toks25 -\row@=\count323 -\column@=\count324 -\maxfields@=\count325 -\andhelp@=\toks26 -\eqnshift@=\dimen176 -\alignsep@=\dimen177 -\tagshift@=\dimen178 -\tagwidth@=\dimen179 -\totwidth@=\dimen180 -\lineht@=\dimen181 -\@envbody=\toks27 -\multlinegap=\skip54 -\multlinetaggap=\skip55 -\mathdisplay@stack=\toks28 -LaTeX Info: Redefining \[ on input line 2950. -LaTeX Info: Redefining \] on input line 2951. -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/xcolor/xcolor.sty -Package: xcolor 2024/09/29 v3.02 LaTeX color extensions (UK) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics-cfg/color.cfg -File: color.cfg 2016/01/02 v1.6 sample color configuration -) -Package xcolor Info: Driver file: pdftex.def on input line 274. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/graphics/mathcolor.ltx) -Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1349. -Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1353. -Package xcolor Info: Model `RGB' extended on input line 1365. -Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1367. -Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1368. -Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1369. -Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1370. -Package xcolor Info: Model `Gray' substituted by `gray' on input line 1371. -Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372. -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/generic/ulem/ulem.sty -\UL@box=\box103 -\UL@hyphenbox=\box104 -\UL@skip=\skip56 -\UL@hook=\toks29 -\UL@height=\dimen182 -\UL@pe=\count326 -\UL@pixel=\dimen183 -\ULC@box=\box105 -Package: ulem 2019/11/18 -\ULdepth=\dimen184 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def -File: l3backend-pdftex.def 2025-10-09 L3 backend support: PDF output (pdfTeX) -\l__color_backend_stack_int=\count327 -) (./main.aux) -\openout1 = `main.aux'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 29. -LaTeX Font Info: ... okay on input line 29. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 29. -LaTeX Font Info: ... okay on input line 29. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 29. -LaTeX Font Info: ... okay on input line 29. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 29. -LaTeX Font Info: ... okay on input line 29. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 29. -LaTeX Font Info: ... okay on input line 29. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 29. -LaTeX Font Info: ... okay on input line 29. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 29. -LaTeX Font Info: ... okay on input line 29. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii -[Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count328 -\scratchdimen=\dimen185 -\scratchbox=\box106 -\nofMPsegments=\count329 -\nofMParguments=\count330 -\everyMPshowfont=\toks30 -\MPscratchCnt=\count331 -\MPscratchDim=\dimen186 -\MPnumerator=\count332 -\makeMPintoPDFobject=\count333 -\everyMPtoPDFconversion=\toks31 -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty -Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/generic/infwarerr/infwarerr.sty -Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/grfext/grfext.sty -Package: grfext 2019/12/03 v1.3 Manage graphics extensions (HO) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty -Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) -)) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/kvoptions/kvoptions.sty -Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty -Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO) -) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty -Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) -)) (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty -Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO) - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/generic/iftex/iftex.sty -Package: iftex 2024/12/12 v1.0g TeX engine tests -) -Package pdftexcmds Info: \pdf@primitive is available. -Package pdftexcmds Info: \pdf@ifprimitive is available. -Package pdftexcmds Info: \pdfdraftmode found. -) -Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 485. -Package grfext Info: Graphics extension search list: -(grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2,.eps] -(grfext) \AppendGraphicsExtensions on input line 504. - (/data/parietal/store4/work/ggomezji/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg -File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live -)) (./tex/introduction.tex [1 - -{/data/parietal/store4/work/ggomezji/texlive/2025/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] - -File: scheme.pdf Graphic file (type pdf) - -Package pdftex.def Info: scheme.pdf used on input line 22. -(pdftex.def) Requested size: 347.12354pt x 188.53502pt. -) (./tex/benchmark.tex [2 <./scheme.pdf>] [3] -Underfull \hbox (badness 10000) in paragraph at lines 85--89 - - [] - -[4]) (./tex/results.tex -<../exp_outputs/summary/plots/folds/combined_model_vs_prep.pdf, id=811, 466.72932pt x 211.9778pt> -File: ../exp_outputs/summary/plots/folds/combined_model_vs_prep.pdf Graphic file (type pdf) - -Package pdftex.def Info: ../exp_outputs/summary/plots/folds/combined_model_vs_prep.pdf used on input line 7. -(pdftex.def) Requested size: 347.12354pt x 157.65678pt. - [5] -<../exp_outputs/summary/plots/folds/white_vs_gray_dataset_task_linear_rf_deep.pdf, id=815, 588.34993pt x 208.74971pt> -File: ../exp_outputs/summary/plots/folds/white_vs_gray_dataset_task_linear_rf_deep.pdf Graphic file (type pdf) - -Package pdftex.def Info: ../exp_outputs/summary/plots/folds/white_vs_gray_dataset_task_linear_rf_deep.pdf used on input line 42. -(pdftex.def) Requested size: 347.12354pt x 123.16125pt. - [6 <../exp_outputs/summary/plots/folds/combined_model_vs_prep.pdf>] -<../exp_outputs/summary/plots/features/feature_benefit_heatmap_robust_by_tissue.pdf, id=835, 582.35818pt x 157.68016pt> -File: ../exp_outputs/summary/plots/features/feature_benefit_heatmap_robust_by_tissue.pdf Graphic file (type pdf) - -Package pdftex.def Info: ../exp_outputs/summary/plots/features/feature_benefit_heatmap_robust_by_tissue.pdf used on input line 72. -(pdftex.def) Requested size: 347.12354pt x 93.98807pt. - [7 <../exp_outputs/summary/plots/folds/white_vs_gray_dataset_task_linear_rf_deep.pdf>]) (./tex/conclusion.tex) [8 <../exp_outputs/summary/plots/features/feature_benefit_heatmap_robust_by_tissue.pdf>] (./main.bbl [9] [10]) [11] (./main.aux) - *********** -LaTeX2e <2025-11-01> -L3 programming layer <2026-01-19> - *********** - ) -Here is how much of TeX's memory you used: - 4066 strings out of 469005 - 64667 string characters out of 5450604 - 481059 words of memory out of 5000000 - 32690 multiletter control sequences out of 15000+600000 - 641354 words of font info for 67 fonts, out of 8000000 for 9000 - 319 hyphenation exceptions out of 8191 - 59i,9n,67p,690b,341s stack positions out of 10000i,1000n,20000p,200000b,200000s - -Output written on main.pdf (11 pages, 1111368 bytes). -PDF statistics: - 1335 PDF objects out of 1440 (max. 8388607) - 513 compressed objects within 6 object streams - 0 named destinations out of 1000 (max. 500000) - 21 words of extra memory for PDF output out of 10000 (max. 10000000) - diff --git a/MICCAI2026-Latex-Template/main.pdf b/MICCAI2026-Latex-Template/main.pdf deleted file mode 100644 index c26d4642..00000000 Binary files a/MICCAI2026-Latex-Template/main.pdf and /dev/null differ diff --git a/MICCAI2026-Latex-Template/main.synctex.gz b/MICCAI2026-Latex-Template/main.synctex.gz deleted file mode 100644 index dbca519c..00000000 Binary files a/MICCAI2026-Latex-Template/main.synctex.gz and /dev/null differ diff --git a/MICCAI2026-Latex-Template/main.tex b/MICCAI2026-Latex-Template/main.tex deleted file mode 100644 index dc9d760a..00000000 --- a/MICCAI2026-Latex-Template/main.tex +++ /dev/null @@ -1,158 +0,0 @@ -% This is a modified version of Springer's LNCS template suitable for anonymized MICCAI 2025 main conference submissions. -% Original file: samplepaper.tex, a sample chapter demonstrating the LLNCS macro package for Springer Computer Science proceedings; Version 2.21 of 2022/01/12 - -\documentclass[runningheads]{llncs} -% -\usepackage[T1]{fontenc} -% T1 fonts will be used to generate the final print and online PDFs, -% so please use T1 fonts in your manuscript whenever possible. -% Other font encodings may result in incorrect characters. -% -\usepackage{graphicx,verbatim} -\usepackage{amsmath} -% Used for displaying a sample figure. If possible, figure files should -% be included in EPS format. -% -\usepackage{xcolor} -\usepackage[normalem]{ulem} -% \replace{old text}{new proposal} — strikes out old in red, shows proposal in blue -\newcommand{\replace}[2]{\textcolor{red}{\sout{#1}} \textcolor{blue}{#2}} -% \todo{note} — highlighted in yellow -\newcommand{\todo}[1]{\textcolor{orange}{\textbf{[TODO: #1]}}} -% -% If you use the hyperref package, please uncomment the following two lines -% to display URLs in blue roman font according to Springer's eBook style: -%\usepackage{color} -%\renewcommand\UrlFont{\color{blue}\rmfamily} -%\urlstyle{rm} -% -\begin{document} -% -\title{ - % How predictive is diffusion MRI microstructure? - % A reproducible benchmark across datasets, features and model - % Diffbench: A Reproducible Benchmark To Assess How Predictive Diffusion MRI Microstructure Is - % DiffBench: Toward Robust and Reproducible Prediction in Diffusion MRI - DiffBench: A Reproducible Benchmark in Diffusion MRI Prediction -} -%\titlerunning{Abbreviated paper title} -% If the paper title is too long for the running head, you can set -% an abbreviated paper title here -% -\begin{comment} %% Removed for anonymized MICCAI submission -\author{First Author\inst{1}\orcidID{0000-1111-2222-3333} \and -Second Author\inst{2,3}\orcidID{1111-2222-3333-4444} \and -Third Author\inst{3}\orcidID{2222--3333-4444-5555}} -% -\authorrunning{F. Author et al.} -% First names are abbreviated in the running head. -% If there are more than two authors, 'et al.' is used. -% -\institute{Princeton University, Princeton NJ 08544, USA \and -Springer Heidelberg, Tiergartenstr. 17, 69121 Heidelberg, Germany -\email{lncs@springer.com}\\ -\url{http://www.springer.com/gp/computer-science/lncs} \and -ABC Institute, Rupert-Karls-University Heidelberg, Heidelberg, Germany\\ -\email{\{abc,lncs\}@uni-heidelberg.de}} - -\end{comment} - -\author{Anonymized Authors} %% Added for anonymized MICCAI submission -\authorrunning{Anonymized Author et al.} -\institute{Anonymized Affiliations \\ - \email{email@anonymized.com}} - -\maketitle % typeset the header of the contribution -% -\begin{abstract} -% The abstract should briefly summarize the contents of the paper in 150--250 words. If you are to include a link to your Repository, please make sure it is anonymized for the double-blind review phase. -Diffusion MRI is widely used to explore brain microstructure, and numerous machine learning methods have been proposed to extract predictive information. -Yet progress remains difficult to assess: studies rely on single datasets, heterogeneous pipelines, limited evaluation, and often lack accessible code, preventing meaningful comparison and reproducibility. -We introduce DiffBench, a modular and transparent benchmarking framework for machine and deep learning in dMRI microstructure. -The benchmark unifies multiple representative datasets within a standardized end-to-end pipeline and enables systematic comparison across tissue types, feature representations and models. -It reveals differences between white and gray matter analyses, quantify the impact of diffusion microstructure feature choices, and show that fast linear baselines can rival more complex deep learning methods. -This shows that standardized benchmarking is essential to move the field beyond proxy tasks and toward robust methods with real clinical relevance. -\keywords{Benchmark \and Brain \and diffusion MRI \and Machine Learning \and Deep Learning \and Predictive Learning \and Reproducibility.} -% Authors must provide keywords and are not allowed to remove this Keyword section. - -\end{abstract} -% -% -% -% \input{tex/reuben.tex} - -\section{Introduction} -\input{tex/introduction.tex} - -\section{Benchmark Pipeline} -\input{tex/benchmark.tex} - -\section{Results} -\input{tex/results.tex} - -\section{Conclusion} -\input{tex/conclusion.tex} - -% For citations of references, we prefer the use of square brackets -% and consecutive numbers. Citations using labels or the author/year -% convention are also acceptable. Multiple citations are grouped -% \cite{chen2024deep}, -% \cite{basser1994mr}. - - %% removed for anonymized MICCAI submission. - - % The following acknowledgement and disclaimer sections can be removed for the double-blind review process. If and when your paper is accepted, reinsert the acknowledgement and the disclaimer clause in your final camera-ready version. - % IF you opted to include the acknowledgement and disclaimer sections, they will count towards the 8-page limit. - -% \begin{credits} -% \subsubsection{\ackname} A bold run-in heading in small font size at the end of the paper is -% used for general acknowledgments, for example: This study was funded -% by X (grant number Y). - -% \subsubsection{\discintname} -% It is now necessary to declare any competing interests or to specifically -% state that the authors have no competing interests. Please place the -% statement with a bold run-in heading in small font size beneath the -% (optional) acknowledgments\footnote{If EquinOCS, our proceedings submission -% system, is used, then the disclaimer can be provided directly in the system.}, -% for example: The authors have no competing interests to declare that are -% relevant to the content of this article. Or: Author A has received research -% grants from Company W. Author B has received a speaker honorarium from -% Company X and owns stock in Company Y. Author C is a member of committee Z. -% \end{credits} - - -% -% ---- Bibliography ---- -% -% BibTeX users should specify bibliography style 'splncs04'. -% References will then be sorted and formatted in the correct style. -% -% \bibliographystyle{splncs04} -% \bibliography{mybibliography} -% -% \begin{thebibliography}{8} -% \bibitem{ref_article1} -% Author, F.: Article title. Journal \textbf{2}(5), 99--110 (2016) - -% \bibitem{ref_lncs1} -% Author, F., Author, S.: Title of a proceedings paper. In: Editor, -% F., Editor, S. (eds.) CONFERENCE 2016, LNCS, vol. 9999, pp. 1--13. -% Springer, Heidelberg (2016). \doi{10.10007/1234567890} - -% \bibitem{ref_book1} -% Author, F., Author, S., Author, T.: Book title. 2nd edn. Publisher, -% Location (1999) - -% \bibitem{ref_proc1} -% Author, A.-B.: Contribution title. In: 9th International Proceedings -% on Proceedings, pp. 1--2. Publisher, Location (2010) - -% \bibitem{ref_url1} -% LNCS Homepage, \url{http://www.springer.com/lncs}, last accessed 2023/10/25 -% \end{thebibliography} -% \end{document} -\newpage -\bibliographystyle{splncs04} -\bibliography{references} -\end{document} diff --git a/MICCAI2026-Latex-Template/readme.txt b/MICCAI2026-Latex-Template/readme.txt deleted file mode 100644 index 18d633e6..00000000 --- a/MICCAI2026-Latex-Template/readme.txt +++ /dev/null @@ -1,20 +0,0 @@ -Dear llncs user, - -The files in this directory belong to the LaTeX2e package -for Springer's Lecture Notes in Computer Science (LNCS) and -other proceedings book series. - -It consists of the following files: - - readme.txt this file - - history.txt the version history of the package - - llncs.cls the LaTeX2e document class - - samplepaper.tex a sample paper - fig1.eps a figure used in the sample paper - - llncsdoc.pdf the documentation of the class (PDF version) - - splncs04.bst current LNCS BibTeX style with alphabetic sorting diff --git a/MICCAI2026-Latex-Template/references.bib b/MICCAI2026-Latex-Template/references.bib deleted file mode 100644 index 51ef8806..00000000 --- a/MICCAI2026-Latex-Template/references.bib +++ /dev/null @@ -1,496 +0,0 @@ -% ---- Bibliography ---- -% Add your references here in BibTeX format. -% Examples: - -@article{chen2024deep, - title={Deep learning with diffusion MRI as in vivo microscope reveals sex-related differences in human white matter microstructure}, - author={Chen, Junbo and Bayanagari, Vara Lakshmi and Chung, Sohae and Wang, Yao and Lui, Yvonne W}, - journal={Scientific reports}, - volume={14}, - number={1}, - pages={9835}, - year={2024}, - publisher={Nature Publishing Group UK London} -} - -@inproceedings{he2022model, - title={Model and predict age and sex in healthy subjects using brain white matter features: a deep learning approach}, - author={He, Hao and Zhang, Fan and Pieper, Steve and Makris, Nikos and Rathi, Yogesh and Wells, William and O’Donnell, Lauren J}, - booktitle={2022 IEEE 19th International Symposium on Biomedical Imaging (ISBI)}, - pages={1--5}, - year={2022}, - organization={IEEE} -} - -@article{kotikalapudi2025replicability, - title={On the replicability of diffusion weighted MRI-based brain-behavior models}, - author={Kotikalapudi, Raviteja and Kincses, Balint and Gallitto, Giuseppe and Englert, Robert and Hofffschlag, Kevin and Li, Jialin and B{\"u}chel, Christian and Bingel, Ulrike and Spisak, Tamas}, - journal={Communications Biology}, - volume={8}, - number={1}, - pages={1512}, - year={2025}, - publisher={Nature Publishing Group UK London} -} - -@article{egle2022prediction, - title={Prediction of dementia using diffusion tensor MRI measures: the OPTIMAL collaboration}, - author={Egle, Marco and Hilal, Saima and Tuladhar, Anil M and Pirpamer, Lukas and Hofer, Edith and Duering, Marco and Wason, James and Morris, Robin G and Dichgans, Martin and Schmidt, Reinhold and others}, - journal={Journal of Neurology, Neurosurgery \& Psychiatry}, - volume={93}, - number={1}, - pages={14--23}, - year={2022}, - publisher={BMJ Publishing Group Ltd} -} - -@article{karimi2024diffusion, - title={Diffusion MRI with machine learning}, - author={Karimi, Davood and Warfield, Simon K}, - journal={Imaging Neuroscience}, - volume={2}, - pages={imag--2}, - year={2024}, - publisher={MIT Press 255 Main Street, 9th Floor, Cambridge, Massachusetts 02142, USA~…} -} - -@article{wen2021reproducible, - title={Reproducible evaluation of diffusion MRI features for automatic classification of patients with Alzheimer’s disease}, - author={Wen, Junhao and Samper-Gonz{\'a}lez, Jorge and Bottani, Simona and Routier, Alexandre and Burgos, Ninon and Jacquemont, Thomas and Fontanella, Sabrina and Durrleman, Stanley and Epelbaum, Stephane and Bertrand, Anne and others}, - journal={Neuroinformatics}, - volume={19}, - number={1}, - pages={57--78}, - year={2021}, - publisher={Springer} -} - -@article{van2013wu, - title={The WU-Minn human connectome project: an overview}, - author={Van Essen, David C and Smith, Stephen M and Barch, Deanna M and Behrens, Timothy EJ and Yacoub, Essa and Ugurbil, Kamil and Wu-Minn HCP Consortium and others}, - journal={Neuroimage}, - volume={80}, - pages={62--79}, - year={2013}, - publisher={Elsevier} -} - -@article{shafto2014cambridge, - title={The Cambridge Centre for Ageing and Neuroscience (Cam-CAN) study protocol: a cross-sectional, lifespan, multidisciplinary examination of healthy cognitive ageing}, - author={Shafto, Meredith A and Tyler, Lorraine K and Dixon, Marie and Taylor, Jason R and Rowe, James B and Cusack, Rhodri and Calder, Andrew J and Marslen-Wilson, William D and Duncan, John and Dalgleish, Tim and others}, - journal={BMC neurology}, - volume={14}, - number={1}, - pages={204}, - year={2014}, - publisher={Springer} -} - -@article{di2017enhancing, - title={Enhancing studies of the connectome in autism using the autism brain imaging data exchange II}, - author={Di Martino, Adriana and O’connor, David and Chen, Bosi and Alaerts, Kaat and Anderson, Jeffrey S and Assaf, Michal and Balsters, Joshua H and Baxter, Leslie and Beggiato, Anita and Bernaerts, Sylvie and others}, - journal={Scientific data}, - volume={4}, - number={1}, - pages={1--15}, - year={2017}, - publisher={Nature Publishing Group} -} - -@article{novikov2019quantifying, - title={Quantifying brain microstructure with diffusion MRI: Theory and parameter estimation}, - author={Novikov, Dmitry S and Fieremans, Els and Jespersen, Sune N and Kiselev, Valerij G}, - journal={NMR in Biomedicine}, - volume={32}, - number={4}, - pages={e3998}, - year={2019}, - publisher={Wiley Online Library} -} - -@article{smith2006tract, - title={Tract-based spatial statistics: voxelwise analysis of multi-subject diffusion data}, - author={Smith, Stephen M and Jenkinson, Mark and Johansen-Berg, Heidi and Rueckert, Daniel and Nichols, Thomas E and Mackay, Clare E and Watkins, Kate E and Ciccarelli, Olga and Cader, M Zaheer and Matthews, Paul M and others}, - journal={Neuroimage}, - volume={31}, - number={4}, - pages={1487--1505}, - year={2006}, - publisher={Elsevier} -} - -@article{basser1994mr, - title={MR diffusion tensor spectroscopy and imaging}, - author={Basser, Peter J and Mattiello, James and LeBihan, Denis}, - journal={Biophysical journal}, - volume={66}, - number={1}, - pages={259--267}, - year={1994}, - publisher={Elsevier} -} - -@article{jensen2005diffusional, - title={Diffusional kurtosis imaging: the quantification of non-gaussian water diffusion by means of magnetic resonance imaging}, - author={Jensen, Jens H and Helpern, Joseph A and Ramani, Anita and Lu, Hanzhang and Kaczynski, Kyle}, - journal={Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine}, - volume={53}, - number={6}, - pages={1432--1440}, - year={2005}, - publisher={Wiley Online Library} -} - -@article{descoteaux2007regularized, - title={Regularized, fast, and robust analytical Q-ball imaging}, - author={Descoteaux, Maxime and Angelino, Elaine and Fitzgibbons, Shaun and Deriche, Rachid}, - journal={Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine}, - volume={58}, - number={3}, - pages={497--510}, - year={2007}, - publisher={Wiley Online Library} -} - -@article{oquab2023dinov2, - title={Dinov2: Learning robust visual features without supervision}, - author={Oquab, Maxime and Darcet, Timoth{\'e}e and Moutakanni, Th{\'e}o and Vo, Huy and Szafraniec, Marc and Khalidov, Vasil and Fernandez, Pierre and Haziza, Daniel and Massa, Francisco and El-Nouby, Alaaeldin and others}, - journal={arXiv preprint arXiv:2304.07193}, - year={2023} -} - -@article{dancette2025curia, - title={Curia: A Multi-Modal Foundation Model for Radiology}, - author={Dancette, Corentin and Khlaut, Julien and Saporta, Antoine and Philippe, Helene and Ferreres, Elodie and Callard, Baptiste and Danielou, Th{\'e}o and Alberge, L{\'e}o and Machado, L{\'e}o and Tordjman, Daniel and others}, - journal={arXiv preprint arXiv:2509.06830}, - year={2025} -} - -@article{chen2019med3d, - title={Med3d: Transfer learning for 3d medical image analysis}, - author={Chen, Sihong and Ma, Kai and Zheng, Yefeng}, - journal={arXiv preprint arXiv:1904.00625}, - year={2019} -} - -@article{mori2008stereotaxic, - title={Stereotaxic white matter atlas based on diffusion tensor imaging in an ICBM template}, - author={Mori, Susumu and Oishi, Kenichi and Jiang, Hangyi and Jiang, Li and Li, Xin and Akhter, Kazi and Hua, Kegang and Faria, Andreia V and Mahmood, Asif and Woods, Roger and others}, - journal={Neuroimage}, - volume={40}, - number={2}, - pages={570--582}, - year={2008}, - publisher={Elsevier} -} - -@article{pasternak2009free, - title={Free water elimination and mapping from diffusion MRI}, - author={Pasternak, Ofer and Sochen, Nir and Gur, Yaniv and Intrator, Nathan and Assaf, Yaniv}, - journal={Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine}, - volume={62}, - number={3}, - pages={717--730}, - year={2009}, - publisher={Wiley Online Library} -} - -@misc{hastie2009elements, - title={The elements of statistical learning}, - author={Hastie, Trevor and Tibshirani, Robert and Friedman, Jerome and others}, - year={2009}, - publisher={Springer series in statistics New-York} -} - -@article{tournier2004direct, - title={Direct estimation of the fiber orientation density function from diffusion-weighted MRI data using spherical deconvolution}, - author={Tournier, J-Donald and Calamante, Fernando and Gadian, David G and Connelly, Alan}, - journal={Neuroimage}, - volume={23}, - number={3}, - pages={1176--1185}, - year={2004}, - publisher={Elsevier} -} - -@article{greve2009accurate, - title={Accurate and robust brain image alignment using boundary-based registration}, - author={Greve, Douglas N and Fischl, Bruce}, - journal={Neuroimage}, - volume={48}, - number={1}, - pages={63--72}, - year={2009}, - publisher={Elsevier} -} - -@article{Garyfallidis2014, - title = {Dipy, a library for the analysis of diffusion {MRI} data}, - volume = {8}, - issn = {1662-5196}, - journal = {Frontiers in Neuroinformatics}, - publisher = {Frontiers}, - author = {Garyfallidis, Eleftherios and Brett, Matthew and Amirbekian, Bagrat and Rokem, Ariel and Van Der Walt, Stefan and Descoteaux, Maxime and Nimmo-Smith, Ian}, - month = feb, - year = {2014} -} - -@article{Smith2004, - title = {Advances in Functional and Structural {{MR}} Image Analysis and Implementation as {{FSL}}}, - author = {Smith, Stephen M. and Jenkinson, Mark and Woolrich, Mark W. and Beckmann, Christian F. and Behrens, Timothy E. J. and {Johansen-Berg}, Heidi and Bannister, Peter R. and De Luca, Marilena and Drobnjak, Ivana and Flitney, David E. and Niazy, Rami K. and Saunders, James and Vickers, John and Zhang, Yongyue and De Stefano, Nicola and Brady, J. Michael and Matthews, Paul M.}, - year = 2004, - month = jan, - journal = {NeuroImage}, - series = {Mathematics in {{Brain Imaging}}}, - volume = {23}, - pages = {S208-S219}, - issn = {1053-8119} -} - -@article{Veraart2016a, - title = {Denoising of Diffusion {{MRI}} Using Random Matrix Theory}, - author = {Veraart, Jelle and Novikov, Dmitry S. and Christiaens, Daan and {Ades-aron}, Benjamin and Sijbers, Jan and Fieremans, Els}, - year = {2016}, - month = nov, - journal = {NeuroImage}, - volume = {142}, - pages = {394--406}, - issn = {1053-8119} -} - -@article{Cordero-Grande2019, - title = {Complex Diffusion-Weighted Image Estimation via Matrix Recovery under General Noise Models}, - author = {{Cordero-Grande}, Lucilio and Christiaens, Daan and Hutter, Jana and Price, Anthony N. and Hajnal, Jo V.}, - year = {2019}, - month = oct, - journal = {NeuroImage}, - volume = {200}, - pages = {391--404}, - issn = {1053-8119} -} - -@article{Andersson2016, - title = {An Integrated Approach to Correction for Off-Resonance Effects and Subject Movement in Diffusion {{MR}} Imaging}, - author = {Andersson, Jesper L. R. and Sotiropoulos, Stamatios N.}, - year = {2016}, - month = jan, - journal = {NeuroImage}, - volume = {125}, - pages = {1063--1078}, - issn = {1053-8119} -} - -@article{Cox1996, - title = {{{AFNI}}: {{Software}} for {{Analysis}} and {{Visualization}} of {{Functional Magnetic Resonance Neuroimages}}}, - shorttitle = {{{AFNI}}}, - author = {Cox, Robert W.}, - year = 1996, - month = jun, - journal = {Computers and Biomedical Research}, - volume = {29}, - number = {3}, - pages = {162--173}, - issn = {0010-4809}, -} - -@article{Avants2009, - title = {Advanced {{Normalization Tools}} ({{ANTS}})}, - author = {Avants, Brian B and Tustison, Nick and Johnson, Hans}, - year = 2009, - volume = {2}, - number = {365}, - pages = {1--35} -} - -@article{Dale1999a, - title = {Cortical {{Surface-Based Analysis}}: {{I}}. {{Segmentation}} and {{Surface Reconstruction}}}, - shorttitle = {Cortical {{Surface-Based Analysis}}}, - author = {Dale, Anders M. and Fischl, Bruce and Sereno, Martin I.}, - year = 1999, - month = feb, - journal = {NeuroImage}, - volume = {9}, - number = {2}, - pages = {179--194}, - issn = {1053-8119}, -} - -@article{Veraart2016b, - title = {Gibbs Ringing in Diffusion {{MRI}}}, - author = {Veraart, Jelle and Fieremans, Els and Jelescu, Ileana O. and Knoll, Florian and Novikov, Dmitry S.}, - year = 2016, - journal = {Magnetic Resonance in Medicine}, - volume = {76}, - number = {1}, - pages = {301--314}, - issn = {1522-2594} -} - -%Reuben add -@article{esteban2019fmriprep, - title={fMRIPrep: a robust preprocessing pipeline for functional MRI}, - author={Esteban, Oscar and Markiewicz, Christopher J and Blair, Ross W and Moodie, Craig A and Isik, A Ilkay and Erramuzpe, Asier and Kent, James D and Goncalves, Mathias and DuPre, Elizabeth and Snyder, Madeleine and others}, - journal={Nature methods}, - volume={16}, - number={1}, - pages={111--116}, - year={2019}, - publisher={Nature Publishing Group US New York} -} - -@article{breiman2001random, - title={Random forests}, - author={Breiman, Leo}, - journal={Machine learning}, - volume={45}, - number={1}, - pages={5--32}, - year={2001}, - publisher={Springer} -} - -@article{menon2020microstructural, - title={Microstructural organization of human insula is linked to its macrofunctional circuitry and predicts cognitive control}, - author={Menon, Vinod and Gallardo, Guillermo and Pinsk, Mark A and Nguyen, Van-Dang and Li, Jing-Rebecca and Cai, Weidong and Wassermann, Demian}, - journal={elife}, - volume={9}, - pages={e53470}, - year={2020}, - publisher={eLife Sciences Publications, Ltd} -} - -@article{wu2023challenges, - title={The challenges and prospects of brain-based prediction of behaviour}, - author={Wu, Jianxiao and Li, Jingwei and Eickhoff, Simon B and Scheinost, Dustin and Genon, Sarah}, - journal={Nature Human Behaviour}, - volume={7}, - number={8}, - pages={1255--1264}, - year={2023}, - publisher={Nature Publishing Group UK London} -} - -@article{genon2022linking, - title={Linking interindividual variability in brain structure to behaviour}, - author={Genon, Sarah and Eickhoff, Simon B and Kharabian, Shahrzad}, - journal={Nature Reviews Neuroscience}, - volume={23}, - number={5}, - pages={307--318}, - year={2022}, - publisher={Nature Publishing Group UK London} -} - -@article{rosenblatt2024power, - title={Power and reproducibility in the external validation of brain-phenotype predictions}, - author={Rosenblatt, Matthew and Tejavibulya, Link and Sun, Huili and Camp, Chris C and Khaitova, Milana and Adkinson, Brendan D and Jiang, Rongtao and Westwater, Margaret L and Noble, Stephanie and Scheinost, Dustin}, - journal={Nature Human Behaviour}, - volume={8}, - number={10}, - pages={2018--2033}, - year={2024}, - publisher={Nature Publishing Group UK London} -} - -@article{rauland2025benchmarking, - title={Benchmarking Orientation Distribution Function Estimation Methods for Tractometry in Single-Shell Diffusion Magnetic Resonance Imaging-An Evaluation of Test-Retest Reliability and Predictive Capability}, - author={Rauland, Amelie and Meisler, Steven L and Alexander-Bloch, Aaron F and Bagautdinova, Jo{\"e}lle and Baller, Erica B and Gur, Raquel E and Gur, Ruben C and Luo, Audrey C and Moore, Tyler M and Popovych, Oleksandr V and others}, - journal={bioRxiv}, - pages={2025--09}, - year={2025}, - publisher={Cold Spring Harbor Laboratory} -} - -@article{chen2023deep, - title={Deep learning prediction of diffusion MRI data with microstructure-sensitive loss functions}, - author={Chen, Geng and Hong, Yoonmi and Huynh, Khoi Minh and Yap, Pew-Thian}, - journal={Medical image analysis}, - volume={85}, - pages={102742}, - year={2023}, - publisher={Elsevier} -} - -@inproceedings{yeung2020pipeline, - title={Pipeline comparisons of convolutional neural networks for structural connectomes: predicting sex across 3,152 participants}, - author={Yeung, Hon Wah and Luz, Saturnino and Cox, Simon R and Buchanan, Colin R and Whalley, Heather C and Smith, Keith M}, - booktitle={2020 42nd Annual International Conference of the IEEE Engineering in Medicine \& Biology Society (EMBC)}, - pages={1692--1695}, - year={2020}, - organization={IEEE} -} - -@article{desikan2006automated, - title={An automated labeling system for subdividing the human cerebral cortex on MRI scans into gyral based regions of interest}, - author={Desikan, Rahul S and S{\'e}gonne, Florent and Fischl, Bruce and Quinn, Brian T and Dickerson, Bradford C and Blacker, Deborah and Buckner, Randy L and Dale, Anders M and Maguire, R Paul and Hyman, Bradley T and others}, - journal={Neuroimage}, - volume={31}, - number={3}, - pages={968--980}, - year={2006}, - publisher={Elsevier} -} - -@article{chen2020generalization, - title={Generalization of diffusion magnetic resonance imaging--based brain age prediction model through transfer learning}, - author={Chen, Chang-Le and Hsu, Yung-Chin and Yang, Li-Ying and Tung, Yu-Hung and Luo, Wen-Bin and Liu, Chih-Min and Hwang, Tzung-Jeng and Hwu, Hai-Gwo and Tseng, Wen-Yih Isaac}, - journal={NeuroImage}, - volume={217}, - pages={116831}, - year={2020}, - publisher={Elsevier} -} - -@article{de2018age, - title={Age differentiation within gray matter, white matter, and between memory and white matter in an adult life span cohort}, - author={de Mooij, Susanne MM and Henson, Richard NA and Waldorp, Lourens J and Kievit, Rogier A}, - journal={Journal of Neuroscience}, - volume={38}, - number={25}, - pages={5826--5836}, - year={2018}, - publisher={Society for Neuroscience} -} - -@article{dibaji2024sex, - title={Sex differences in brain MRI using deep learning toward fairer healthcare outcomes}, - author={Dibaji, Mahsa and Ospel, Johanna and Souza, Roberto and Bento, Mariana}, - journal={Frontiers in Computational Neuroscience}, - volume={18}, - pages={1452457}, - year={2024}, - publisher={Frontiers Media SA} -} - -@article{cardenas2025autism, - title={Autism spectrum disorder detection using diffusion tensor imaging and machine learning}, - author={Cardenas-Hernandez, Noel A and Perez-Diaz, Marlen and Garc{\'\i}a-Ram{\'o}, Karla Batista and Vald{\'e}s Hern{\'a}ndez, Maria del C}, - journal={PLOS Digital Health}, - volume={4}, - number={12}, - pages={e0001155}, - year={2025}, - publisher={Public Library of Science San Francisco, CA USA} -} - - -@article{gorgolewski2016brain, - title={The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments}, - author={Gorgolewski, Krzysztof J and Auer, Tibor and Calhoun, Vince D and Craddock, R Cameron and Das, Samir and Duff, Eugene P and Flandin, Guillaume and Ghosh, Satrajit S and Glatard, Tristan and Halchenko, Yaroslav O and others}, - journal={Scientific data}, - volume={3}, - number={1}, - pages={1--9}, - year={2016}, - publisher={Nature Publishing Group} -} - -@article{hwang2021prediction, - title={Prediction of brain age from routine T2-weighted spin-echo brain magnetic resonance images with a deep convolutional neural network}, - author={Hwang, Inpyeong and Yeon, Eung Koo and Lee, Ji Ye and Yoo, Roh-Eul and Kang, Koung Mi and Yun, Tae Jin and Choi, Seung Hong and Sohn, Chul-Ho and Kim, Hyeonjin and Kim, Ji-hoon}, - journal={Neurobiology of Aging}, - volume={105}, - pages={78--85}, - year={2021}, - publisher={Elsevier} -} \ No newline at end of file diff --git a/MICCAI2026-Latex-Template/scheme.pdf b/MICCAI2026-Latex-Template/scheme.pdf deleted file mode 100644 index d367277c..00000000 Binary files a/MICCAI2026-Latex-Template/scheme.pdf and /dev/null differ diff --git a/MICCAI2026-Latex-Template/splncs04.bst b/MICCAI2026-Latex-Template/splncs04.bst deleted file mode 100644 index 7d63c492..00000000 --- a/MICCAI2026-Latex-Template/splncs04.bst +++ /dev/null @@ -1,1548 +0,0 @@ -%% BibTeX bibliography style `splncs04' -%% -%% BibTeX bibliography style for use with numbered references in -%% Springer Verlag's "Lecture Notes in Computer Science" series. -%% (See Springer's documentation for llncs.cls for -%% more details of the suggested reference format.) Note that this -%% file will not work for author-year style citations. -%% -%% Use \documentclass{llncs} and \bibliographystyle{splncs04}, and cite -%% a reference with (e.g.) \cite{smith77} to get a "[1]" in the text. -%% -%% This file comes to you courtesy of Maurizio "Titto" Patrignani of -%% Dipartimento di Informatica e Automazione Universita' Roma Tre -%% -%% ================================================================================================ -%% This was file `titto-lncs-02.bst' produced on Wed Apr 1, 2009 -%% Edited by hand by titto based on `titto-lncs-01.bst' (see below) -%% -%% CHANGES (with respect to titto-lncs-01.bst): -%% - Removed the call to \urlprefix (thus no "URL" string is added to the output) -%% ================================================================================================ -%% This was file `titto-lncs-01.bst' produced on Fri Aug 22, 2008 -%% Edited by hand by titto based on `titto.bst' (see below) -%% -%% CHANGES (with respect to titto.bst): -%% - Removed the "capitalize" command for editors string "(eds.)" and "(ed.)" -%% - Introduced the functions titto.bbl.pages and titto.bbl.page for journal pages (without "pp.") -%% - Added a new.sentence command to separate with a dot booktitle and series in the inproceedings -%% - Commented all new.block commands before urls and notes (to separate them with a comma) -%% - Introduced the functions titto.bbl.volume for handling journal volumes (without "vol." label) -%% - Used for editors the same name conventions used for authors (see function format.in.ed.booktitle) -%% - Removed a \newblock to avoid long spaces between title and "In: ..." -%% - Added function titto.space.prefix to add a space instead of "~" after the (removed) "vol." label -%% - Added doi -%% ================================================================================================ -%% This was file `titto.bst', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% merlin.mbs (with options: `vonx,nm-rvvc,yr-par,jttl-rm,volp-com,jwdpg,jwdvol,numser,ser-vol,jnm-x,btit-rm,bt-rm,edparxc,bkedcap,au-col,in-col,fin-bare,pp,ed,abr,mth-bare,xedn,jabr,and-com,and-com-ed,xand,url,url-blk,em-x,nfss,') -%% ---------------------------------------- -%% *** Tentative .bst file for Springer LNCS *** -%% -%% Copyright 1994-2007 Patrick W Daly - % =============================================================== - % IMPORTANT NOTICE: - % This bibliographic style (bst) file has been generated from one or - % more master bibliographic style (mbs) files, listed above. - % - % This generated file can be redistributed and/or modified under the terms - % of the LaTeX Project Public License Distributed from CTAN - % archives in directory macros/latex/base/lppl.txt; either - % version 1 of the License, or any later version. - % =============================================================== - % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2007/04/24 4.20 (PWD, AO, DPC)] - % For use with BibTeX version 0.99a or later - %------------------------------------------------------------------- - % This bibliography style file is intended for texts in ENGLISH - % This is a numerical citation style, and as such is standard LaTeX. - % It requires no extra package to interface to the main text. - % The form of the \bibitem entries is - % \bibitem{key}... - % Usage of \cite is as follows: - % \cite{key} ==>> [#] - % \cite[chap. 2]{key} ==>> [#, chap. 2] - % where # is a number determined by the ordering in the reference list. - % The order in the reference list is alphabetical by authors. - %--------------------------------------------------------------------- - -ENTRY - { address - author - booktitle - chapter - doi - edition - editor - eid - howpublished - institution - journal - key - month - note - number - organization - pages - publisher - school - series - title - type - url - volume - year - } - {} - { label } -INTEGERS { output.state before.all mid.sentence after.sentence after.block } -FUNCTION {init.state.consts} -{ #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := -} -STRINGS { s t} -FUNCTION {output.nonnull} -{ 's := - output.state mid.sentence = - { ", " * write$ } - { output.state after.block = - { add.period$ write$ -% newline$ -% "\newblock " write$ % removed for titto-lncs-01 - " " write$ % to avoid long spaces between title and "In: ..." - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s -} -FUNCTION {output} -{ duplicate$ empty$ - 'pop$ - 'output.nonnull - if$ -} -FUNCTION {output.check} -{ 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull - if$ -} -FUNCTION {fin.entry} -{ duplicate$ empty$ - 'pop$ - 'write$ - if$ - newline$ -} - -FUNCTION {new.block} -{ output.state before.all = - 'skip$ - { after.block 'output.state := } - if$ -} -FUNCTION {new.sentence} -{ output.state after.block = - 'skip$ - { output.state before.all = - 'skip$ - { after.sentence 'output.state := } - if$ - } - if$ -} -FUNCTION {add.blank} -{ " " * before.all 'output.state := -} - - -FUNCTION {add.colon} -{ duplicate$ empty$ - 'skip$ - { ":" * add.blank } - if$ -} - -FUNCTION {date.block} -{ - new.block -} - -FUNCTION {not} -{ { #0 } - { #1 } - if$ -} -FUNCTION {and} -{ 'skip$ - { pop$ #0 } - if$ -} -FUNCTION {or} -{ { pop$ #1 } - 'skip$ - if$ -} -STRINGS {z} -FUNCTION {remove.dots} -{ 'z := - "" - { z empty$ not } - { z #1 #1 substring$ - z #2 global.max$ substring$ 'z := - duplicate$ "." = 'pop$ - { * } - if$ - } - while$ -} -FUNCTION {new.block.checka} -{ empty$ - 'skip$ - 'new.block - if$ -} -FUNCTION {new.block.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ -} -FUNCTION {new.sentence.checka} -{ empty$ - 'skip$ - 'new.sentence - if$ -} -FUNCTION {new.sentence.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ -} -FUNCTION {field.or.null} -{ duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ -} -FUNCTION {emphasize} -{ skip$ } - -FUNCTION {embolden} -{ duplicate$ empty$ -{ pop$ "" } -{ "\textbf{" swap$ * "}" * } -if$ -} -FUNCTION {tie.or.space.prefix} -{ duplicate$ text.length$ #5 < - { "~" } - { " " } - if$ - swap$ -} -FUNCTION {titto.space.prefix} % always introduce a space -{ duplicate$ text.length$ #3 < - { " " } - { " " } - if$ - swap$ -} - - -FUNCTION {capitalize} -{ "u" change.case$ "t" change.case$ } - -FUNCTION {space.word} -{ " " swap$ * " " * } - % Here are the language-specific definitions for explicit words. - % Each function has a name bbl.xxx where xxx is the English word. - % The language selected here is ENGLISH -FUNCTION {bbl.and} -{ "and"} - -FUNCTION {bbl.etal} -{ "et~al." } - -FUNCTION {bbl.editors} -{ "eds." } - -FUNCTION {bbl.editor} -{ "ed." } - -FUNCTION {bbl.edby} -{ "edited by" } - -FUNCTION {bbl.edition} -{ "edn." } - -FUNCTION {bbl.volume} -{ "vol." } - -FUNCTION {titto.bbl.volume} % for handling journals -{ "" } - -FUNCTION {bbl.of} -{ "of" } - -FUNCTION {bbl.number} -{ "no." } - -FUNCTION {bbl.nr} -{ "no." } - -FUNCTION {bbl.in} -{ "in" } - -FUNCTION {bbl.pages} -{ "pp." } - -FUNCTION {bbl.page} -{ "p." } - -FUNCTION {titto.bbl.pages} % for journals -{ "" } - -FUNCTION {titto.bbl.page} % for journals -{ "" } - -FUNCTION {bbl.chapter} -{ "chap." } - -FUNCTION {bbl.techrep} -{ "Tech. Rep." } - -FUNCTION {bbl.mthesis} -{ "Master's thesis" } - -FUNCTION {bbl.phdthesis} -{ "Ph.D. thesis" } - -MACRO {jan} {"Jan."} - -MACRO {feb} {"Feb."} - -MACRO {mar} {"Mar."} - -MACRO {apr} {"Apr."} - -MACRO {may} {"May"} - -MACRO {jun} {"Jun."} - -MACRO {jul} {"Jul."} - -MACRO {aug} {"Aug."} - -MACRO {sep} {"Sep."} - -MACRO {oct} {"Oct."} - -MACRO {nov} {"Nov."} - -MACRO {dec} {"Dec."} - -MACRO {acmcs} {"ACM Comput. Surv."} - -MACRO {acta} {"Acta Inf."} - -MACRO {cacm} {"Commun. ACM"} - -MACRO {ibmjrd} {"IBM J. Res. Dev."} - -MACRO {ibmsj} {"IBM Syst.~J."} - -MACRO {ieeese} {"IEEE Trans. Software Eng."} - -MACRO {ieeetc} {"IEEE Trans. Comput."} - -MACRO {ieeetcad} - {"IEEE Trans. Comput. Aid. Des."} - -MACRO {ipl} {"Inf. Process. Lett."} - -MACRO {jacm} {"J.~ACM"} - -MACRO {jcss} {"J.~Comput. Syst. Sci."} - -MACRO {scp} {"Sci. Comput. Program."} - -MACRO {sicomp} {"SIAM J. Comput."} - -MACRO {tocs} {"ACM Trans. Comput. Syst."} - -MACRO {tods} {"ACM Trans. Database Syst."} - -MACRO {tog} {"ACM Trans. Graphic."} - -MACRO {toms} {"ACM Trans. Math. Software"} - -MACRO {toois} {"ACM Trans. Office Inf. Syst."} - -MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} - -MACRO {tcs} {"Theor. Comput. Sci."} - -FUNCTION {bibinfo.check} -{ swap$ - duplicate$ missing$ - { - pop$ pop$ - "" - } - { duplicate$ empty$ - { - swap$ pop$ - } - { swap$ - pop$ - } - if$ - } - if$ -} -FUNCTION {bibinfo.warn} -{ swap$ - duplicate$ missing$ - { - swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ - "" - } - { duplicate$ empty$ - { - swap$ "empty " swap$ * " in " * cite$ * warning$ - } - { swap$ - pop$ - } - if$ - } - if$ -} -FUNCTION {format.url} -{ url empty$ - { "" } -% { "\urlprefix\url{" url * "}" * } - { "\url{" url * "}" * } % changed in titto-lncs-02.bst - if$ -} - -FUNCTION {format.doi} % added in splncs04.bst -{ doi empty$ - { "" } - { after.block 'output.state := - "\doi{" doi * "}" * } - if$ -} - -INTEGERS { nameptr namesleft numnames } - - -STRINGS { bibinfo} - -FUNCTION {format.names} -{ 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{vv~}{ll}{, jj}{, f{.}.}" - format.name$ - bibinfo bibinfo.check - 't := - nameptr #1 > - { - namesleft #1 > - { ", " * t * } - { - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - "," * - t "others" = - { - " " * bbl.etal * - } - { " " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } if$ -} -FUNCTION {format.names.ed} -{ - 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{f{.}.~}{vv~}{ll}{ jj}" - format.name$ - bibinfo bibinfo.check - 't := - nameptr #1 > - { - namesleft #1 > - { ", " * t * } - { - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - "," * - t "others" = - { - - " " * bbl.etal * - } - { " " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } if$ -} -FUNCTION {format.authors} -{ author "author" format.names -} -FUNCTION {get.bbl.editor} -{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } - -FUNCTION {format.editors} -{ editor "editor" format.names duplicate$ empty$ 'skip$ - { - " " * - get.bbl.editor -% capitalize - "(" swap$ * ")" * - * - } - if$ -} -FUNCTION {format.note} -{ - note empty$ - { "" } - { note #1 #1 substring$ - duplicate$ "{" = - 'skip$ - { output.state mid.sentence = - { "l" } - { "u" } - if$ - change.case$ - } - if$ - note #2 global.max$ substring$ * "note" bibinfo.check - } - if$ -} - -FUNCTION {format.title} -{ title - duplicate$ empty$ 'skip$ - { "t" change.case$ } - if$ - "title" bibinfo.check -} -FUNCTION {output.bibitem} -{ newline$ - "\bibitem{" write$ - cite$ write$ - "}" write$ - newline$ - "" - before.all 'output.state := -} - -FUNCTION {n.dashify} -{ - 't := - "" - { t empty$ not } - { t #1 #1 substring$ "-" = - { t #1 #2 substring$ "--" = not - { "--" * - t #2 global.max$ substring$ 't := - } - { { t #1 #1 substring$ "-" = } - { "-" * - t #2 global.max$ substring$ 't := - } - while$ - } - if$ - } - { t #1 #1 substring$ * - t #2 global.max$ substring$ 't := - } - if$ - } - while$ -} - -FUNCTION {word.in} -{ bbl.in capitalize - ":" * - " " * } - -FUNCTION {format.date} -{ - month "month" bibinfo.check - duplicate$ empty$ - year "year" bibinfo.check duplicate$ empty$ - { swap$ 'skip$ - { "there's a month but no year in " cite$ * warning$ } - if$ - * - } - { swap$ 'skip$ - { - swap$ - " " * swap$ - } - if$ - * - remove.dots - } - if$ - duplicate$ empty$ - 'skip$ - { - before.all 'output.state := - " (" swap$ * ")" * - } - if$ -} -FUNCTION {format.btitle} -{ title "title" bibinfo.check - duplicate$ empty$ 'skip$ - { - } - if$ -} -FUNCTION {either.or.check} -{ empty$ - 'pop$ - { "can't use both " swap$ * " fields in " * cite$ * warning$ } - if$ -} -FUNCTION {format.bvolume} -{ volume empty$ - { "" } - { bbl.volume volume tie.or.space.prefix - "volume" bibinfo.check * * - series "series" bibinfo.check - duplicate$ empty$ 'pop$ - { emphasize ", " * swap$ * } - if$ - "volume and number" number either.or.check - } - if$ -} -FUNCTION {format.number.series} -{ volume empty$ - { number empty$ - { series field.or.null } - { output.state mid.sentence = - { bbl.number } - { bbl.number capitalize } - if$ - number tie.or.space.prefix "number" bibinfo.check * * - series empty$ - { "there's a number but no series in " cite$ * warning$ } - { bbl.in space.word * - series "series" bibinfo.check * - } - if$ - } - if$ - } - { "" } - if$ -} - -FUNCTION {format.edition} -{ edition duplicate$ empty$ 'skip$ - { - output.state mid.sentence = - { "l" } - { "t" } - if$ change.case$ - "edition" bibinfo.check - " " * bbl.edition * - } - if$ -} -INTEGERS { multiresult } -FUNCTION {multi.page.check} -{ 't := - #0 'multiresult := - { multiresult not - t empty$ not - and - } - { t #1 #1 substring$ - duplicate$ "-" = - swap$ duplicate$ "," = - swap$ "+" = - or or - { #1 'multiresult := } - { t #2 global.max$ substring$ 't := } - if$ - } - while$ - multiresult -} -FUNCTION {format.pages} -{ pages duplicate$ empty$ 'skip$ - { duplicate$ multi.page.check - { - bbl.pages swap$ - n.dashify - } - { - bbl.page swap$ - } - if$ - tie.or.space.prefix - "pages" bibinfo.check - * * - } - if$ -} -FUNCTION {format.journal.pages} -{ pages duplicate$ empty$ 'pop$ - { swap$ duplicate$ empty$ - { pop$ pop$ format.pages } - { - ", " * - swap$ - n.dashify - pages multi.page.check - 'titto.bbl.pages - 'titto.bbl.page - if$ - swap$ tie.or.space.prefix - "pages" bibinfo.check - * * - * - } - if$ - } - if$ -} -FUNCTION {format.journal.eid} -{ eid "eid" bibinfo.check - duplicate$ empty$ 'pop$ - { swap$ duplicate$ empty$ 'skip$ - { - ", " * - } - if$ - swap$ * - } - if$ -} -FUNCTION {format.vol.num.pages} % this function is used only for journal entries -{ volume field.or.null embolden - duplicate$ empty$ 'skip$ - { -% bbl.volume swap$ tie.or.space.prefix - titto.bbl.volume swap$ titto.space.prefix -% rationale for the change above: for journals you don't want "vol." label -% hence it does not make sense to attach the journal number to the label when -% it is short - "volume" bibinfo.check - * * - } - if$ - number "number" bibinfo.check duplicate$ empty$ 'skip$ - { - swap$ duplicate$ empty$ - { "there's a number but no volume in " cite$ * warning$ } - 'skip$ - if$ - swap$ - "(" swap$ * ")" * - } - if$ * - eid empty$ - { format.journal.pages } - { format.journal.eid } - if$ -} - -FUNCTION {format.chapter.pages} -{ chapter empty$ - 'format.pages - { type empty$ - { bbl.chapter } - { type "l" change.case$ - "type" bibinfo.check - } - if$ - chapter tie.or.space.prefix - "chapter" bibinfo.check - * * - pages empty$ - 'skip$ - { ", " * format.pages * } - if$ - } - if$ -} - -FUNCTION {format.booktitle} -{ - booktitle "booktitle" bibinfo.check -} -FUNCTION {format.in.ed.booktitle} -{ format.booktitle duplicate$ empty$ 'skip$ - { -% editor "editor" format.names.ed duplicate$ empty$ 'pop$ % changed by titto - editor "editor" format.names duplicate$ empty$ 'pop$ - { - " " * - get.bbl.editor -% capitalize - "(" swap$ * ") " * - * swap$ - * } - if$ - word.in swap$ * - } - if$ -} -FUNCTION {empty.misc.check} -{ author empty$ title empty$ howpublished empty$ - month empty$ year empty$ note empty$ - and and and and and - key empty$ not and - { "all relevant fields are empty in " cite$ * warning$ } - 'skip$ - if$ -} -FUNCTION {format.thesis.type} -{ type duplicate$ empty$ - 'pop$ - { swap$ pop$ - "t" change.case$ "type" bibinfo.check - } - if$ -} -FUNCTION {format.tr.number} -{ number "number" bibinfo.check - type duplicate$ empty$ - { pop$ bbl.techrep } - 'skip$ - if$ - "type" bibinfo.check - swap$ duplicate$ empty$ - { pop$ "t" change.case$ } - { tie.or.space.prefix * * } - if$ -} -FUNCTION {format.article.crossref} -{ - key duplicate$ empty$ - { pop$ - journal duplicate$ empty$ - { "need key or journal for " cite$ * " to crossref " * crossref * warning$ } - { "journal" bibinfo.check emphasize word.in swap$ * } - if$ - } - { word.in swap$ * " " *} - if$ - " \cite{" * crossref * "}" * -} -FUNCTION {format.crossref.editor} -{ editor #1 "{vv~}{ll}" format.name$ - "editor" bibinfo.check - editor num.names$ duplicate$ - #2 > - { pop$ - "editor" bibinfo.check - " " * bbl.etal - * - } - { #2 < - 'skip$ - { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { - "editor" bibinfo.check - " " * bbl.etal - * - } - { - bbl.and space.word - * editor #2 "{vv~}{ll}" format.name$ - "editor" bibinfo.check - * - } - if$ - } - if$ - } - if$ -} -FUNCTION {format.book.crossref} -{ volume duplicate$ empty$ - { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ - pop$ word.in - } - { bbl.volume - capitalize - swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * - } - if$ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { series empty$ - { "need editor, key, or series for " cite$ * " to crossref " * - crossref * warning$ - "" * - } - { series emphasize * } - if$ - } - { key * } - if$ - } - { format.crossref.editor * } - if$ - " \cite{" * crossref * "}" * -} -FUNCTION {format.incoll.inproc.crossref} -{ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { format.booktitle duplicate$ empty$ - { "need editor, key, or booktitle for " cite$ * " to crossref " * - crossref * warning$ - } - { word.in swap$ * } - if$ - } - { word.in key * " " *} - if$ - } - { word.in format.crossref.editor * " " *} - if$ - " \cite{" * crossref * "}" * -} -FUNCTION {format.org.or.pub} -{ 't := - "" - address empty$ t empty$ and - 'skip$ - { - t empty$ - { address "address" bibinfo.check * - } - { t * - address empty$ - 'skip$ - { ", " * address "address" bibinfo.check * } - if$ - } - if$ - } - if$ -} -FUNCTION {format.publisher.address} -{ publisher "publisher" bibinfo.warn format.org.or.pub -} - -FUNCTION {format.organization.address} -{ organization "organization" bibinfo.check format.org.or.pub -} - -FUNCTION {article} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - new.block - crossref missing$ - { - journal - "journal" bibinfo.check - "journal" output.check - add.blank - format.vol.num.pages output - format.date "year" output.check - } - { format.article.crossref output.nonnull - format.pages output - } - if$ -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {book} -{ output.bibitem - author empty$ - { format.editors "author and editor" output.check - add.colon - } - { format.authors output.nonnull - add.colon - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - new.block - format.btitle "title" output.check - crossref missing$ - { format.bvolume output - new.block - new.sentence - format.number.series output - format.publisher.address output - } - { - new.block - format.book.crossref output.nonnull - } - if$ - format.edition output - format.date "year" output.check -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {booklet} -{ output.bibitem - format.authors output - add.colon - new.block - format.title "title" output.check - new.block - howpublished "howpublished" bibinfo.check output - address "address" bibinfo.check output - format.date output -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {inbook} -{ output.bibitem - author empty$ - { format.editors "author and editor" output.check - add.colon - } - { format.authors output.nonnull - add.colon - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - new.block - format.btitle "title" output.check - crossref missing$ - { - format.bvolume output - format.chapter.pages "chapter and pages" output.check - new.block - new.sentence - format.number.series output - format.publisher.address output - } - { - format.chapter.pages "chapter and pages" output.check - new.block - format.book.crossref output.nonnull - } - if$ - format.edition output - format.date "year" output.check -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {incollection} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle "booktitle" output.check - format.bvolume output - format.chapter.pages output - new.sentence - format.number.series output - format.publisher.address output - format.edition output - format.date "year" output.check - } - { format.incoll.inproc.crossref output.nonnull - format.chapter.pages output - } - if$ -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {inproceedings} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle "booktitle" output.check - new.sentence % added by titto - format.bvolume output - format.pages output - new.sentence - format.number.series output - publisher empty$ - { format.organization.address output } - { organization "organization" bibinfo.check output - format.publisher.address output - } - if$ - format.date "year" output.check - } - { format.incoll.inproc.crossref output.nonnull - format.pages output - } - if$ -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {conference} { inproceedings } -FUNCTION {manual} -{ output.bibitem - author empty$ - { organization "organization" bibinfo.check - duplicate$ empty$ 'pop$ - { output - address "address" bibinfo.check output - } - if$ - } - { format.authors output.nonnull } - if$ - add.colon - new.block - format.btitle "title" output.check - author empty$ - { organization empty$ - { - address new.block.checka - address "address" bibinfo.check output - } - 'skip$ - if$ - } - { - organization address new.block.checkb - organization "organization" bibinfo.check output - address "address" bibinfo.check output - } - if$ - format.edition output - format.date output -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {mastersthesis} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.btitle - "title" output.check - new.block - bbl.mthesis format.thesis.type output.nonnull - school "school" bibinfo.warn output - address "address" bibinfo.check output - format.date "year" output.check -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {misc} -{ output.bibitem - format.authors output - add.colon - title howpublished new.block.checkb - format.title output - howpublished new.block.checka - howpublished "howpublished" bibinfo.check output - format.date output -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry - empty.misc.check -} -FUNCTION {phdthesis} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.btitle - "title" output.check - new.block - bbl.phdthesis format.thesis.type output.nonnull - school "school" bibinfo.warn output - address "address" bibinfo.check output - format.date "year" output.check -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {proceedings} -{ output.bibitem - editor empty$ - { organization "organization" bibinfo.check output - } - { format.editors output.nonnull } - if$ - add.colon - new.block - format.btitle "title" output.check - format.bvolume output - editor empty$ - { publisher empty$ - { format.number.series output } - { - new.sentence - format.number.series output - format.publisher.address output - } - if$ - } - { publisher empty$ - { - new.sentence - format.number.series output - format.organization.address output } - { - new.sentence - format.number.series output - organization "organization" bibinfo.check output - format.publisher.address output - } - if$ - } - if$ - format.date "year" output.check -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {techreport} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title - "title" output.check - new.block - format.tr.number output.nonnull - institution "institution" bibinfo.warn output - address "address" bibinfo.check output - format.date "year" output.check -% new.block - format.doi output - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {unpublished} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - format.date output -% new.block - format.url output -% new.block - format.note "note" output.check - fin.entry -} - -FUNCTION {default.type} { misc } -READ -FUNCTION {sortify} -{ purify$ - "l" change.case$ -} -INTEGERS { len } -FUNCTION {chop.word} -{ 's := - 'len := - s #1 len substring$ = - { s len #1 + global.max$ substring$ } - 's - if$ -} -FUNCTION {sort.format.names} -{ 's := - #1 'nameptr := - "" - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{ll{ }}{ ff{ }}{ jj{ }}" - format.name$ 't := - nameptr #1 > - { - " " * - namesleft #1 = t "others" = and - { "zzzzz" * } - { t sortify * } - if$ - } - { t sortify * } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ -} - -FUNCTION {sort.format.title} -{ 't := - "A " #2 - "An " #3 - "The " #4 t chop.word - chop.word - chop.word - sortify - #1 global.max$ substring$ -} -FUNCTION {author.sort} -{ author empty$ - { key empty$ - { "to sort, need author or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { author sort.format.names } - if$ -} -FUNCTION {author.editor.sort} -{ author empty$ - { editor empty$ - { key empty$ - { "to sort, need author, editor, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { editor sort.format.names } - if$ - } - { author sort.format.names } - if$ -} -FUNCTION {author.organization.sort} -{ author empty$ - { organization empty$ - { key empty$ - { "to sort, need author, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { "The " #4 organization chop.word sortify } - if$ - } - { author sort.format.names } - if$ -} -FUNCTION {editor.organization.sort} -{ editor empty$ - { organization empty$ - { key empty$ - { "to sort, need editor, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { "The " #4 organization chop.word sortify } - if$ - } - { editor sort.format.names } - if$ -} -FUNCTION {presort} -{ type$ "book" = - type$ "inbook" = - or - 'author.editor.sort - { type$ "proceedings" = - 'editor.organization.sort - { type$ "manual" = - 'author.organization.sort - 'author.sort - if$ - } - if$ - } - if$ - " " - * - year field.or.null sortify - * - " " - * - title field.or.null - sort.format.title - * - #1 entry.max$ substring$ - 'sort.key$ := -} -ITERATE {presort} -SORT -STRINGS { longest.label } -INTEGERS { number.label longest.label.width } -FUNCTION {initialize.longest.label} -{ "" 'longest.label := - #1 'number.label := - #0 'longest.label.width := -} -FUNCTION {longest.label.pass} -{ number.label int.to.str$ 'label := - number.label #1 + 'number.label := - label width$ longest.label.width > - { label 'longest.label := - label width$ 'longest.label.width := - } - 'skip$ - if$ -} -EXECUTE {initialize.longest.label} -ITERATE {longest.label.pass} -FUNCTION {begin.bib} -{ preamble$ empty$ - 'skip$ - { preamble$ write$ newline$ } - if$ - "\begin{thebibliography}{" longest.label * "}" * - write$ newline$ - "\providecommand{\url}[1]{\texttt{#1}}" - write$ newline$ - "\providecommand{\urlprefix}{URL }" - write$ newline$ - "\providecommand{\doi}[1]{https://doi.org/#1}" - write$ newline$ -} -EXECUTE {begin.bib} -EXECUTE {init.state.consts} -ITERATE {call.type$} -FUNCTION {end.bib} -{ newline$ - "\end{thebibliography}" write$ newline$ -} -EXECUTE {end.bib} -%% End of customized bst file -%% -%% End of file `titto.bst'. diff --git a/MICCAI2026-Latex-Template/tex/benchmark.tex b/MICCAI2026-Latex-Template/tex/benchmark.tex deleted file mode 100644 index 4adc7469..00000000 --- a/MICCAI2026-Latex-Template/tex/benchmark.tex +++ /dev/null @@ -1,167 +0,0 @@ - -In this work, we introduce \textbf{DiffBench} a standardized benchmark that unifies preprocessing and feature extraction, evaluates both -classical and deep learning models on regression and classification tasks over a rigorous evaluation protocol on multiple -public datasets. The overall structure is illustrated in Figure~\ref{fig:benchmark_overview}. - -\subsection{Datasets} -To ensure reproducibility, DiffBench leverages three publicly available datasets -covering both healthy and clinical populations. -\textbf{HCP}: The Human Connectome Project (HCP) Young Adult dataset \cite{van2013wu} targets sex and age. It includes -1,036 healthy subjects after filtering (474 males, 562 females; ages 22-37). -HCP data were acquired on a customized Siemens 3T Connectome scanner using a multi-shell Spin-Echo EPI sequence -(TR/TE = 5520/89.5 ms, 1.25 mm isotropic, multiband factor 3; $b$-values = 1000, 2000, 3000 s/mm$^2$, 90 directions/shell). -\textbf{Cam-CAN}: The Cambridge Centre for Ageing and Neuroscience (Cam-CAN) dataset \cite{shafto2014cambridge} targets -sex and age. It includes 629 healthy subjects (316 males, 313 females; ages 18-88), scanned on a Siemens 3T TIM Trio using -a 2D twice-refocused SE EPI sequence (TR/TE = 9100/104 ms, 2.0 mm isotropic; $b$-values = 1000, 2000 s/mm$^2$, 30 directions each). -\textbf{ABIDE II}: The Autism Brain Imaging Data Exchange II (ABIDE II) dataset \cite{di2017enhancing} targets Autism Spectrum -Disorder (ASD) diagnosis. -It includes 218 subjects (186 males, 32 females; ages 5-64), including 119 with ASD and 99 controls. -As a multi-site dataset, ABIDE II data were acquired on various 3T scanners with highly heterogeneous, site-specific -single-shell diffusion protocols. -Across the included sites, spatial resolutions range from 0.94 to 3.0 mm, TR/TE from 5200-20244/78-101 ms, $b$-values include -1000, 1500, and 2500 s/mm$^2$, and diffusion directions vary between 32 and 64. -This variability provides a realistic scenario for evaluating model robustness to scanner heterogeneity. - -% \begin{table*}[htbp] -% \centering -% \caption{Diffusion MRI acquisition parameters for HCP and Cam-CAN datasets.} -% \label{tab:acquisition_params} -% \begin{tabular}{lccccccccc} -% \toprule -% \textbf{Dataset} & \textbf{Sequence} & \textbf{TR/TE (ms)} & \textbf{Res. (mm)} & \textbf{FOV (mm)} & \textbf{Slices} & \textbf{$b$-values (s/mm$^2$)} & \textbf{Dirs.} & \textbf{Echo Sp. (ms)} & \textbf{MB} \\ -% \midrule -% \textbf{HCP} & SE EPI & 5520 / 89.5 & 1.25 iso & 210$\times$180 & 111 & 1000, 2000, 3000 & 90/shell & 0.78 & 3 \\ -% \textbf{Cam-CAN} & 2D SE EPI & 9100 / 104 & 2.0 iso & 192$\times$192 & 66 & 1000, 2000 & 30 & 0.72 & - \\ -% \bottomrule -% \end{tabular} -% \end{table*} - -% If space (unlikely): -% * PLOTS: Demographic distribution (age histograms) | Table with demographics summary (gender classes, age range...) -% \todo{One subsection for preprocessing and another for data prepraration} -% \todo{Remove himanshu's repo, and put it inside your code for anonymization + no need to use emph below, stick to standard font.} -\subsection{DiffBench Preprocessing} -Except for HCP, which is already preprocessed, dMRI data are preprocessed using the \texttt{anonymized} package\footnote{anonymized link} which containerises - various tools such as \texttt{dipy}~\cite{Garyfallidis2014}, \texttt{sMRIPrep}~\cite{esteban2019fmriprep}%\footnote{\url{https://github.com/nipreps/smriprep}} - , \texttt{FSL}~\cite{Smith2004}, -\texttt{ANTs}~\cite{Avants2009}, \texttt{FreeSurfer}~\cite{Dale1999a} and \texttt{AFNI}~\cite{Cox1996}. -% -The images are first denoised with the Marchenko-Pastur PCA (MPPCA) method \cite{Veraart2016a,Cordero-Grande2019} implemented in -\texttt{dipy}. -% -This denoising procedure identifies the principal components corresponding to noise and then removes them from the dMRI data \cite{Veraart2016a}. -% -After MPPCA denoising, Gibbs ringing artifacts \cite{Veraart2016b} are also removed with \texttt{dipy}. -% -Next, we correct the distortions due to inhomogeneities of the magnetic field with \texttt{FSL}'s eddy correction \cite{Andersson2016}. -% -Finally, this denoised and distortion-corrected dMRI data are registered to the anatomical T1w image preprocessed with \texttt{sMRIPrep}, using \texttt{FreeSurfer}'s \emph{bbregister} \cite{greve2009accurate} with 12 degrees of freedom and boundary-based registration cost function. - -\subsection{Data Preparation} -\noindent \textbf{Microstructural representation} -To characterize the diffusion signal, various microstructural measures from established diffusion models are implemented in DiffBench. -These measures capture complementary aspects of tissue architecture and have been widely used in previous studies \cite{hwang2021prediction,he2022model,chen2023deep,cardenas2025autism}, ranging from diffusion magnitude to more complex descriptors: -\begin{itemize} - \item \textbf{Baseline ($b=0$):} The averaged non-diffusion-weighted (T2w) signal is included as a - reference to disentangle diffusion-driven predictive effects from underlying structural - T2 contrast. - \item \textbf{Mean Diffusivity (MD):} MD is computed via Diffusion Tensor Imaging (DTI) \cite{basser1994mr}, and reflects - the overall magnitude of water diffusion. - \item \textbf{Mean Kurtosis (MK):} Mk is derived from Diffusion Kurtosis Imaging (DKI) \cite{jensen2005diffusional}, quantifies deviations from Gaussian - diffusion and acts as a proxy for microstructural heterogeneity and tissue complexity. - % \item \textbf{Return-To-Origin Probability (RTOP):} Estimated using a Laplacian-regularized Mean - % Apparent Propagator (MAP-MRI) model. RTOP reflects the probability of water molecules remaining in - % their initial position, serving as a strong indicator of cellular restriction and density. - \item \textbf{Spherical Harmonics (SH) Power:} SH is a model-free representation obtained by computing the - L2 norm of the SH coefficients \cite{tournier2004direct} fitted - to the diffusion signal (up to order 6). This representation especially captures signal anisotropy without - assuming a specific compartmental model. - % \item \textbf{Spherical Harmonics (SH) Power:} A model-free metric computed by least-squares - % projection of the b0-normalized signal $S(\mathbf{g})/S_0$ onto a real, symmetric SH basis - % ($\ell_{\max}{=}6$, 28 coefficients; Descoteaux~\textit{et al.}~\shortcite{descoteaux2007regularized} - % convention, \texttt{sf\_to\_sh} in DiPy~\shortcite{garyfallidis2014dipy}). The scalar is the - % $\ell_2$ norm $\|\mathbf{c}\|_2$, capturing angular complexity without any compartment model. -\end{itemize} -To mitigate free-water effects and scanner-dependent intensity scaling \cite{pasternak2009free}, we apply ventricular -normalization: for each subject and each microstructural representation, voxel-wise diffusion measures are divided by -the mean value extracted from cerebrospinal fluid within the ventricles. Finally, extreme values are clipped at the -99th percentile to ensure numerical stability during model training. \\ - - -\noindent \textbf{Spatial normalization} -We apply distinct spatial normalization strategies for gray and white matter to enable anatomically consistent comparisons across subjects and datasets while respecting tissue-specific geometry. - -\textit{Gray Matter.} -% \todo{Refs} -Gray matter microstructure is represented on the cortical surface reconstructed from T1w images with FreeSurfer. -Cortical meshes (white and pial surfaces) are parcellated with the Desikan–Killiany atlas \cite{desikan2006automated}. -Diffusion scalar maps are computed in the native diffusion space and rigidly aligned to the anatomical image. -Voxelwise diffusion measures are then projected onto the individual cortical surface with ribbon-constrained sampling, preserving vertex-wise resolution ($\sim64$k vertices per hemisphere) \cite{greve2009accurate}. -This surface-based strategy respects cortical geometry, reduces partial-volume effect, maintains high spatial specificity and enables consistent spatial normalization across subjects. - - -\textit{White Matter.} -White matter microstructure is represented with Tract-Based Spatial Statistics (TBSS) \cite{smith2006tract}. -Diffusion scalar maps are nonlinearly registered to standard space and projected onto a group-wise white matter skeleton, which captures the core of major fiber bundles and minimizes -residual misalignment and partial-volume effects. -Then, we summarize microstructural valuse by extracting the mean for 48 major tracts from the JHU White-Matter Tractography Atlas \cite{mori2008stereotaxic}. -This normalization enforces anatomical correspondence across subjects and reduces variability associated with subject-specific tractography. -While this approach sacrifices voxel-level granularity compared to the cortical surface representation, it provides a compact, reproducible, and anatomically interpretable feature set that is robust in multi-site settings. - - - -% White matter microstructure was summarized within a common tract space using a predefined tract -% dictionary derived from a standardized atlas-based segmentation (e.g., 48 major bundles). Diffusion -% scalar maps were computed voxelwise in native space and projected onto a template skeleton to ensure -% anatomical correspondence across subjects. For each tract, mean microstructural values were extracted, -% yielding a compact 48-dimensional representation per metric. This tract-averaged template-based -% strategy was selected to ensure cross-subject anatomical consistency, reduce variability arising from -% subject-specific tractography, and improve robustness in a benchmarking setting. Although this results -% in lower dimensionality compared to the vertex-wise cortical representation, it provides stable, -% reproducible white matter features aligned to homologous bundles across datasets. - -\subsection{Prediction and validation} -BenchDiff includes a broad range of predictive models previously used in dMRI studies \cite{wen2021reproducible,cardenas2025autism}, from classical machine learning pipelines to foundation models. -Classical models (Ridge, Lasso, Random Forests, and SVM), implemented in \texttt{scikit-learn}, can be combined with PCA for dimensionality reduction~\cite{menon2020microstructural}. -Recent foundation models, DINOv2 \cite{oquab2023dinov2} and Curia \cite{dancette2025curia}, implemented in \texttt{PyTorch}, are used as frozen feature extractors with task-specific prediction heads trained on top. -These models operate on 2D slices extracted along the x-axis. -In contrast, MedicalNet \cite{chen2019med3d} is applied to full 3D diffusion volumes, initialized from pretrained weights and fine-tuned end-to-end. -Deep models are trained using AdamW, with exponential learning-rate scheduling, dropout, and weight decay. -Hyperparameters are selected via cross-validation. -Details are fully available in the codebase. - -% BenchDiff includes a wide range of predictive models for dMRI, from classical machine learning pipelines to foundation models. -% Specifically, machine learning methods used in previous studies \cite{menon2020microstructural,wen2021reproducible} were implemented: linear models (e.g., logistic regression, Lasso), Random Forests, -% %\cite{breiman2001random} -% and Support Vector Machines (SVM). -% %\cite{hastie2009elements} -% Given the high dimensionality of the microstructural representations, we additionally assess these models combined with Principal Component Analysis (PCA) for dimensionality reduction as done in ~\cite{} - - -% Task selection rationale: Clinical relevance, data availability, and established benchmarks in the literature. -The prediction tasks covers classification and regression and were selected based on data availability and existing literature. -\textbf{Classification.} -BenchDiff includes binary classification tasks, such as Autism Spectrum Disorder (ASD) diagnosis (ASD vs. -Typically Developing) using ABIDE II \cite{cardenas2025autism}, and sex prediction in the HCP and Cam-CAN -cohorts \cite{chen2024deep,dibaji2024sex}. Performance is reported using balanced accuracy, which accounts for class imbalance. -\textbf{Regression.} Brain age prediction \cite{chen2020generalization,de2018age,hwang2021prediction} was used as a regression task on the healthy Cam-CAN cohort. -Performance is quantified with $R^2$ and mean absolute error (MAE). - -We adopt a stratified 5-fold cross-validation scheme for all tasks. -For classification, stratification ensures class balance across folds. For regression, splits are stratified by sex. -Random seeds are fixed to guarantee reproducibility. - -% To ensure rigorous model evaluation, we employ a stratified 5-fold cross-validation strategy for all tasks. -% Gender stratification maintains balanced target distributions across folds. To guarantee reproducibility, seeds are fixed. -% %Data splits are fixed through seed initialization to guarantee full reproducibility. -% %Strict separation between training and test data is enforced at every stage. -% To prevent data leakage, all data-driven operations (e.g., feature scaling, PCA, and hyperparameter tuning) are fitted exclusively on the training sets and applied to the held-out test set. - - -\subsection{Benchmark implementation} -To ensure reproducibility and fair comparison, the benchmark is implemented as an open-source, modular pipeline. -Configuration is handled with \texttt{Hydra}\footnote{https://github.com/facebookresearch/hydra}, enabling systematic control of data processing, training, and evaluation. -Data are organized according to the BIDS standard~\cite{gorgolewski2016brain}. -The framework supports parallel execution for data preparation and training with SLURM, and caches intermediate results to ensure efficient and reproducible experimentation. -% To ensure reproducibility and fair comparisons across models and datasets, the benchmark implementation is modular, fully configurable pipeline. All components are controlled via \texttt{Hydra} \cite{Yadan2019Hydra}, enabling systematic experiment management for data preparation, model training, and analysis. -% The data structure follows the BIDS standard \cite{gorgolewski2016brain}, ensuring consistent data organization and facilitating multi-site analyses, with site identity available as a covariate. The framework provides command-line entry points and supports parallel execution via \texttt{joblib} or SLURM. Intermediate outputs as microstructural features, deep learning embeddings, and per-fold scores, are cached to disk, avoiding redundant computation across iterative runs. \ No newline at end of file diff --git a/MICCAI2026-Latex-Template/tex/conclusion.tex b/MICCAI2026-Latex-Template/tex/conclusion.tex deleted file mode 100644 index 5fccfd4d..00000000 --- a/MICCAI2026-Latex-Template/tex/conclusion.tex +++ /dev/null @@ -1,69 +0,0 @@ -% \todo{Need to be less assertive and more precise in the conclusion, and also talk about future work.} - - -In this work, we addressed a central limitation in dMRI prediction: the lack of controlled, comparable evaluation across preprocessing choices, microstructural representations, tissues, models, and datasets. -By introducing DiffBench, a unified and open benchmark spanning heterogeneous datasets and tasks, we separate configuration-driven variability from modeling effects. -Our analysis demonstrates that performance differences are often as sensitive to representation and preprocessing choices as to model family, clarifying why prior results have been difficult to compare or reproduce. -Rather than providing isolated performance gains, DiffBench allows to quantify robustness, generalization, and the true added value of diffusion-derived features. -Future work will extend the benchmark to additional datasets and predictive tasks. -We also plan to explore other microstructural representations, enable region-level analyses to better localize predictive signal and integrate harmonization methods to better assess cross-dataset generalization -We see DiffBench as an evolving infrastructure to support reproducible, cumulative progress in dMRI–based predictive modeling. - - - - -% We introduced DiffBench, a dMRI benchmark for demographics prediction in -% individuals across three datasets: Human Connectome Project, Cambridge Centre for -% Ageing and Neuroscience, and Autism Brain Imaging Data Exchange. Within a unified experimental framework, -% we systematically compared multiple microstructural representations (b0, MD, SH, MK) and model families -% spanning from linear to deep learning -% models. By controlling preprocessing, model selection, and evaluation procedures, the benchmark enables -% comparison across configurations and reduces methodological heterogeneity simplifying more transparent -% and reproducible comparisons in diffusion MRI prediction studies. - -% % Across datasets, we observe that -% % representational and tissue-level choices can influence performance as strongly as model complexity, -% % and that fold-level variability frequently rivals mean performance differences. These findings suggest -% % that reported gains in diffusion MRI prediction tasks should be interpreted with caution when not -% % evaluated under standardized and variance-aware settings. By releasing a reproducible end-to-end -% % framework, this work represents a step toward methodological unification and transparent benchmarking -% % in microstructure-based prediction. - -% Our results suggest that predictive performance in diffusion MRI is highly configuration-dependent. -% In several settings, regularized linear models performed similarly to more complex approaches. More importantly, -% variability across folds, tissue types, and microstructural representations was often comparable to, or larger than, mean -% performance differences. Tissue type preferences were task-specific %(e.g., gray matter predominance in autism classification, -% %white matter predominance in age prediction, no clear advantage in gender prediction) -% , and most microstructural features -% do not exhibit universal superiority. Diffusion-derived metrics provide measurable gains only in tasks -% closely aligned with microstructural variation, whereas for proxy tasks, non-diffusion signal can be -% equally informative. -% % These observations align with previous work showing that reported improvements can depend heavily on experimental choices and cohort characteristics. - -% This benchmark should not be interpreted as a definitive comparison of models or features, but rather as a controlled reference point. -% The included datasets, although widely used, remain moderate in size for modern machine learning, especially for deep learning -% approaches that typically require larger cohorts or fine-tuning. In addition, the current analysis focuses on within-dataset -% evaluation. The ability of models and representations to generalize across cohorts, scanners, and acquisition protocols remains an open question. -% This aspect was intentionally left outside the scope of the present work in order to maintain a clear focus on controlled within-dataset evaluation. - -% % This work deliberately prioritizes controlled within-dataset evaluation to establish internal -% % robustness under standardized conditions. Future extensions should assess cross-cohort transferability, -% % broader prediction targets, and alternative preprocessing strategies to determine whether observed -% % variability is amplified or mitigated under distributional shift. - -% % Ultimately, we hope this framework encourages a shift from isolated, configuration-specific reporting -% % toward reproducible, variance-aware analysis, and transparent methodological reporting in diffusion MRI. -% % Establishing shared benchmarks and -% % open implementations is a necessary step toward methodological unification and more reliable -% % neuroimaging-based prediction. - -% Several directions for future work follow naturally from these limitations. First, expanding the benchmark to include additional -% and larger datasets would improve statistical power and allow stronger conclusions, particularly for deep learning methods. Second, -% incorporating more clinically focused datasets with well-defined diagnostic outcomes could help clarify the clinical relevance of -% diffusion-derived features. Third, harmonization strategies across scanners and sites should be systematically evaluated, as variability -% in acquisition and preprocessing may substantially influence predictive performance. Finally, cross-cohort validation and domain adaptation -% experiments would help determine whether observed effects are stable under distributional shift. - -% Overall, we hope this benchmark contributes to ongoing efforts in the field toward more structured, reproducible, and variance-aware -% evaluation of diffusion MRI prediction models. By providing an open and controlled framework, this work aims to complement prior studies -% and support future investigations that build on shared standards. \ No newline at end of file diff --git a/MICCAI2026-Latex-Template/tex/introduction.tex b/MICCAI2026-Latex-Template/tex/introduction.tex deleted file mode 100644 index 610c3eb6..00000000 --- a/MICCAI2026-Latex-Template/tex/introduction.tex +++ /dev/null @@ -1,35 +0,0 @@ - -Diffusion magnetic resonance imaging (dMRI) enables in vivo representation of tissue microstructure and provides biologically meaningful biomarkers sensitive to axonal organization, myelination, and tissue complexity \cite{novikov2019quantifying}. -Leveraging these microstructural descriptors for predictive modeling has become increasingly common, with applications ranging from demographic estimation~\cite{chen2024deep,he2022model,chen2020generalization,de2018age,dibaji2024sex}, clinical diagnosis~\cite{egle2022prediction,wen2021reproducible}, and cognitive characterization \cite{kotikalapudi2025replicability,menon2020microstructural}. -The combination of diffusion imaging and machine learning is therefore often viewed as a powerful framework for data-driven neurobiological inference. - - -While many studies demonstrate the promising predictive power of dMRI, reported performance varies widely across studies, tasks, and datasets, making direct comparisons difficult. -This variability arises from multiple sources. -Preprocessing pipelines differ substantially, microstructural information is represented in diverse ways ranging from voxel-wise maps~\cite{chen2024deep} and ROI summaries~\cite{menon2020microstructural} to learned embeddings~\cite{chen2023deep,he2022model} and evaluation protocols vary in data splits, cross-validation schemes, and hyperparameter selection. -Limited code and configuration sharing further restrict reproducibility. -Consequently, reported performance differences may reflect inconsistencies in implementation and evaluation rather than genuine modeling improvements. - -Addressing replication challenges in brain structure–behavior research~\cite{wu2023challenges,genon2022linking,rosenblatt2024power}, it is essential to control of these methodological sources of variability and comparable evaluation standards for dMRI prediction. -Accordingly, there has been increasing interest in reproducible benchmarking frameworks within specific clinical contexts or imaging modalities~\cite{wen2021reproducible}, and large-scale analyses have assessed the replicability of dMRI-based brain–behavior associations across phenotypes~\cite{rosenblatt2024power}. -However, these efforts do not jointly vary microstructural representations, tissue compartments, model families, datasets, and predictive tasks within a unified experimental design. -As a result, several fundamental questions remain unsolved: how representation and model choice interact with task characteristics, whether white and gray matter contribute differently across datasets and prediction targets, and under what conditions diffusion-derived features provide consistent predictive value beyond non-diffusion baselines. - - - -\begin{figure}[t!] - \centering - \includegraphics[width=\textwidth]{scheme.pdf} - \caption{Overview of the proposed diffusion MRI benchmark pipeline end-to-end.} - \label{fig:benchmark_overview} -\end{figure} - -To address these limitations, we introduce \textbf{DiffBench}, an open-source, and reproducible benchmark for dMRI prediction. -DiffBench enables controlled comparison of preprocessing, spatial normalization, microstructural representation, model family, and validation within a unified framework applied across multiple public datasets. -Specifically, DiffBench (i) unifies preprocessing across cohorts; (ii) compares various tissue-specific microstructural representations; (iii) includes classical machine learning models and deep foundation architectures; and (iv) evaluates performance across classification and regression tasks. -Our analysis shows that performance differences are often as sensitive to representation and preprocessing choices as to model family, highlighting the need for a standardized benchmark. - - -% Diffbench enables controlled comparison across datasets, tissue types, microstructural representations, and model families. -% The benchmark explicitly quantifies performance variability across folds and configurations, isolates representation and tissue-specific effects, and evaluates the value of diffusion-derived features beyond non-diffusion baselines. -% We believe this provides the foundation for isolating microstructural signal from configuration-driven variability and for establishing comparable evaluation standards in diffusion MRI prediction. diff --git a/MICCAI2026-Latex-Template/tex/results.tex b/MICCAI2026-Latex-Template/tex/results.tex deleted file mode 100644 index ce529250..00000000 --- a/MICCAI2026-Latex-Template/tex/results.tex +++ /dev/null @@ -1,136 +0,0 @@ -% We evaluate the extent to which diffusion MRI microstructural features enable robust prediction of -% demographic and clinical variables across model families, feature representations, and cross-validation -% folds. Beyond absolute performance, we explicitly analyze performance variability to assess the stability -% and generalizability of different configurations. -\begin{figure}[t!] - \centering - \includegraphics[width=\textwidth]{../exp_outputs/summary/plots/folds/combined_model_vs_prep.pdf} - \caption{ - \textit{(Left)} Model-family performance normalized across metrics and folds (dummy = 0, perfect = 1) reveals no consistent advantage of any model class. - \textit{(Right)} Preprocessing sensitivity across (feature, tissue) configurations demonstrates that performance strongly depends on representation and tissue selection. - } - \label{fig:model_family} -\end{figure} - -We evaluated the predictive power of dMRI microstructural representations across datasets, tasks, tissue types, and model families to assess performance stability, tissue specific contributions, and the added value of diffusion-derived microstructural features -beyond non-diffusion baselines. - -% Figure \ref{fig:model_family} reveals two important patterns. First, regularized linear models consistently -% perform on par with deep learning approaches, despite their lower representational capacity. While deep -% architectures achieve competitive performance, the gap between model families is often smaller than expected, -% suggesting that microstructural feature representation may be as critical as model complexity. Second, and more remarkably, -% we observe substantial variance in prediction performance across models and microstructural -% parameterizations. In several settings, this variability exceeds \textbf{the mean difference between model families}, -% indicating that conclusions drawn from a single model or microstructural representation may be unstable. These findings -% underscore the importance of reporting variability and evaluating robustness across configurations when -% assessing predictive performance in diffusion MRI. -Figure \ref{fig:model_family} highlights two central findings. -First we evaluated the relative performance of different model families across datasets and configurations. -To enable direct comparison across tasks, performance metrics were rescaled using min–max normalization relative to a dummy baseline that predicts the training-set mean (for regression) or majority class (for classification). -The results show that no single model consistently outperforms the others, and that regularized linear models remain competitive with deep learning architectures. -This suggests that current data representations may not fully exploit the representational capacity of deep models, or that they are not sufficiently informative to justify increased model complexity. -In the context of dMRI, limited sample sizes combined with high-dimensional signals further constrain the effective use of deep architectures -- e.g. ABIDE II includes only 218 samples. -Indeed, Curia and DINOv2 were employed as frozen feature extractors without fine-tuning, a transfer-learning regime that typically requires larger cohorts to achieve competitive performance. - -Second, preprocessing and microstructural choices introduce substantial variability. -In several tasks, differences across feature and tissue configurations exceed those between model families. -This indicates that performance cannot be attributed to model choice alone. -Preprocessing is a major source of variance, and conclusions from a single configuration may be unreliable, emphasizing the need for robustness analyses. - -\begin{figure}[t!] - \centering - \includegraphics[width=\textwidth]{../exp_outputs/summary/plots/folds/white_vs_gray_dataset_task_linear_rf_deep.pdf} - \caption{ - Fold-level paired differences ($\Delta = \text{white} - \text{gray}$) were computed under identical settings, after removing microstructural representation baseline effects. - Significance was assessed via a nonparametric paired bootstrap test with Benjamini–Hochberg FDR correction across all (dataset, task, model family) combinations ($\alpha$ = 0.05) - HCP favors white matter, CamCAN favors gray matter and no visible preference in ABIDE. - % \textit{(Right)} Dataset-level tissue effects after removing microstructural feature-specific baselines reveal strong dataset dependence (HCP favors white matter, CamCAN favors gray matter). - % \textit{(Left)} Microstructure-level effects after removing dataset–task baselines show no consistent tissue preference across representations. - } - \label{fig:white_vs_gray} -\end{figure} - - -\subsubsection{Impact of tissue type.} - -In Figure \ref{fig:white_vs_gray}, we quantify the impact of tissue type by comparing the performance of model families with white and gray matter for each (dataset, task) configuration. -As before, performance is min-max normalized relative to a dummy baseline and we compute $\Delta = \text{white} - \text{gray}$. -We remove microstructural representation baseline effects to isolate tissue differences within each (dataset, task) configuration. -Statistical inference is performed on fold-level paired differences for each configuration. -Significance is assessed using a nonparametric paired bootstrap test to assess whether the mean tissue effect differs from zero. -Resulting p-values are corrected for multiple comparisons using the Benjamini–Hochberg false discovery rate (FDR) procedure across all dataset, (task, model family) comparisons ($\alpha$ = 0.05). - -Figure \ref{fig:white_vs_gray} shows that tissue effects are strongly dataset-dependent. -In HCP, positive effect distributions indicate consistent white-matter superiority across configurations. -In contrast, CamCAN exhibits the opposite pattern, with gray matter showing a stable advantage. -For ABIDE, the distribution of differences is centered around zero, suggesting no clear -advantage of either tissue type. -% Moreover, no microstructural representation demonstrates a consistent tissue preference. - -\begin{figure} - \centering - \includegraphics[width=\textwidth]{../exp_outputs/summary/plots/features/feature_benefit_heatmap_robust_by_tissue.pdf} - \caption{ - Proportion of models outperforming the non-diffusion baseline (b0), stratified by task and microstructural feature, based on fold-level normalized differences ($\Delta = \text{microstructure feature} - \text{b0}$). - Given the large number of configurations and multiple comparisons, we adopt a robustness-based criterion (median $\Delta \geq 0.05$ and $\geq$80\% positive folds) rather than formal hypothesis testing. - Benefits are task-specific rather than universal. - } - \label{fig:feature_impact} -\end{figure} - -\subsubsection{Impact of diffusion microstructure features} - -To assess whether diffusion-derived microstructural features provide predictive value beyond -non-diffusion signal, we quantified model-wise improvements relative to b0. -Given the large number of configurations (datasets, tasks, model families, and features), formal hypothesis testing would require extensive multiple-comparison correction and provide limited interpretability. -Instead, we adopt a robustness-based criterion, defining consistent improvement as a median fold-level gain $\Delta \geq 0.05$ with at least 80\% of folds positive. -Under this criterion, microstructural information does not uniformly enhance performance across tasks or datasets. -For tasks such as sex classification in HCP and CamCAN, diffusion microstructural features do not confer a -systematic advantage over b0. -It suggests that non-diffusion signal --likely reflecting global -anatomical properties such as brain size-- already captures most of the discriminative information. -In contrast, tasks more directly linked to microstructural variation show measurable gains from -diffusion metrics. -Age prediction in CamCAN and diagnostic classification (DX\_GROUP) in ABIDE -exhibit consistent improvements for several diffusion representations, particularly under linear -models operating on array-based features. - -Deep learning models demonstrate positive gains in certain sex classification settings, likely -reflecting sensitivity to morphology encoded in image-based representations -rather than diffusion-specific contrast. Overall, these findings indicate that the added value of -dMRI depends strongly on the biological relevance of the task, the dataset characteristics, -and the modeling framework, rather than representing a universal performance boost. - -% \subsection{Within-Dataset Performance} -% \begin{itemize} -% \item Model/Feature/Tissue comparison -% \item Mean ± std of best run / model -% \item Statistical testing -% \item PLOT: Bar plots per dataset | Camcan-HCP comparison(? -% \end{itemize} - -% \subsection{Feature Representation Comparison} -% \begin{itemize} -% \item Gray vs white matter -% \item Microstructure metrics comparison -% \item PLOT: Tissue performance according to microostructure metric for task purposes | Microstructure features -% \end{itemize} - -% \subsection{"Handmade" vs DL embeddings} - -% \subsection{Training Size Analysis} -% * PLOT: Learning Curve - -% \subsection{Key Findings} -% \begin{itemize} -% \item Which models perform best? Which feature representations perform best? Tissue predominance in task prediction? -% \item Are simpler models sufficient? Are DL models necessary for predicting demographics? -% \item Stability across folds? -% \end{itemize} - -% \subsection{Methodological Insights} -% \begin{itemize} -% \item Importance of dimensionality control -% \item Effect of tract-based aggregation -% \item Risk of overfitting in mesh representations without PCA bcs of the high number of vertices representations -% \end{itemize} \ No newline at end of file diff --git a/MICCAI2026-Latex-Template/tex/reuben.tex b/MICCAI2026-Latex-Template/tex/reuben.tex deleted file mode 100644 index 5fc25f9e..00000000 --- a/MICCAI2026-Latex-Template/tex/reuben.tex +++ /dev/null @@ -1,157 +0,0 @@ -\section{Introduction (Reuben)} -\textbf{First paragraph:} -\begin{itemize} - \item Context: Diffusion MRI provides quantitative microstructural biomarkers - \item Increasing use of ML for prediction (age, diagnosis, cognition, etc.) - \item Lack of standardized benchmark -\end{itemize} - -\noindent \textbf{Second paragraph: literature review:} -\begin{itemize} - \item Literature review of techniques: Variability of the proposed approach (ML-based, deep-learning based etc) - \item Problems: High variability in reported performance across studies + Limited reproducibility -\end{itemize} - -\noindent \textbf{Third paragraph: reasons for these problems} -\begin{itemize} - \item Reason 1: Heterogeneous preprocessing pipelines - \item Reason 2: Inconsistent feature representations (voxel-wise vs ROI-based), not analysis cross microstructure features - \item Reason 3: Evaluation protocols not directly comparable + results on different datasets - \item Reason 4: Missing code - \item Our solution: "To address these challenges, we propose: 1) an open-source and standardized benchmark; 2) of various machine learning techniques in dMRI; 3) on several tasks (classification, regression) 4) encompassing N datasets -\end{itemize} - -\noindent \textbf{Fourth paragraph: your contributions} -\begin{itemize} - \item Standardized preprocessing pipeline for diffusion MRI - \item Implemented various representation of the microstructural input data - \item Unified feature extraction strategy - \item Controlled evaluation protocol (train/test splits) - \item Comparison of multiple feature representations - \item Integration of both classical and DL predictors - \item Public release of code and benchmark configuration - \item End-to-end analysis -\end{itemize} - -\section{Benchmark (Reuben)} -Start with a general introduction of this section that introduce each component of your benchmark + add a figure that presents an overview. - -\subsection{Datasets} -\begin{itemize} - \item Introduction sentence about why you picked these datasets - \item Introduce Number of subjects - \item Age range / demographics - \item Scanner details - \item Acquisition protocol or summary table with acquisition parameters - \item Prediction targets (classification/regression) -\end{itemize} -If space (unlikely): -* PLOTS: Demographic distribution (age histograms) | Table with demographics summary (gender classes, age range...) - -\subsection{Unified diffusion data preprocessing} -\subsubsection{Data preprocessing} -Following...., we propose to -\begin{itemize} - \item Denoising - \item Motion and eddy correction - \item Spatial normalization - \item Masking strategy -\end{itemize} - -\subsubsection{Microstructural Representation} -Explain here the different forms of input representation. -The word "feature representation" is ambigiuous because neural network also extract features in a data-driven way. That's why I would rather use the term like "Microstructural Representation". -Explain why differences between white and gray matter. Give references here about why there are differences. - -\paragraph{Gray Matter Representation} -\begin{itemize} - \item Voxel-wise features - \item High-dimensional representation (~64k features) - \item Mask-based extraction -\end{itemize} -Explain that voxel-wise features preserve spatial resolution but increase dimensionality and risk of overfitting. - -\paragraph{White Matter Representation} -\begin{itemize} - \item Tract-based aggregation - \item Mean values per tract (~48 features) - \item Reduced dimensionality - \item Anatomical interpretability -\end{itemize} -Justify tract-averaged representation: Noise reduction, improved stability, lower dimensional feature space, anatomically meaningful structure. - -\subsubsection{Microstructural normalization} - \begin{itemize} - \item Binary targets (encoded 0/1), Continuous targets (standardized during training) - \item Standardization fitted on training set only - \item Applied to validation/test sets - \item Inverse transform for regression outputs (for visualization) - \end{itemize} - -\subsection{Prediction models} - \begin{itemize} - \item Dummy baseline (e.g., majority class for classification, mean predictor for regression) - \item Classical ML pipeline: Linear models (e.g., logistic regression, linear regression), Random Forests, Support Vector Machines (SVM) + their PCA versions - \item Deep Learning models (e.g., dinov2, medicalnet) - \item Unified hyperparameter search strategy (e.g., grid search or random search with cross-validation on the training set) -\end{itemize} - -\subsection{Benchmarks tasks and evaluation metrics} -Task selection rationale: Clinical relevance, data availability, and established benchmarks in the literature. - -\subsubsection{Classification} -\begin{itemize} - \item Task description: Binary diagnosis prediction (e.g., ASD vs. TD) - \item Evaluation Metrics: Accuracy, AUC, F1-score -\end{itemize} - -\subsubsection{Regression} -\begin{itemize} - \item Task description: Age prediction (brain age estimation) - \item Evaluation Metrics: R², MAE -\end{itemize} - -\subsection{Evaluation protocols} - -\begin{itemize} - \item Data Splitting Strategy (Fixed train/test splits) - \item Cross-validation within training set. Stratification - \item No information leakage - \item Mean ± std across folds - \item Statistical comparison tests (e.g., paired t-tests, Wilcoxon signed-rank tests) to assess significance of performance differences between models -\end{itemize} - - -\section{Results (Reuben)} -Introduction sentence - -\subsubsection{Choice of prediction models} -Table: -For all tasks, choose one brain structure and one microstructural representation (choose widely this one) and report results in a table + comment - -\subsubsection{Choice of the brain structure} -For one regression task and one classification task, show the impact of the brain structure with one miscrostructural representation. You can discard models that underperformed in the first model section. - -\subsubsection{Choice of the microstructural representation} -For one task, show the impact of the microstructural representation for each brain structure. You can discard models that underperformed in the first model section. - -\subsubsection{Training size impact} I think we will not have space for this, but here it would be for one regression task and one classification task, one structure, one microstrucral representation, impact of the model, here try to have variability (PCA, non-PCA, deep) for example. - -\subsubsection{Methodological insights} -\begin{itemize} - \item DL vs ML based - \item Importance of dimensionality control - \item Effect of tract-based aggregation - \item Risk of overfitting in mesh representations without PCA bcs of the high number of vertices representations -\end{itemize} - -\section{Conclusion (Reuben)} -\begin{itemize} - \item Introduced standardized dMRI benchmark for age prediction in healthy individuals using three large datasets (HCP, CamCAN, ABIDE) - \item Compared feature representations (MD, SH, MK, RTOP) and models (dummy classifier, linear, pca\_linear, forest, pca\_forest, svm, pca\_svm) - \item Provided reproducible end{-}to{-}end framework and enables fair model comparison. Reduces methodological heterogeneity - \item A step toward methodological unification/code availability -\end{itemize} - - -\newpage \ No newline at end of file diff --git a/scripts/analysis/analysis.py b/scripts/analysis/analysis.py deleted file mode 100644 index 9c0a4fc7..00000000 --- a/scripts/analysis/analysis.py +++ /dev/null @@ -1,38 +0,0 @@ -from pathlib import Path - -import yaml - -from diff_benchmark.analysis.plot_results import ( - plot_folds_predictions_vs_targets, - plot_predictions_vs_targets, -) -from diff_benchmark.analysis.scores_summary import summarize_folds_to_csv - -with open(Path(__file__).parent.parent.parent / "configuration.yaml", "r") as f: - config = yaml.safe_load(f) - -# -------- PLOT MEAN PRED VS TARGETS -------- -# plot_predictions_vs_targets( -# summary_path=Path(config["data_paths"]["hcp_results"]) -# / "analysis_results" -# / "cca_summary.json", -# output_dir=Path(config["data_paths"]["hcp_results"]) / "analysis_results" / "plots", -# ) - -# -------- PLOT PER FOLD PRED VS TARGETS -------- -plot_folds_predictions_vs_targets( - summary_path=Path(config["data_paths"]["hcp_results"]) - / "analysis_results" - / f"{config["model_name"]}_fold_results.json", - output_dir=Path(config["data_paths"]["hcp_results"]) / "analysis_results" / "plots", -) - -# -------- PER FOLD SCORE TABLE -------- -summarize_folds_to_csv( - fold_results_path=Path(config["data_paths"]["hcp_results"]) - / "analysis_results" - / f"{config["model_name"]}_fold_results.json", - output_csv_path=Path(config["data_paths"]["hcp_results"]) - / "analysis_results" - / f"{config["model_name"]}_score_stats.csv", -) diff --git a/scripts/compute_cache.py b/scripts/compute_cache.py deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/data/README.md b/scripts/data/README.md deleted file mode 100644 index 688254e2..00000000 --- a/scripts/data/README.md +++ /dev/null @@ -1,134 +0,0 @@ -## Data and Preprocessing - -### extract_raw_data.py -This module handles the extraction and preprocessing of raw DWI (Diffusion-Weighted Imaging) data by projecting it onto the cortical surface. The processed data is saved in a structured HDF5 format for downstream analysis and modeling. - -NOTES: subjects are skipped automatically ifthe output file alreaddy exists or any required input file is missing. Also, errors in the processing are logged in the console. - -**Steps:** - -For each subject, and in parallel, the script: - -- Loads DWI data and associated metadata (bvals, bvecs). - -- Projects the volumetric DWI signal onto the left hemisphere cortical surface using nilearn. - -- Loads cortical surface labels and mesh geometry (coordinates and faces). - -- Saves all processed data into a structured .h5 file. - - -**Configuration requirements in comfiguration.yml file:** - -`base_path: "~/data/HCP"` # Root directory containing subject folders - -`data_path: "~/data/masks"` # Directory with subject-specific mask files - -`deen_path: "~/data/labels/deen.L.label.gii"` # Path to left hemisphere surface labels - -`results_path: "~/processed_data"` # Output directory for processed files - - -**Python requirements:** - -`pip install numpy nibabel nilearn h5py pyyaml joblib` - - -How to run the code (considering you are in the directory of the project): - -`poetry run python scripts/data/extract_raw_data.py` - - -**Output:** - -For each subject, a new folder is created under results_path// containing raw_surface_data.h5 that includes: - -- left_dwi_surface: Projected DWI values on the cortical surface. - -- surface_labels: Cortical region labels (from DEEN parcellation). - -- nodes_left: Node indices with non-zero labels. - -- surface_coordinates: Vertex coordinates of the cortical mesh. - -- surface_faces: Mesh faces defining surface triangles. - -- bvals, bvecs: Diffusion gradient info. - -**Metadata stored as HDF5 attributes:** -- subject: Subject ID - -- hemisphere: "left" - -- source: "projected DWI on surface" - -- description: "Raw DWI signal projected on cortical surface using nilearn.surface.vol_to_surf" - - - -### brain_data_preprocessing.py - -This script performs preprocessing of the raw surface-projected DWI data for a single subject. It loads the raw .h5 file generated in the previous step, applies custom transformations, and saves the result in a processed format ready for model input. - -This script takes one command-line argument: the subject ID. - -**How to run:** -python preprocessing_brain_data.py - -** Replace with the actual subject folder name (e.g., 100206). (e.g. python preprocessing_brain_data.py 100206) - -**What It Does** -- Loads the raw surface data from: -results_path//raw_surface_data.h5 - -- Saves preprocessed output to: -results_path//processed/ - -- Calls the function: -preprocess_subject() -(defined in diff_benchmark.preprocessing.brain_data) - -- Measures and prints the total runtime of the preprocessing task. - - -**Inputs:** -raw_surface_data.h5: The raw cortical surface projection data for the subject. - -**Outputs:** -A new folder: results_path//processed/ - -Contains subject-specific preprocessed data (format depends on what preprocess_subject generates). - -**Error Handling:** -- If no subject ID is provided, the script will raise an error: - ValueError: Please provide a subject ID as the first argument. -- Paths are checked via the YAML configuration. Make sure the raw .h5 file exists before running this step. - - -**Inputs:** - -- CSV file path (csv_path): Path to the CSV file. - -- Target columns (target_columns): A NumPy array of column names to retain. - -**Output:** -Returns a cleaned pandas DataFrame with: - -- Only the relevant columns (Subject + target_columns) - -- All selected rows free of missing values - -- Gender encoded as numeric (if present): NEED TO WORK ON HOW TO HANDLE THIS - -**Processing Steps** -- Reads the CSV into a pandas DataFrame (expects "Subject" as a column). - -- Selects the Subject column plus the specified target_columns. - -- Encodes "Gender" column as binary if it exists: - - "M" → 1 - - "F" → 0 - -- Drops any row that has a missing (NaN) value in one or more of the target columns. \ No newline at end of file diff --git a/scripts/data_preparation.py b/scripts/data_preparation.py deleted file mode 100644 index 6a1c4854..00000000 --- a/scripts/data_preparation.py +++ /dev/null @@ -1,59 +0,0 @@ -from pathlib import Path - -import yaml - -general_config_path = Path(__file__).parent.parent / "config/configuration_general.yaml" -with open(general_config_path, "r", encoding="utf-8") as f: - general_config = yaml.safe_load(f) - -from diff_benchmark.preprocessing.brain_feature_extraction import ( - DefaultPipeline, -) -from diff_benchmark.preprocessing.datasets_dataclasses import DatasetConfig - -for dataset2prepare in general_config["datasets"]["datasets_list"]: - if dataset2prepare["name"] == "wand": - dataset = DatasetConfig( - **dataset2prepare, - metric_to_compute=general_config["datasets"]["metric_to_compute"], - scale=general_config["datasets"]["scale"], - ) - brain_preparator = DefaultPipeline(dataset) - # subject_id = "101915" #hcp - # subject_id = "01187" # wand - # subject_id = "CC110037" # camcan - # subject_id = "29182" # abide - - # from pathlib import Path - # def parse_subject_ids(dataset): - # base = Path(dataset.base_dir) - - # glob_patterns = { - # "multicenter-bids": "*/sub-*", - # "bids": "sub-*", - # "hcp": "*", - # } - - # try: - # pattern = glob_patterns[dataset.data_reading] - # except KeyError: - # raise ValueError(f"Unknown data_reading: {dataset.data_reading}") - - # subjects = [] - - # for p in base.glob(pattern): - # name = p.name - # sid = name if dataset.data_reading == "hcp" else name[4:] - - # subjects.append(sid) - - # return sorted(subjects) - - # subject_list = parse_subject_ids(dataset) - - # brain_preparator._get_required_raw_files(subject_list[0]) - # brain_preparator.run_pipeline() - - # subject_id = "76884" # wand - # brain_preparator.verify_raw_files(subject_id) - # brain_preparator.compute_microstructure(subject_id) diff --git a/scripts/demographics_preparation.py b/scripts/demographics_preparation.py deleted file mode 100644 index 951523e2..00000000 --- a/scripts/demographics_preparation.py +++ /dev/null @@ -1,53 +0,0 @@ -from pathlib import Path - -import bids -import yaml - -from diff_benchmark.preprocessing.brain_feature_extraction import ( - DefaultMulticenterPipeline, - DefaultPipeline, -) -from diff_benchmark.preprocessing.datasets_dataclasses import DatasetConfig -from diff_benchmark.preprocessing.preparation_pipeline import ( - DemographicsPreparationPipeline, -) - -general_config_path = Path(__file__).parent.parent / "config/configuration_general.yaml" -with open(general_config_path, "r", encoding="utf-8") as f: - general_config = yaml.safe_load(f) - -for dataset_to_prepare in general_config["datasets"]["datasets_list"]: - if dataset_to_prepare["name"] == "abide": - dataset = DatasetConfig( - **dataset_to_prepare, - metric_to_compute=general_config["datasets"]["metric_to_compute"], - scale=general_config["datasets"]["scale"], - ) - if dataset_to_prepare["name"] == "abide": - center_dirs = [ - p - for p in Path(dataset.base_dir).iterdir() - if p.is_dir() and not p.name.startswith(".") - ] - participants_files = [] - - for center_dir in center_dirs: - layout = bids.BIDSLayout( - str(center_dir), - derivatives=center_dir / "derivatives", - validate=False, - ) - participants_tsv = layout.get_file("participants.tsv").path - participants_files.append(participants_tsv) - cog_file = participants_files - - else: - layout = bids.BIDSLayout( - str(dataset.base_dir), - derivatives=(Path(dataset.base_dir) / "derivatives"), - validate=False, - ) - cog_file = layout.get_file("participants.tsv").path - - preprocessor = DemographicsPreparationPipeline(cog_file) - demographics_df = preprocessor.preprocess(general_config["target_columns"]) diff --git a/scripts/download_curia.py b/scripts/download_curia.py deleted file mode 100644 index f3f759d7..00000000 --- a/scripts/download_curia.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python3 -""" -Script to download raidium/curia model from HuggingFace and save it locally. - -This allows for faster loading and offline usage. -""" - -from pathlib import Path - -from transformers import AutoImageProcessor, AutoModel - - -def download_curia_model(): - """Download CURIA model from HuggingFace to local pretrain directory.""" - - # Define paths - project_root = Path(__file__).parent.parent - pretrain_dir = project_root / "pretrain" / "raidium" / "curia" - - print(f"Downloading raidium/curia model...") - print(f"Target directory: {pretrain_dir}") - - # Create directory - pretrain_dir.mkdir(parents=True, exist_ok=True) - - # Download processor and model - print("\n1. Downloading image processor...") - processor = AutoImageProcessor.from_pretrained("raidium/curia") - processor.save_pretrained(pretrain_dir) - print(" ✓ Image processor saved") - - print("\n2. Downloading model weights...") - model = AutoModel.from_pretrained("raidium/curia") - model.save_pretrained(pretrain_dir) - print(" ✓ Model weights saved") - - # Verify files - print("\n3. Verifying downloaded files...") - expected_files = ["config.json", "preprocessor_config.json"] - for file in expected_files: - file_path = pretrain_dir / file - if file_path.exists(): - print(f" ✓ {file}") - else: - print(f" ✗ {file} (missing)") - - # Check for model weights - model_files = list(pretrain_dir.glob("*.bin")) + list( - pretrain_dir.glob("*.safetensors") - ) - if model_files: - print(f" ✓ Model weights: {[f.name for f in model_files]}") - else: - print(f" ✗ No model weight files found") - - print(f"\n✓ Download complete!") - print(f"✓ Model saved to: {pretrain_dir}") - print(f"\nYou can now run feature caching with:") - print(f" poetry run diffbenchmark-cache model.name=curia dataset.name=camcan") - - -if __name__ == "__main__": - try: - download_curia_model() - except Exception as e: - print(f"\n✗ Error downloading model: {e}") - print("\nTroubleshooting:") - print("1. Check your internet connection") - print("2. Verify the model exists: https://huggingface.co/raidium/curia") - print("3. If it's a private model, authenticate with: huggingface-cli login") - raise diff --git a/scripts/hydra_main.py b/scripts/hydra_main.py deleted file mode 100644 index 9c62568b..00000000 --- a/scripts/hydra_main.py +++ /dev/null @@ -1,410 +0,0 @@ -import argparse -import copy -import logging -from pathlib import Path - -import numpy as np -import pandas as pd -from omegaconf import OmegaConf - -from diff_benchmark.analysis.save_results import ( - is_cached, - save_model_results, -) -from diff_benchmark.analysis.true_vs_pred import plot_true_vs_pred -from diff_benchmark.data.prepare_data import DatasetPreparation -from diff_benchmark.models.model_configurations import get_model, make_run_id -from diff_benchmark.preprocessing.datasets_dataclasses import DatasetConfig -from diff_benchmark.utils.config_loader import load_configs -from diff_benchmark.utils.job_manager import run_jobs -from diff_benchmark.utils.logger import configure_logging, setup_logger -from diff_benchmark.utils.parquet_helper import ParquetSaver, metrics_to_rows -from diff_benchmark.utils.scores import compute_metrics -from diff_benchmark.utils.summary_saver import compute_summary_stats, update_summary - -############# -# KEEP FOR ARGPARSE CONFIG LOADING -# parser = argparse.ArgumentParser() -# parser.add_argument( -# "--methods", nargs="+", type=str, default=["2dcnn_torch"], help="Method to use" -# ) -# parser.add_argument( -# "--cluster", default="margaret", type=str, help="Cluster to use" -# ) -# args = parser.parse_args() - -# general_config, model_config = load_configs(args) -############# - - -def run_single_model(cfg_og, model_name, results_path): - - cfg = OmegaConf.merge(cfg_og) - logger = setup_logger("Job.run_single_model") - metrics_rows = [] - - run_id = make_run_id(cfg.model.name, cfg) - cfg.runtime.run_id = run_id - - dataset_cfg = OmegaConf.to_container(cfg.dataset, resolve=True) - cluster_cfg = cfg.cluster.paths[dataset_cfg["name"]] - - dataset_selected = DatasetConfig( - **dataset_cfg, - base_dir=Path(cluster_cfg.base_dir), - results_dir=Path(cluster_cfg.results_dir), - ) - # dataset_selected = DatasetConfig( - # **OmegaConf.to_container(cfg.dataset, resolve=True) - # ) - - torch_dataset_preparator = DatasetPreparation( - cfg=cfg, - source_dataset=dataset_selected, - ) - - dataset, preprocessed = torch_dataset_preparator.pipeline() - print("Data preparation completed.") - targets_path = Path(results_path) / "parquet" / "data" / "targets.parquet" - targets_path.parent.mkdir(parents=True, exist_ok=True) - - target_name = cfg.target.target_column[0] - rows = [ - { - "dataset": dataset_selected.name, - "sample_id": sid, - "target": target_name, - "value": float(v), - } - for sid, v in zip(dataset.subject_ids, dataset.targets.numpy()) - ] - saver = ParquetSaver( - path=targets_path, - key_columns=["dataset", "sample_id", "target"], - columns=["dataset", "sample_id", "target", "value"], - ) - saver.add_rows(rows) - saver.save() - - specs = preprocessed.get_specs() - logger.debug(f"Dataset specs: {specs}") - print(f"Dataset specs: {specs}") - - indices = preprocessed.get_fold_indices() - - if is_cached(run_id, Path(results_path) / "analysis_results"): - logger.info(f"Skipping {model_name} (run_id={run_id}) - already cached.") - print(f"Skipping {model_name} (run_id={run_id}) - already cached.") - return model_name, run_id - logger.info(f"Running model: {model_name} with run_id: {run_id}") - print(f"Running model: {model_name} with run_id: {run_id}") - - train_scores, test_scores = [], [] - train_preds, test_preds = [], [] - train_targets, test_targets = [], [] - - summary = { - "model_name": model_name, - "config": OmegaConf.to_container(cfg, resolve=True), - "results": { - "train_average_score": None, # will fill after loop - "train_std_score": None, # will fill after loop - "test_average_score": None, # will fill after loop - "test_std_score": None, # will fill after loop - "number_folds": len(indices), - "folds": {}, # will fill inside loop - }, - } - # cfg_path = Path(results_path) / "analysis_results" / f"{run_id}_config.yaml" # CHECK TO INCLUDE - # OmegaConf.save(cfg, cfg_path) # CHECK TO INCLUDE - - save_model_results( - summary, Path(results_path) / "analysis_results" / f"{run_id}_partial.json" - ) - - predictions_path = Path(results_path) / "parquet" / "data" / "predictions.parquet" - key_cols = ["run_id", "model", "dataset", "fold", "split", "sample_id", "target"] - pred_saver = ParquetSaver( - predictions_path, - key_columns=key_cols, - columns=[ - "run_id", - "model", - "dataset", - "fold", - "split", - "sample_id", - "target", - "prediction", - ], - ) - - for fold_idx, (train_idx, test_idx) in enumerate(indices): - try: - logger.info(f"Run ID: {run_id} - Fold {fold_idx+1}/{len(indices)}") - print(f"Run ID: {run_id} - Fold {fold_idx+1}/{len(indices)}") - # local_config["fold_idx"] = fold_idx - train_loader, test_loader = preprocessed.get_dataloader_fold( - dataset, - fold_idx, - indices, - num_workers=cfg.data.num_workers, - batch_size=cfg.data.batch_size, - ) - train_idx, test_idx = indices[fold_idx] - targets = dataset.targets.numpy() - y_train = np.array(targets[train_idx]).squeeze() - y_test = np.array(targets[test_idx]).squeeze() - - # local_config["backbone"]["prediction_task"] = config.get( - # "prediction_task", "regression" - # ) - # local_config["backend"]["run_id"] = run_id - model = get_model( - cfg.model.name, - OmegaConf.to_container(cfg, resolve=True), - ) - - model.fit(train_loader) - train_pred = model.predict(train_loader) - - plot_true_vs_pred( - y_train, train_pred, fold_idx=fold_idx, run_id=run_id, type="train" - ) - train_score = compute_metrics( - y_train, train_pred, prediction_task=cfg.pred_head.prediction_task - ) - - train_scores.append(train_score) - train_preds.append(train_pred.tolist()) - train_targets.append(y_train.tolist()) - - train_subject_ids = np.asarray(dataset.subject_ids)[train_idx] - train_rows = [ - { - "run_id": run_id, - "model": model_name, - "dataset": dataset_selected.name, - "fold": fold_idx, - "split": "train", - "sample_id": sid, - "target": target_name, - "prediction": float(pred), - } - for sid, pred in zip(train_subject_ids, train_pred) - ] - pred_saver.add_rows(train_rows) - - test_pred = model.predict(test_loader) - plot_true_vs_pred( - y_test, test_pred, fold_idx=fold_idx, run_id=run_id, type="test" - ) - test_score = compute_metrics( - y_test, test_pred, prediction_task=cfg.pred_head.prediction_task - ) - logger.info( - f"Fold {fold_idx} - Train score: {train_score}, Test score: {test_score}" - ) - print( - f"Fold {fold_idx} - Train score: {train_score}, Test score: {test_score}" - ) - - test_scores.append(test_score) - test_preds.append(test_pred.tolist()) - test_targets.append(y_test.tolist()) - - test_subject_ids = np.asarray(dataset.subject_ids)[test_idx] - test_rows = [ - { - "run_id": run_id, - "model": model_name, - "dataset": dataset_selected.name, - "fold": fold_idx, - "split": "test", - "sample_id": sid, - "target": target_name, - "prediction": float(pred), - } - for sid, pred in zip(test_subject_ids, test_pred) - ] - pred_saver.add_rows(test_rows) - pred_saver.save() - - primary_metric = {"binary_classification": "accuracy", "regression": "mse"}[ - cfg.pred_head.prediction_task - ] - summary = update_summary( - summary, - fold_idx, - train_score, - test_score, - y_train, - train_pred, - y_test, - test_pred, - primary_metric, - ) - - metrics_rows.extend( - metrics_to_rows( - train_score, - run_id=run_id, - model_name=model_name, - dataset=dataset_selected.name, - prediction_task=cfg.pred_head.prediction_task, - fold=fold_idx, - split="train", - ) - ) - - metrics_rows.extend( - metrics_to_rows( - test_score, - run_id=run_id, - model_name=model_name, - dataset=dataset_selected.name, - prediction_task=cfg.pred_head.prediction_task, - fold=fold_idx, - split="test", - ) - ) - - save_model_results( - summary, - Path(results_path) / "analysis_results" / f"{run_id}_partial.json", - ) - except Exception as e: - logger.exception(f"Crash in fold {fold_idx} of {run_id}: {e}") - print(f"Crash in fold {fold_idx} of {run_id}: {e}") - save_model_results( - summary, - Path(results_path) / "analysis_results" / f"{run_id}_crashed.json", - ) - raise - - metrics_path = ( - Path(results_path) - / "parquet" - / "analysis_results" - / f"metrics_{run_id}.parquet" - ) - metrics_path.parent.mkdir(parents=True, exist_ok=True) - - df = pd.DataFrame(metrics_rows) - df.to_parquet(metrics_path, index=False) - - summary["results"]["train_average_score"], summary["results"]["train_std_score"] = ( - compute_summary_stats(train_scores, primary_metric) - ) - summary["results"]["test_average_score"], summary["results"]["test_std_score"] = ( - compute_summary_stats(test_scores, primary_metric) - ) - - save_model_results(summary, Path(results_path) / "analysis_results") - return model_name, run_id - - -############## -# KEEP FOR SLURM JOB SUBMISSION -# slurm_cfg = general_config["slurm_cfg"][args.cluster] - -# results = run_jobs( -# run_fn=run_single_model, -# fn_kwargs_list=[ -# { -# "model_name": model["name"], -# "model_config": model["params"], -# "general_config": general_config, -# "results_path": "./data/results", -# } -# for model in models_to_run -# ], -# parallel_type="slurm", #None, # -# slurm_cfg=slurm_cfg, -# # slurm_cfg={ -# # "slurm_partition": "parietal,normal,gpu", -# # "tasks_per_node": 1, # == --ntasks=1 (on 1 node) -# # "slurm_gpus_per_task": 1, # == --gpus-per-task=1 (recommended here) -# # "slurm_cpus_per_gpu": 10, -# # "timeout_min": 900, -# # }, -# n_jobs=50, -# ) -############## -# KEEP RESULTS AND UPDATE GLOBAL METRICS FILE -# import warnings -# for result in results: -# if not result.ok: -# warnings.warn(f"Job failed:\n{result.traceback}") - -# metrics_dir = Path("./data/results/parquet/analysis_results") -# global_path = metrics_dir / "metrics.parquet" - -# if global_path.exists(): -# df_global = pd.read_parquet(global_path) -# existing_run_ids = set(df_global["run_id"].unique()) -# else: -# df_global = None -# existing_run_ids = set() - -# new_dfs = [] - -# for p in metrics_dir.glob("metrics_*.parquet"): -# run_id = p.stem.replace("metrics_", "") -# if run_id not in existing_run_ids: -# new_dfs.append(pd.read_parquet(p)) - -# if new_dfs: -# df_new = pd.concat(new_dfs, ignore_index=True) -# if df_global is not None: -# df_out = pd.concat([df_global, df_new], ignore_index=True) -# else: -# df_out = df_new - -# df_out.to_parquet(global_path, index=False) - -################# - -import hydra -from omegaconf import DictConfig - -CONFIG_DIR = str(Path(__file__).parent.parent / "config_hydra") - - -@hydra.main(version_base=None, config_path=CONFIG_DIR, config_name="main") -def main(cfg: DictConfig): - configure_logging(logging.DEBUG) - - results_path = "./data/results" - # SINGLE MODEL, SINGLE RUN - # run_single_model( - # cfg=cfg, - # model_name=cfg.model.name, - # model_config=cfg.model, - # general_config=cfg, - # results_path=results_path, - # ) - - parallel_type = ( - None - if cfg.cluster.conf.parallel_type not in ["slurm", "joblib"] - else cfg.cluster.conf.parallel_type - ) - - results = run_jobs( - run_fn=run_single_model, - fn_kwargs_list=[ - { - "cfg_og": cfg, - "model_name": cfg.model.name, - "results_path": results_path, - } - ], - parallel_type=parallel_type, - slurm_cfg=cfg.cluster.slurm_cfg, - n_jobs=50, - ) - - -if __name__ == "__main__": - main() diff --git a/scripts/inspect_comprehensive_table.py b/scripts/inspect_comprehensive_table.py deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/interpretability/OUT_coeff_distribution.py b/scripts/interpretability/OUT_coeff_distribution.py deleted file mode 100644 index 36210765..00000000 --- a/scripts/interpretability/OUT_coeff_distribution.py +++ /dev/null @@ -1,189 +0,0 @@ -from __future__ import annotations - -import hashlib -import re -import numpy as np -import pandas as pd -import matplotlib.pyplot as plt -from pathlib import Path - - -def _safe_tag(value: object, max_len: int = 40) -> str: - text = str(value) - text = re.sub(r"[^A-Za-z0-9._-]+", "_", text) - text = re.sub(r"_+", "_", text).strip("_.-") - if not text: - text = "na" - if len(text) <= max_len: - return text - - digest = hashlib.sha1(str(value).encode("utf-8")).hexdigest()[:10] - keep = max(8, max_len - 11) - return f"{text[:keep]}_{digest}" - -def _extract_region_repr(embedding: str) -> str: - match = re.search(r"region_repr_([A-Za-z0-9._-]+)", str(embedding)) - if not match: - return "na" - if match: - return match.group(0) - - -def _hist_output_path(output_dir: Path, dataset: object, task: object, embedding: object) -> Path: - ds = _safe_tag(dataset, max_len=32) - tk = _safe_tag(task, max_len=7) - # em = re.search(r"region_representation", str(embedding)).group(0) - # em = _safe_tag(embedding, max_len=40) - em = _extract_region_repr(embedding) - key = f"{dataset}|{task}|{embedding}" - digest = hashlib.sha1(key.encode("utf-8")).hexdigest()[:10] - filename = f"{ds}_{tk}_{em}_{digest}_hist.png" - return output_dir / filename - - -def bootstrap_coeff_distributions( - df: pd.DataFrame, - n_bootstrap: int = 1000, - group_cols: list[str] = ["dataset", "task", "embedding"], - random_state: int = 0, -) -> pd.DataFrame: - """ - Bootstrap coefficient distributions per region. - Assumes df already contains: - - coef_norm - - region - - exp_id (IMPORTANT, one per run/fold/seed) - """ - rng = np.random.default_rng(random_state) - - required = {"exp_id", "region", "coef_norm"} - missing = required - set(df.columns) - if missing: - missing_txt = ", ".join(sorted(missing)) - raise ValueError(f"Missing required columns for bootstrap: {missing_txt}") - - missing_groups = [c for c in group_cols if c not in df.columns] - if missing_groups: - missing_txt = ", ".join(missing_groups) - raise ValueError(f"Missing grouping columns for bootstrap: {missing_txt}") - - results = [] - - for keys, group in df.groupby(group_cols): - # Keep one coefficient per (exp_id, region) to ensure each fold/seed experiment - # contributes independently in resampling. - exp_region = ( - group.groupby(["exp_id", "region"], as_index=False)["coef_norm"] - .mean() - ) - exp_ids = exp_region["exp_id"].unique() - - if len(exp_ids) == 0: - continue - - for _ in range(n_bootstrap): - sampled_ids = rng.choice(exp_ids, size=len(exp_ids), replace=True) - sampled_parts = [] - for exp_id in sampled_ids: - sampled_parts.append(exp_region[exp_region["exp_id"] == exp_id]) - sample = pd.concat(sampled_parts, ignore_index=True) - - agg = sample.groupby("region", as_index=False)["coef_norm"].mean() - - for _, row in agg.iterrows(): - results.append({ - **dict(zip(group_cols, keys if isinstance(keys, tuple) else (keys,))), - "region": row["region"], - "coef": row["coef_norm"], - }) - - return pd.DataFrame(results) - - -def plot_histogram_grid( - df: pd.DataFrame, - dataset: str, - task: str, - embedding: str, - out_file: Path, - max_regions: int = 50, -): - """ - Plot histogram grid of coefficient distributions. - """ - - subset = df[ - (df["dataset"] == dataset) & - (df["task"] == task) & - (df["embedding"] == embedding) - ] - - if subset.empty: - return - - regions = subset["region"].unique()[:max_regions] - if len(regions) == 0: - return - - n = len(regions) - ncols = 5 - nrows = int(np.ceil(n / ncols)) - - fig, axes = plt.subplots(nrows, ncols, figsize=(15, 3 * nrows)) - axes = axes.flatten() - - for i, region in enumerate(regions): - ax = axes[i] - data = subset[subset["region"] == region]["coef"] - - ax.hist(data, bins=30) - ax.set_title(f"Region {region}", fontsize=8) - - # Remove empty plots - for j in range(i + 1, len(axes)): - fig.delaxes(axes[j]) - - fig.suptitle(f"{dataset} | {task} | {embedding}") - fig.tight_layout() - - out_file.parent.mkdir(parents=True, exist_ok=True) - fig.savefig(out_file, dpi=150) - plt.close(fig) - - -def run_analysis( - input_path: Path, - output_dir: Path, -): - df = pd.read_parquet(input_path) - - if "exp_id" not in df.columns: - raise ValueError("exp_id is required. Did you update normalization script?") - - if "coef_norm" not in df.columns: - raise ValueError("coef_norm is required. Input must be selected-normalized output.") - - boot_df = bootstrap_coeff_distributions(df) - - if boot_df.empty: - raise ValueError("No bootstrap results were generated. Check input filters/group columns.") - - for (dataset, task, embedding), _ in boot_df.groupby( - ["dataset", "task", "embedding"] - ): - out_file = _hist_output_path(output_dir, dataset, task, embedding) - - plot_histogram_grid( - boot_df, - dataset, - task, - embedding, - out_file, - ) - - -if __name__ == "__main__": - INPUT = Path("exp_outputs/summary/coefficients_selected_normalized.parquet") - OUTPUT = Path("exp_outputs/summary/bootstrap_hists") - - run_analysis(INPUT, OUTPUT) \ No newline at end of file diff --git a/scripts/interpretability/OUT_normalization_aggregation.py b/scripts/interpretability/OUT_normalization_aggregation.py deleted file mode 100644 index ffef9060..00000000 --- a/scripts/interpretability/OUT_normalization_aggregation.py +++ /dev/null @@ -1,587 +0,0 @@ -from __future__ import annotations - -import warnings -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd - -matplotlib.use("Agg") -import matplotlib.pyplot as plt - -from diff_benchmark.analysis.region_coefficients import load_atlas_from_run - - -PROJECT_ROOT = Path(__file__).resolve().parents[2] -INPUT_TABLE = PROJECT_ROOT / "exp_outputs" / "summary" / "coefficients_long.parquet" -BEST_RUNS_TABLE = PROJECT_ROOT / "exp_outputs" / "summary" / "best_runs_by_config.parquet" -OUTPUT_TABLE = PROJECT_ROOT / "exp_outputs" / "summary" / "coefficients_selected_normalized.parquet" -STABILITY_TABLE = PROJECT_ROOT / "exp_outputs" / "summary" / "region_stability_metrics.parquet" -RANK_TABLE = PROJECT_ROOT / "exp_outputs" / "summary" / "region_rank_metrics.parquet" -MAPS_DIR = PROJECT_ROOT / "exp_outputs" / "summary" / "brain_maps" - - -def _coefficient_mode_settings(coefficient_mode: str) -> tuple[str, bool]: - mode = str(coefficient_mode).strip().lower() - if mode in {"abs", "absolute"}: - return "absolute", False - if mode in {"sign", "signed"}: - return "signed", True - raise ValueError("coefficient_mode must be one of: absolute, abs, signed, sign") - - -def _coef_importance(series: pd.Series, use_sign: bool) -> pd.Series: - if use_sign: - return series - return series.abs() - - -def _pick_group_columns(df: pd.DataFrame) -> list[str]: - candidates = ["microstructure", "model_type", "embedding", "task", "dataset"] - if "model_type" not in df.columns and "model" in df.columns: - df["model_type"] = df["model"] - return [c for c in candidates if c in df.columns] - - -def _build_exp_id(df: pd.DataFrame) -> pd.Series: - cols = ["run_id"] - if "fold" in df.columns: - cols.append("fold") - if "seed" in df.columns: - cols.append("seed") - return df[cols].astype(str).agg("_".join, axis=1) - - -def _select_best_runs(df: pd.DataFrame, group_cols: list[str], outlier_iqr_mult: float = 1.5) -> pd.DataFrame: - score_df = ( - df[["run_id", "test_score"] + group_cols] - .dropna(subset=["test_score"]) - .drop_duplicates() - ) - - run_scores = ( - score_df.groupby(["run_id"] + group_cols, dropna=False, as_index=False)["test_score"] - .mean() - .rename(columns={"test_score": "mean_test_score"}) - ) - if run_scores.empty: - return run_scores - - def _filter_group(group: pd.DataFrame) -> pd.DataFrame: - out = group.copy() - scores = out["mean_test_score"].astype(float) - best_score = float(scores.max()) - gaps = best_score - scores - - q1_gap = float(gaps.quantile(0.25)) - q3_gap = float(gaps.quantile(0.75)) - iqr_gap = q3_gap - q1_gap - gap_cutoff = q3_gap + float(outlier_iqr_mult) * iqr_gap if iqr_gap > 0 else q3_gap - - q1_score = float(scores.quantile(0.25)) - q3_score = float(scores.quantile(0.75)) - iqr_score = q3_score - q1_score - score_floor = q1_score - float(outlier_iqr_mult) * iqr_score if iqr_score > 0 else q1_score - - keep_mask = (gaps <= gap_cutoff) & (scores >= score_floor) - keep_mask = keep_mask | (scores == best_score) - - if int(keep_mask.sum()) == 0: - keep_mask = scores == best_score - - out["best_test_score"] = best_score - out["score_gap_from_best"] = gaps - return out.loc[keep_mask.values] - - grouped = run_scores.groupby(group_cols, dropna=False, as_index=False) - try: - selected_runs = grouped.apply(_filter_group, include_groups=False).reset_index(drop=True) - except TypeError: - selected_runs = grouped.apply(_filter_group).reset_index(drop=True) - return selected_runs - - -def _normalize_selected(df_selected: pd.DataFrame) -> pd.DataFrame: - out = df_selected.copy() - l2_norm = out.groupby("exp_id")["coef"].transform(lambda s: (s.pow(2).sum()) ** 0.5) - out["coef_norm"] = out["coef"].where(l2_norm == 0, out["coef"] / l2_norm) - return out - - -def _selection_key_columns(df: pd.DataFrame) -> list[str]: - keys = [c for c in ["run_id", "fold", "seed"] if c in df.columns] - if keys: - return keys - if "exp_id" in df.columns: - return ["exp_id"] - raise ValueError("Cannot build selection groups: expected run_id/fold/seed or exp_id") - - -def _add_percentile_selection(df: pd.DataFrame, percentile: float = 0.90, use_sign: bool = False) -> pd.DataFrame: - if not (0.0 < float(percentile) < 1.0): - raise ValueError("percentile must be in (0, 1)") - - group_cols = _selection_key_columns(df) - out = df.copy() - out["selected"] = out.groupby(group_cols, dropna=False)["coef"].transform( - lambda s: (_coef_importance(s, use_sign=use_sign) >= _coef_importance(s, use_sign=use_sign).quantile(float(percentile))).astype(int) - ) - return out - - -def _add_rank_percentile(df: pd.DataFrame, use_sign: bool = False) -> pd.DataFrame: - group_cols = _selection_key_columns(df) - out = df.copy() - out["rank_percentile"] = out.groupby(group_cols, dropna=False)["coef"].transform( - lambda s: _coef_importance(s, use_sign=use_sign).rank(method="average", pct=True) - ) - return out - - -def _add_score_weight(df: pd.DataFrame, score_col: str = "test_score", weight_col: str = "score_weight") -> pd.DataFrame: - out = df.copy() - weights = pd.to_numeric(out[score_col], errors="coerce").fillna(0.0).astype(float) - weights = weights.clip(lower=0.0) - if float(weights.sum()) <= 0.0: - weights = pd.Series(np.ones(len(out), dtype=float), index=out.index) - out[weight_col] = weights - return out - - -def _weighted_mean(values: pd.Series, weights: pd.Series) -> float: - v = pd.to_numeric(values, errors="coerce").astype(float) - w = pd.to_numeric(weights, errors="coerce").astype(float) - mask = v.notna() & w.notna() - if int(mask.sum()) == 0: - return 0.0 - vv = v.loc[mask].to_numpy() - ww = w.loc[mask].to_numpy() - ww = np.clip(ww, 0.0, None) - if float(ww.sum()) <= 0.0: - ww = np.ones_like(ww, dtype=float) - return float(np.average(vv, weights=ww)) - - -def _weighted_variance(values: pd.Series, weights: pd.Series) -> float: - v = pd.to_numeric(values, errors="coerce").astype(float) - w = pd.to_numeric(weights, errors="coerce").astype(float) - mask = v.notna() & w.notna() - if int(mask.sum()) == 0: - return 0.0 - vv = v.loc[mask].to_numpy() - ww = w.loc[mask].to_numpy() - ww = np.clip(ww, 0.0, None) - if float(ww.sum()) <= 0.0: - ww = np.ones_like(ww, dtype=float) - mean = float(np.average(vv, weights=ww)) - return float(np.average((vv - mean) ** 2, weights=ww)) - - -def _weighted_quantile(values: pd.Series, weights: pd.Series, q: float) -> float: - v = pd.to_numeric(values, errors="coerce").astype(float) - w = pd.to_numeric(weights, errors="coerce").astype(float) - mask = v.notna() & w.notna() - if int(mask.sum()) == 0: - return 0.0 - vv = v.loc[mask].to_numpy() - ww = w.loc[mask].to_numpy() - ww = np.clip(ww, 0.0, None) - if float(ww.sum()) <= 0.0: - ww = np.ones_like(ww, dtype=float) - order = np.argsort(vv) - vv_sorted = vv[order] - ww_sorted = ww[order] - cum_w = np.cumsum(ww_sorted) - cutoff = float(q) * float(ww_sorted.sum()) - idx = int(np.searchsorted(cum_w, cutoff, side="left")) - idx = min(max(idx, 0), len(vv_sorted) - 1) - return float(vv_sorted[idx]) - - -def _compute_metrics(group: pd.DataFrame) -> pd.Series: - selected = group[group["selected"] == 1] - - if len(selected) == 0: - return pd.Series( - { - "selection_freq": 0.0, - "sign_consistency": 0.0, - "effect_median": 0.0, - "effect_iqr": 0.0, - } - ) - - signs = selected["coef"].apply(lambda x: 1 if x > 0 else -1) - return pd.Series( - { - "selection_freq": float(group["selected"].mean()), - "sign_consistency": float(signs.value_counts(normalize=True).max()), - "effect_median": float(selected["coef"].median()), - "effect_iqr": float( - selected["coef"].quantile(0.75) - selected["coef"].quantile(0.25) - ), - } - ) - - -def _label_value_map(values_by_region: pd.Series) -> dict[int, float]: - out: dict[int, float] = {} - for region, value in values_by_region.items(): - try: - label = int(str(region).split(":")[-1]) - out[label] = float(value) - except Exception: - continue - return out - - -def _surface_texture_from_label_map(surface_atlas: dict, label_values: dict[int, float]) -> tuple[np.ndarray, np.ndarray]: - parcel_labels = np.asarray(surface_atlas["parcel_labels"]).astype(np.int32) - n_left = int(surface_atlas["n_left_vertices"]) - texture = np.zeros(parcel_labels.shape[0], dtype=np.float32) - for label, value in label_values.items(): - texture[parcel_labels == int(label)] = float(value) - return texture[:n_left], texture[n_left:] - - -def _plot_surface_metric( - surface_atlas: dict, - label_values: dict[int, float], - title: str, - out_file: Path, - vmin: float, - vmax: float, - symmetric: bool, - cmap: str, -) -> None: - from nilearn import plotting - - left_mesh = surface_atlas["left_mesh"] - right_mesh = surface_atlas["right_mesh"] - tex_left, tex_right = _surface_texture_from_label_map(surface_atlas, label_values) - - fig = plt.figure(figsize=(12, 4.8)) - ax1 = fig.add_subplot(1, 2, 1, projection="3d") - ax2 = fig.add_subplot(1, 2, 2, projection="3d") - - plotting.plot_surf_stat_map( - left_mesh, - tex_left, - hemi="left", - view="lateral", - cmap=cmap, - darkness=None, - symmetric_cbar=symmetric, - colorbar=False, - vmin=vmin, - vmax=vmax, - axes=ax1, - title="Left", - ) - plotting.plot_surf_stat_map( - right_mesh, - tex_right, - hemi="right", - view="lateral", - cmap=cmap, - darkness=None, - symmetric_cbar=symmetric, - colorbar=True, - vmin=vmin, - vmax=vmax, - axes=ax2, - title="Right", - ) - - fig.suptitle(title) - out_file.parent.mkdir(parents=True, exist_ok=True) - fig.savefig(out_file, dpi=180, bbox_inches="tight") - plt.close(fig) - - -def _plot_dataset_task_maps( - metrics_main: pd.DataFrame, - normalized_df: pd.DataFrame, - maps_dir: Path, - use_sign: bool = False, -) -> None: - if normalized_df.empty: - return - - def _selection_stats(group: pd.DataFrame) -> pd.Series: - mean_val = _weighted_mean(group["selected"], group["score_weight"]) - var_val = _weighted_variance(group["selected"], group["score_weight"]) - return pd.Series( - { - "selection_freq_mean": mean_val, - "selection_freq_std": float(np.sqrt(max(var_val, 0.0))), - } - ) - - grouped = normalized_df.groupby(["dataset", "task", "region"], dropna=False, as_index=False) - try: - selection_stats = grouped.apply(_selection_stats, include_groups=False).reset_index(drop=True) - except TypeError: - selection_stats = grouped.apply(_selection_stats).reset_index(drop=True) - if selection_stats.empty: - return - - for (dataset, task), combo in selection_stats.groupby(["dataset", "task"], dropna=False): - combo_metrics = metrics_main[ - (metrics_main["dataset"].astype(str) == str(dataset)) - & (metrics_main["task"].astype(str) == str(task)) - ].copy() - - run_candidates = normalized_df[ - (normalized_df["dataset"].astype(str) == str(dataset)) - & (normalized_df["task"].astype(str) == str(task)) - ]["run_id"].astype(str) - if run_candidates.empty: - continue - - anchor_run = run_candidates.iloc[0] - try: - atlas_info = load_atlas_from_run(anchor_run, experiments_root=PROJECT_ROOT / "exp_outputs" / "experiments") - except Exception as exc: - warnings.warn(f"Skipping brain map for {dataset}/{task}: could not load atlas ({exc})") - continue - - mean_label_values = _label_value_map(combo.set_index("region")["selection_freq_mean"]) - std_label_values = _label_value_map(combo.set_index("region")["selection_freq_std"].fillna(0.0)) - sign_label_values: dict[int, float] = {} - if use_sign and not combo_metrics.empty: - sign_label_values = _label_value_map(combo_metrics.set_index("region")["sign_consistency"].fillna(0.0)) - if not mean_label_values and not std_label_values and not sign_label_values: - warnings.warn(f"Skipping brain map for {dataset}/{task}: no plottable numeric region labels") - continue - - tag = f"{str(dataset).lower()}_{str(task).lower().replace(' ', '_')}" - - mean_vals = combo["selection_freq_mean"].astype(float) - mean_vmin = 0.0 - mean_vmax = float(mean_vals.max()) if not mean_vals.empty else 0.0 - if mean_vmax <= 0.0: - mean_vmax = 1e-12 - - std_vals = combo["selection_freq_std"].fillna(0.0).astype(float) - std_vmin = 0.0 - std_vmax = float(std_vals.max()) if not std_vals.empty else 0.0 - if std_vmax <= 0.0: - std_vmax = 1e-12 - - sign_vmin, sign_vmax = 0.0, 1.0 - - atlas_type = atlas_info.get("atlas_type", "surface_schaefer") - if atlas_type != "surface_schaefer": - warnings.warn( - f"Atlas type {atlas_type} for {dataset}/{task} is not handled in this script; skipping map" - ) - continue - - try: - if mean_label_values: - _plot_surface_metric( - surface_atlas=atlas_info, - label_values=mean_label_values, - title=f"Selection Frequency Mean | {dataset} | {task}", - out_file=maps_dir / f"selection_frequency_{tag}.png", - vmin=mean_vmin, - vmax=mean_vmax, - symmetric=False, - cmap="Reds", - ) - if std_label_values: - _plot_surface_metric( - surface_atlas=atlas_info, - label_values=std_label_values, - title=f"Selection Frequency Std | {dataset} | {task}", - out_file=maps_dir / f"selection_frequency_std_{tag}.png", - vmin=std_vmin, - vmax=std_vmax, - symmetric=False, - cmap="Reds", - ) - if sign_label_values: - _plot_surface_metric( - surface_atlas=atlas_info, - label_values=sign_label_values, - title=f"Sign Consistency | {dataset} | {task}", - out_file=maps_dir / f"sign_consistency_{tag}.png", - vmin=sign_vmin, - vmax=sign_vmax, - symmetric=False, - cmap="Reds", - ) - except Exception as exc: - warnings.warn(f"Failed plotting brain map for {dataset}/{task}: {exc}") - - -def _plot_rank_maps(rank_metrics: pd.DataFrame, normalized_df: pd.DataFrame, maps_dir: Path) -> None: - if rank_metrics.empty or normalized_df.empty: - return - - for (dataset, task), combo in rank_metrics.groupby(["dataset", "task"], dropna=False): - run_candidates = normalized_df[ - (normalized_df["dataset"].astype(str) == str(dataset)) - & (normalized_df["task"].astype(str) == str(task)) - ]["run_id"].astype(str) - if run_candidates.empty: - continue - - anchor_run = run_candidates.iloc[0] - try: - atlas_info = load_atlas_from_run(anchor_run, experiments_root=PROJECT_ROOT / "exp_outputs" / "experiments") - except Exception as exc: - warnings.warn(f"Skipping rank map for {dataset}/{task}: could not load atlas ({exc})") - continue - - rank_mean_values = _label_value_map(combo.set_index("region")["rank_mean"]) - rank_median_values = _label_value_map(combo.set_index("region")["rank_median"]) - rank_var_values = _label_value_map(combo.set_index("region")["rank_variance"].fillna(0.0)) - if not rank_mean_values and not rank_median_values and not rank_var_values: - warnings.warn(f"Skipping rank map for {dataset}/{task}: no plottable numeric region labels") - continue - - tag = f"{str(dataset).lower()}_{str(task).lower().replace(' ', '_')}" - - rank_mean_vmin, rank_mean_vmax = 0.0, 1.0 - rank_median_vmin, rank_median_vmax = 0.0, 1.0 - - var_vals = combo["rank_variance"].fillna(0.0).astype(float) - rank_var_vmin = 0.0 - rank_var_vmax = float(var_vals.max()) if not var_vals.empty else 0.0 - if rank_var_vmax <= 0.0: - rank_var_vmax = 1e-12 - - atlas_type = atlas_info.get("atlas_type", "surface_schaefer") - if atlas_type != "surface_schaefer": - warnings.warn( - f"Atlas type {atlas_type} for {dataset}/{task} is not handled in this script; skipping rank map" - ) - continue - - try: - if rank_mean_values: - _plot_surface_metric( - surface_atlas=atlas_info, - label_values=rank_mean_values, - title=f"Rank Mean | {dataset} | {task}", - out_file=maps_dir / f"rank_mean_{tag}.png", - vmin=rank_mean_vmin, - vmax=rank_mean_vmax, - symmetric=False, - cmap="Reds", - ) - if rank_median_values: - _plot_surface_metric( - surface_atlas=atlas_info, - label_values=rank_median_values, - title=f"Rank Median | {dataset} | {task}", - out_file=maps_dir / f"rank_median_{tag}.png", - vmin=rank_median_vmin, - vmax=rank_median_vmax, - symmetric=False, - cmap="Reds", - ) - if rank_var_values: - _plot_surface_metric( - surface_atlas=atlas_info, - label_values=rank_var_values, - title=f"Rank Variance | {dataset} | {task}", - out_file=maps_dir / f"rank_variance_{tag}.png", - vmin=0, #rank_var_vmin, - vmax=0.25, #rank_var_vmax, - symmetric=False, - cmap="Reds", - ) - except Exception as exc: - warnings.warn(f"Failed plotting rank map for {dataset}/{task}: {exc}") - - -def build_selected_normalized_coefficients( - input_table: Path = INPUT_TABLE, - best_runs_table: Path = BEST_RUNS_TABLE, - output_table: Path = OUTPUT_TABLE, - stability_table: Path = STABILITY_TABLE, - rank_table: Path = RANK_TABLE, - maps_dir: Path = MAPS_DIR, - selection_percentile: float = 0.90, - coefficient_mode: str = "absolute", -) -> tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame, pd.DataFrame]: - if not (0.90 <= float(selection_percentile) <= 0.95): - raise ValueError("selection_percentile must be between 0.90 and 0.95") - mode_name, use_sign = _coefficient_mode_settings(coefficient_mode) - effective_maps_dir = maps_dir - if use_sign: - effective_maps_dir = maps_dir.parent / f"{maps_dir.name}_signs" - - df = pd.read_parquet(input_table) - required = {"run_id", "coef", "test_score"} - missing = required - set(df.columns) - if missing: - missing_txt = ", ".join(sorted(missing)) - raise ValueError(f"Missing required columns in input table: {missing_txt}") - df = df.copy() - df["exp_id"] = _build_exp_id(df) - - group_cols = _pick_group_columns(df) - if not group_cols: - raise ValueError( - "No grouping columns found. Need at least one of: " - "microstructure, model_type/model, embedding, task, dataset" - ) - - best_runs = _select_best_runs(df, group_cols) - selected = df[df["run_id"].isin(best_runs["run_id"])].copy() - if selected.empty: - raise ValueError("No rows left after run selection; check score distributions and selection thresholds") - normalized = _add_percentile_selection(selected, percentile=selection_percentile, use_sign=use_sign) - normalized = _add_rank_percentile(normalized, use_sign=use_sign) - normalized = _add_score_weight(normalized) - normalized["coefficient_mode"] = mode_name - metrics_main = ( - normalized.groupby(["dataset", "task", "region"], dropna=False)[["selected", "coef"]] - .apply(_compute_metrics) - .reset_index() - ) - metrics_main["coefficient_mode"] = mode_name - - def _rank_stats(group: pd.DataFrame) -> pd.Series: - return pd.Series( - { - "rank_mean": _weighted_mean(group["rank_percentile"], group["score_weight"]), - "rank_median": _weighted_quantile(group["rank_percentile"], group["score_weight"], 0.5), - "rank_variance": _weighted_variance(group["rank_percentile"], group["score_weight"]), - } - ) - - grouped_rank = normalized.groupby(["dataset", "task", "region"], dropna=False, as_index=False) - try: - rank_metrics = grouped_rank.apply(_rank_stats, include_groups=False).reset_index(drop=True) - except TypeError: - rank_metrics = grouped_rank.apply(_rank_stats).reset_index(drop=True) - rank_metrics["coefficient_mode"] = mode_name - - best_runs_table.parent.mkdir(parents=True, exist_ok=True) - output_table.parent.mkdir(parents=True, exist_ok=True) - stability_table.parent.mkdir(parents=True, exist_ok=True) - rank_table.parent.mkdir(parents=True, exist_ok=True) - best_runs.to_parquet(best_runs_table, index=False) - normalized.to_parquet(output_table, index=False) - metrics_main.to_parquet(stability_table, index=False) - rank_metrics.to_parquet(rank_table, index=False) - _plot_dataset_task_maps(metrics_main, normalized, effective_maps_dir, use_sign=use_sign) - _plot_rank_maps(rank_metrics, normalized, effective_maps_dir) - - return best_runs, normalized, metrics_main, rank_metrics - - -if __name__ == "__main__": - best_df, norm_df, metrics_df, rank_df = build_selected_normalized_coefficients() - # best_df, norm_df, metrics_df, rank_df = build_selected_normalized_coefficients(coefficient_mode="signed") - print(f"Saved best runs: {len(best_df)} rows -> {BEST_RUNS_TABLE}") - print(f"Saved normalized coefficients: {len(norm_df)} rows -> {OUTPUT_TABLE}") - print(f"Saved stability metrics: {len(metrics_df)} rows -> {STABILITY_TABLE}") - print(f"Saved rank metrics: {len(rank_df)} rows -> {RANK_TABLE}") - print(f"Saved brain maps under: {MAPS_DIR}") diff --git a/scripts/interpretability/focus/df.parquet b/scripts/interpretability/focus/df.parquet deleted file mode 100644 index d0c04e21..00000000 Binary files a/scripts/interpretability/focus/df.parquet and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_average_scores.csv b/scripts/interpretability/focus/outputs/csv/consensus2_average_scores.csv deleted file mode 100644 index f654147f..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_average_scores.csv +++ /dev/null @@ -1,401 +0,0 @@ -dataset,model,region_id,region_name,average_score,embedding_count -camcan,region_elasticnet,11,17Networks_LH_SomMotB_S2_1,0.011428571428571429,5 -camcan,region_elasticnet,36,17Networks_LH_ContC_pCun_2,0.011428571428571429,5 -camcan,region_elasticnet,48,17Networks_LH_DefaultC_Rsp_1,0.011428571428571429,5 -camcan,region_elasticnet,49,17Networks_LH_DefaultC_PHC_1,0.011428571428571429,5 -camcan,region_elasticnet,57,17Networks_RH_SomMotA_1,0.011428571428571429,5 -camcan,region_elasticnet,5,17Networks_LH_VisPeri_ExStrInf_1,0.017142857142857144,5 -camcan,region_elasticnet,47,17Networks_LH_DefaultB_PFCv_2,0.017142857142857144,5 -camcan,region_elasticnet,72,17Networks_RH_SalVentAttnA_Ins_1,0.017142857142857144,5 -camcan,region_elasticnet,94,17Networks_RH_DefaultB_PFCv_1,0.018095238095238095,5 -camcan,region_elasticnet,30,17Networks_LH_LimbicA_TempPole_2,0.023809523809523808,5 -camcan,region_elasticnet,56,17Networks_RH_VisPeri_ExStrSup_1,0.023809523809523808,5 -camcan,region_elasticnet,69,17Networks_RH_DorsAttnB_PostC_2,0.023809523809523808,5 -camcan,region_elasticnet,89,17Networks_RH_DefaultA_IPL_1,0.023809523809523808,5 -camcan,region_elasticnet,96,17Networks_RH_DefaultC_Rsp_1,0.023809523809523808,5 -camcan,region_elasticnet,97,17Networks_RH_DefaultC_PHC_1,0.023809523809523808,5 -camcan,region_elasticnet,45,17Networks_LH_DefaultB_PFCl_1,0.024761904761904763,5 -camcan,region_elasticnet,82,17Networks_RH_ContA_PFCl_2,0.024761904761904763,5 -camcan,region_elasticnet,19,17Networks_LH_DorsAttnB_PostC_3,0.029523809523809525,5 -camcan,region_elasticnet,21,17Networks_LH_SalVentAttnA_ParOper_1,0.029523809523809525,5 -camcan,region_elasticnet,38,17Networks_LH_DefaultA_PFCd_1,0.029523809523809525,5 -camcan,region_elasticnet,58,17Networks_RH_SomMotA_2,0.03047619047619048,5 -camcan,region_elasticnet,75,17Networks_RH_SalVentAttnB_IPL_1,0.03047619047619048,5 -camcan,region_elasticnet,81,17Networks_RH_ContA_PFCl_1,0.03142857142857143,5 -camcan,region_elasticnet,90,17Networks_RH_DefaultA_PFCd_1,0.03142857142857143,5 -camcan,region_elasticnet,71,17Networks_RH_SalVentAttnA_ParOper_1,0.03238095238095238,5 -camcan,region_elasticnet,70,17Networks_RH_DorsAttnB_FEF_1,0.032380952380952385,5 -camcan,region_elasticnet,44,17Networks_LH_DefaultB_PFCd_1,0.03428571428571429,5 -camcan,region_elasticnet,54,17Networks_RH_VisPeri_StriCal_1,0.035238095238095235,5 -camcan,region_elasticnet,16,17Networks_LH_DorsAttnA_SPL_1,0.03619047619047619,5 -camcan,region_elasticnet,98,17Networks_RH_TempPar_1,0.03619047619047619,5 -camcan,region_elasticnet,7,17Networks_LH_VisPeri_ExStrSup_1,0.037142857142857144,5 -camcan,region_elasticnet,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.037142857142857144,5 -camcan,region_elasticnet,42,17Networks_LH_DefaultB_Temp_2,0.037142857142857144,5 -camcan,region_elasticnet,62,17Networks_RH_SomMotB_S2_1,0.037142857142857144,5 -camcan,region_elasticnet,65,17Networks_RH_DorsAttnA_TempOcc_1,0.037142857142857144,5 -camcan,region_elasticnet,67,17Networks_RH_DorsAttnA_SPL_1,0.037142857142857144,5 -camcan,region_elasticnet,91,17Networks_RH_DefaultA_pCunPCC_1,0.037142857142857144,5 -camcan,region_elasticnet,6,17Networks_LH_VisPeri_StriCal_1,0.04285714285714286,5 -camcan,region_elasticnet,25,17Networks_LH_SalVentAttnA_FrMed_1,0.04285714285714286,5 -camcan,region_elasticnet,83,17Networks_RH_ContB_Temp_1,0.04285714285714286,5 -camcan,region_elasticnet,92,17Networks_RH_DefaultA_PFCm_1,0.04285714285714286,5 -camcan,region_elasticnet,26,17Networks_LH_SalVentAttnB_PFCl_1,0.04380952380952381,5 -camcan,region_elasticnet,73,17Networks_RH_SalVentAttnA_ParMed_1,0.04380952380952381,5 -camcan,region_elasticnet,74,17Networks_RH_SalVentAttnA_FrMed_1,0.04380952380952381,5 -camcan,region_elasticnet,33,17Networks_LH_ContA_PFCl_2,0.04476190476190476,5 -camcan,region_elasticnet,76,17Networks_RH_SalVentAttnB_PFCl_1,0.049523809523809526,5 -camcan,region_elasticnet,12,17Networks_LH_SomMotB_S2_2,0.051428571428571435,5 -camcan,region_elasticnet,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.051428571428571435,5 -camcan,region_elasticnet,66,17Networks_RH_DorsAttnA_ParOcc_1,0.05714285714285714,5 -camcan,region_elasticnet,35,17Networks_LH_ContC_pCun_1,0.05809523809523809,5 -camcan,region_elasticnet,20,17Networks_LH_DorsAttnB_FEF_1,0.0580952380952381,5 -camcan,region_elasticnet,23,17Networks_LH_SalVentAttnA_Ins_2,0.0580952380952381,5 -camcan,region_elasticnet,84,17Networks_RH_ContB_IPL_1,0.06190476190476191,5 -camcan,region_elasticnet,10,17Networks_LH_SomMotB_Aud_1,0.06285714285714286,5 -camcan,region_elasticnet,15,17Networks_LH_DorsAttnA_ParOcc_1,0.06285714285714286,5 -camcan,region_elasticnet,39,17Networks_LH_DefaultA_pCunPCC_1,0.0638095238095238,5 -camcan,region_elasticnet,50,17Networks_LH_TempPar_1,0.0638095238095238,5 -camcan,region_elasticnet,68,17Networks_RH_DorsAttnB_PostC_1,0.0638095238095238,5 -camcan,region_elasticnet,18,17Networks_LH_DorsAttnB_PostC_2,0.06476190476190476,5 -camcan,region_elasticnet,46,17Networks_LH_DefaultB_PFCv_1,0.06666666666666667,5 -camcan,region_elasticnet,40,17Networks_LH_DefaultA_PFCm_1,0.0676190476190476,5 -camcan,region_elasticnet,32,17Networks_LH_ContA_PFCl_1,0.06952380952380952,5 -camcan,region_elasticnet,85,17Networks_RH_ContB_PFCld_1,0.06952380952380952,5 -camcan,region_elasticnet,88,17Networks_RH_ContC_pCun_1,0.07047619047619047,5 -camcan,region_elasticnet,41,17Networks_LH_DefaultB_Temp_1,0.07142857142857142,5 -camcan,region_elasticnet,63,17Networks_RH_SomMotB_S2_2,0.07238095238095238,5 -camcan,region_elasticnet,14,17Networks_LH_DorsAttnA_TempOcc_1,0.07619047619047618,5 -camcan,region_elasticnet,80,17Networks_RH_ContA_IPS_1,0.07714285714285715,5 -camcan,region_elasticnet,22,17Networks_LH_SalVentAttnA_Ins_1,0.08,5 -camcan,region_elasticnet,55,17Networks_RH_VisPeri_ExStrInf_1,0.08095238095238096,5 -camcan,region_elasticnet,100,17Networks_RH_TempPar_3,0.08285714285714285,5 -camcan,region_elasticnet,1,17Networks_LH_VisCent_ExStr_1,0.0838095238095238,5 -camcan,region_elasticnet,51,17Networks_RH_VisCent_ExStr_1,0.08571428571428572,5 -camcan,region_elasticnet,29,17Networks_LH_LimbicA_TempPole_1,0.08761904761904762,5 -camcan,region_elasticnet,64,17Networks_RH_SomMotB_Cent_1,0.09142857142857143,5 -camcan,region_elasticnet,37,17Networks_LH_ContC_Cingp_1,0.09142857142857144,5 -camcan,region_elasticnet,34,17Networks_LH_ContB_PFClv_1,0.09714285714285716,5 -camcan,region_elasticnet,43,17Networks_LH_DefaultB_IPL_1,0.10095238095238095,5 -camcan,region_elasticnet,79,17Networks_RH_LimbicA_TempPole_1,0.1019047619047619,5 -camcan,region_elasticnet,31,17Networks_LH_ContA_IPS_1,0.10666666666666666,5 -camcan,region_elasticnet,24,17Networks_LH_SalVentAttnA_ParMed_1,0.11333333333333333,5 -camcan,region_elasticnet,17,17Networks_LH_DorsAttnB_PostC_1,0.11619047619047618,5 -camcan,region_elasticnet,53,17Networks_RH_VisCent_ExStr_3,0.12095238095238095,5 -camcan,region_elasticnet,61,17Networks_RH_SomMotB_Aud_1,0.12190476190476189,5 -camcan,region_elasticnet,13,17Networks_LH_SomMotB_Cent_1,0.12190476190476192,5 -camcan,region_elasticnet,95,17Networks_RH_DefaultB_PFCv_2,0.12952380952380954,5 -camcan,region_elasticnet,2,17Networks_LH_VisCent_ExStr_2,0.14476190476190476,5 -camcan,region_elasticnet,86,17Networks_RH_ContB_PFClv_1,0.14857142857142858,5 -camcan,region_elasticnet,99,17Networks_RH_TempPar_2,0.14952380952380953,5 -camcan,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.15523809523809523,5 -camcan,region_elasticnet,52,17Networks_RH_VisCent_ExStr_2,0.1580952380952381,5 -camcan,region_elasticnet,60,17Networks_RH_SomMotA_4,0.1580952380952381,5 -camcan,region_elasticnet,87,17Networks_RH_ContC_Cingp_1,0.17238095238095238,5 -camcan,region_elasticnet,9,17Networks_LH_SomMotA_2,0.19523809523809524,5 -camcan,region_elasticnet,8,17Networks_LH_SomMotA_1,0.21142857142857144,5 -camcan,region_elasticnet,4,17Networks_LH_VisCent_ExStr_3,0.22000000000000003,5 -camcan,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.22952380952380952,5 -camcan,region_elasticnet,59,17Networks_RH_SomMotA_3,0.28190476190476194,5 -camcan,region_elasticnet,28,17Networks_LH_LimbicB_OFC_1,0.41047619047619044,5 -camcan,region_elasticnet,3,17Networks_LH_VisCent_Striate_1,0.52,5 -camcan,region_group_lasso,11,17Networks_LH_SomMotB_S2_1,0.008,5 -camcan,region_group_lasso,75,17Networks_RH_SalVentAttnB_IPL_1,0.008,5 -camcan,region_group_lasso,56,17Networks_RH_VisPeri_ExStrSup_1,0.012444444444444445,5 -camcan,region_group_lasso,89,17Networks_RH_DefaultA_IPL_1,0.012444444444444445,5 -camcan,region_group_lasso,42,17Networks_LH_DefaultB_Temp_2,0.016,5 -camcan,region_group_lasso,94,17Networks_RH_DefaultB_PFCv_1,0.016,5 -camcan,region_group_lasso,96,17Networks_RH_DefaultC_Rsp_1,0.016,5 -camcan,region_group_lasso,82,17Networks_RH_ContA_PFCl_2,0.01688888888888889,5 -camcan,region_group_lasso,47,17Networks_LH_DefaultB_PFCv_2,0.017444444444444446,5 -camcan,region_group_lasso,48,17Networks_LH_DefaultC_Rsp_1,0.017444444444444446,5 -camcan,region_group_lasso,69,17Networks_RH_DorsAttnB_PostC_2,0.020444444444444446,5 -camcan,region_group_lasso,7,17Networks_LH_VisPeri_ExStrSup_1,0.021888888888888892,5 -camcan,region_group_lasso,38,17Networks_LH_DefaultA_PFCd_1,0.021888888888888892,5 -camcan,region_group_lasso,36,17Networks_LH_ContC_pCun_2,0.024888888888888887,5 -camcan,region_group_lasso,49,17Networks_LH_DefaultC_PHC_1,0.024888888888888887,5 -camcan,region_group_lasso,76,17Networks_RH_SalVentAttnB_PFCl_1,0.024888888888888887,5 -camcan,region_group_lasso,57,17Networks_RH_SomMotA_1,0.025444444444444447,5 -camcan,region_group_lasso,67,17Networks_RH_DorsAttnA_SPL_1,0.02688888888888889,5 -camcan,region_group_lasso,21,17Networks_LH_SalVentAttnA_ParOper_1,0.02744444444444445,5 -camcan,region_group_lasso,81,17Networks_RH_ContA_PFCl_1,0.028444444444444446,5 -camcan,region_group_lasso,19,17Networks_LH_DorsAttnB_PostC_3,0.029000000000000005,5 -camcan,region_group_lasso,90,17Networks_RH_DefaultA_PFCd_1,0.029000000000000005,5 -camcan,region_group_lasso,83,17Networks_RH_ContB_Temp_1,0.031,5 -camcan,region_group_lasso,30,17Networks_LH_LimbicA_TempPole_2,0.03188888888888889,5 -camcan,region_group_lasso,45,17Networks_LH_DefaultB_PFCl_1,0.032,5 -camcan,region_group_lasso,5,17Networks_LH_VisPeri_ExStrInf_1,0.03244444444444444,5 -camcan,region_group_lasso,6,17Networks_LH_VisPeri_StriCal_1,0.03288888888888889,5 -camcan,region_group_lasso,18,17Networks_LH_DorsAttnB_PostC_2,0.033,5 -camcan,region_group_lasso,54,17Networks_RH_VisPeri_StriCal_1,0.03344444444444444,5 -camcan,region_group_lasso,70,17Networks_RH_DorsAttnB_FEF_1,0.036444444444444446,5 -camcan,region_group_lasso,64,17Networks_RH_SomMotB_Cent_1,0.03866666666666667,5 -camcan,region_group_lasso,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.04,5 -camcan,region_group_lasso,84,17Networks_RH_ContB_IPL_1,0.04,5 -camcan,region_group_lasso,26,17Networks_LH_SalVentAttnB_PFCl_1,0.041444444444444443,5 -camcan,region_group_lasso,62,17Networks_RH_SomMotB_S2_1,0.042333333333333334,5 -camcan,region_group_lasso,65,17Networks_RH_DorsAttnA_TempOcc_1,0.042888888888888886,5 -camcan,region_group_lasso,98,17Networks_RH_TempPar_1,0.043777777777777784,5 -camcan,region_group_lasso,20,17Networks_LH_DorsAttnB_FEF_1,0.04444444444444444,5 -camcan,region_group_lasso,50,17Networks_LH_TempPar_1,0.04444444444444444,5 -camcan,region_group_lasso,33,17Networks_LH_ContA_PFCl_2,0.04622222222222222,5 -camcan,region_group_lasso,15,17Networks_LH_DorsAttnA_ParOcc_1,0.048,5 -camcan,region_group_lasso,39,17Networks_LH_DefaultA_pCunPCC_1,0.04888888888888889,5 -camcan,region_group_lasso,12,17Networks_LH_SomMotB_S2_2,0.049444444444444444,5 -camcan,region_group_lasso,85,17Networks_RH_ContB_PFCld_1,0.05,5 -camcan,region_group_lasso,72,17Networks_RH_SalVentAttnA_Ins_1,0.050777777777777776,5 -camcan,region_group_lasso,91,17Networks_RH_DefaultA_pCunPCC_1,0.05177777777777778,5 -camcan,region_group_lasso,68,17Networks_RH_DorsAttnB_PostC_1,0.052000000000000005,5 -camcan,region_group_lasso,66,17Networks_RH_DorsAttnA_ParOcc_1,0.05388888888888889,5 -camcan,region_group_lasso,55,17Networks_RH_VisPeri_ExStrInf_1,0.05533333333333333,5 -camcan,region_group_lasso,32,17Networks_LH_ContA_PFCl_1,0.05611111111111111,5 -camcan,region_group_lasso,73,17Networks_RH_SalVentAttnA_ParMed_1,0.05644444444444444,5 -camcan,region_group_lasso,40,17Networks_LH_DefaultA_PFCm_1,0.058666666666666666,5 -camcan,region_group_lasso,71,17Networks_RH_SalVentAttnA_ParOper_1,0.06188888888888888,5 -camcan,region_group_lasso,2,17Networks_LH_VisCent_ExStr_2,0.06633333333333333,5 -camcan,region_group_lasso,41,17Networks_LH_DefaultB_Temp_1,0.07033333333333333,5 -camcan,region_group_lasso,23,17Networks_LH_SalVentAttnA_Ins_2,0.07111111111111111,5 -camcan,region_group_lasso,97,17Networks_RH_DefaultC_PHC_1,0.07177777777777777,5 -camcan,region_group_lasso,37,17Networks_LH_ContC_Cingp_1,0.072,5 -camcan,region_group_lasso,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.074,5 -camcan,region_group_lasso,53,17Networks_RH_VisCent_ExStr_3,0.074,5 -camcan,region_group_lasso,16,17Networks_LH_DorsAttnA_SPL_1,0.07544444444444445,5 -camcan,region_group_lasso,46,17Networks_LH_DefaultB_PFCv_1,0.07577777777777778,5 -camcan,region_group_lasso,74,17Networks_RH_SalVentAttnA_FrMed_1,0.07788888888888888,5 -camcan,region_group_lasso,17,17Networks_LH_DorsAttnB_PostC_1,0.07866666666666666,5 -camcan,region_group_lasso,92,17Networks_RH_DefaultA_PFCm_1,0.08166666666666667,5 -camcan,region_group_lasso,80,17Networks_RH_ContA_IPS_1,0.085,5 -camcan,region_group_lasso,25,17Networks_LH_SalVentAttnA_FrMed_1,0.092,5 -camcan,region_group_lasso,63,17Networks_RH_SomMotB_S2_2,0.09333333333333334,5 -camcan,region_group_lasso,88,17Networks_RH_ContC_pCun_1,0.095,5 -camcan,region_group_lasso,58,17Networks_RH_SomMotA_2,0.09655555555555555,5 -camcan,region_group_lasso,10,17Networks_LH_SomMotB_Aud_1,0.10277777777777777,5 -camcan,region_group_lasso,34,17Networks_LH_ContB_PFClv_1,0.10333333333333332,5 -camcan,region_group_lasso,51,17Networks_RH_VisCent_ExStr_1,0.10588888888888888,5 -camcan,region_group_lasso,13,17Networks_LH_SomMotB_Cent_1,0.11011111111111109,5 -camcan,region_group_lasso,99,17Networks_RH_TempPar_2,0.11066666666666666,5 -camcan,region_group_lasso,35,17Networks_LH_ContC_pCun_1,0.11177777777777778,5 -camcan,region_group_lasso,100,17Networks_RH_TempPar_3,0.11499999999999999,5 -camcan,region_group_lasso,14,17Networks_LH_DorsAttnA_TempOcc_1,0.12111111111111113,5 -camcan,region_group_lasso,95,17Networks_RH_DefaultB_PFCv_2,0.12722222222222224,5 -camcan,region_group_lasso,29,17Networks_LH_LimbicA_TempPole_1,0.13155555555555556,5 -camcan,region_group_lasso,87,17Networks_RH_ContC_Cingp_1,0.13366666666666666,5 -camcan,region_group_lasso,8,17Networks_LH_SomMotA_1,0.13877777777777778,5 -camcan,region_group_lasso,31,17Networks_LH_ContA_IPS_1,0.14,5 -camcan,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.14033333333333334,5 -camcan,region_group_lasso,60,17Networks_RH_SomMotA_4,0.14177777777777778,5 -camcan,region_group_lasso,1,17Networks_LH_VisCent_ExStr_1,0.14355555555555558,5 -camcan,region_group_lasso,24,17Networks_LH_SalVentAttnA_ParMed_1,0.14500000000000002,5 -camcan,region_group_lasso,44,17Networks_LH_DefaultB_PFCd_1,0.14855555555555555,5 -camcan,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.14866666666666667,5 -camcan,region_group_lasso,61,17Networks_RH_SomMotB_Aud_1,0.149,5 -camcan,region_group_lasso,52,17Networks_RH_VisCent_ExStr_2,0.16444444444444445,5 -camcan,region_group_lasso,4,17Networks_LH_VisCent_ExStr_3,0.18644444444444444,5 -camcan,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.1911111111111111,5 -camcan,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.19333333333333333,5 -camcan,region_group_lasso,93,17Networks_RH_DefaultB_PFCd_1,0.19522222222222224,5 -camcan,region_group_lasso,59,17Networks_RH_SomMotA_3,0.2053333333333333,5 -camcan,region_group_lasso,86,17Networks_RH_ContB_PFClv_1,0.21155555555555558,5 -camcan,region_group_lasso,9,17Networks_LH_SomMotA_2,0.21444444444444444,5 -camcan,region_group_lasso,3,17Networks_LH_VisCent_Striate_1,0.4004444444444445,5 -camcan,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.4011111111111111,5 -hcp,region_elasticnet,41,17Networks_LH_DefaultB_Temp_1,0.017142857142857144,5 -hcp,region_elasticnet,62,17Networks_RH_SomMotB_S2_1,0.017142857142857144,5 -hcp,region_elasticnet,66,17Networks_RH_DorsAttnA_ParOcc_1,0.017142857142857144,5 -hcp,region_elasticnet,99,17Networks_RH_TempPar_2,0.017142857142857144,5 -hcp,region_elasticnet,48,17Networks_LH_DefaultC_Rsp_1,0.019642857142857142,5 -hcp,region_elasticnet,73,17Networks_RH_SalVentAttnA_ParMed_1,0.019642857142857142,5 -hcp,region_elasticnet,11,17Networks_LH_SomMotB_S2_1,0.022857142857142857,5 -hcp,region_elasticnet,17,17Networks_LH_DorsAttnB_PostC_1,0.022857142857142857,5 -hcp,region_elasticnet,18,17Networks_LH_DorsAttnB_PostC_2,0.022857142857142857,5 -hcp,region_elasticnet,21,17Networks_LH_SalVentAttnA_ParOper_1,0.022857142857142857,5 -hcp,region_elasticnet,25,17Networks_LH_SalVentAttnA_FrMed_1,0.022857142857142857,5 -hcp,region_elasticnet,42,17Networks_LH_DefaultB_Temp_2,0.022857142857142857,5 -hcp,region_elasticnet,75,17Networks_RH_SalVentAttnB_IPL_1,0.022857142857142857,5 -hcp,region_elasticnet,91,17Networks_RH_DefaultA_pCunPCC_1,0.022857142857142857,5 -hcp,region_elasticnet,39,17Networks_LH_DefaultA_pCunPCC_1,0.023896103896103894,5 -hcp,region_elasticnet,74,17Networks_RH_SalVentAttnA_FrMed_1,0.025357142857142856,5 -hcp,region_elasticnet,85,17Networks_RH_ContB_PFCld_1,0.025357142857142856,5 -hcp,region_elasticnet,76,17Networks_RH_SalVentAttnB_PFCl_1,0.02623376623376623,5 -hcp,region_elasticnet,96,17Networks_RH_DefaultC_Rsp_1,0.026857142857142857,5 -hcp,region_elasticnet,30,17Networks_LH_LimbicA_TempPole_2,0.027142857142857146,5 -hcp,region_elasticnet,26,17Networks_LH_SalVentAttnB_PFCl_1,0.02857142857142857,5 -hcp,region_elasticnet,63,17Networks_RH_SomMotB_S2_2,0.02857142857142857,5 -hcp,region_elasticnet,36,17Networks_LH_ContC_pCun_2,0.03035714285714286,5 -hcp,region_elasticnet,3,17Networks_LH_VisCent_Striate_1,0.03194805194805195,5 -hcp,region_elasticnet,81,17Networks_RH_ContA_PFCl_1,0.03194805194805195,5 -hcp,region_elasticnet,13,17Networks_LH_SomMotB_Cent_1,0.032857142857142856,5 -hcp,region_elasticnet,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.03444805194805195,5 -hcp,region_elasticnet,7,17Networks_LH_VisPeri_ExStrSup_1,0.036071428571428574,5 -hcp,region_elasticnet,12,17Networks_LH_SomMotB_S2_2,0.03694805194805195,5 -hcp,region_elasticnet,90,17Networks_RH_DefaultA_PFCd_1,0.03766233766233766,5 -hcp,region_elasticnet,82,17Networks_RH_ContA_PFCl_2,0.03785714285714285,5 -hcp,region_elasticnet,33,17Networks_LH_ContA_PFCl_2,0.04057142857142857,5 -hcp,region_elasticnet,24,17Networks_LH_SalVentAttnA_ParMed_1,0.04178571428571428,5 -hcp,region_elasticnet,95,17Networks_RH_DefaultB_PFCv_2,0.043376623376623374,5 -hcp,region_elasticnet,51,17Networks_RH_VisCent_ExStr_1,0.04337662337662338,5 -hcp,region_elasticnet,65,17Networks_RH_DorsAttnA_TempOcc_1,0.044415584415584415,5 -hcp,region_elasticnet,86,17Networks_RH_ContB_PFClv_1,0.046285714285714284,5 -hcp,region_elasticnet,37,17Networks_LH_ContC_Cingp_1,0.04694805194805195,5 -hcp,region_elasticnet,71,17Networks_RH_SalVentAttnA_ParOper_1,0.0475,5 -hcp,region_elasticnet,54,17Networks_RH_VisPeri_StriCal_1,0.0487012987012987,5 -hcp,region_elasticnet,1,17Networks_LH_VisCent_ExStr_1,0.05012987012987012,5 -hcp,region_elasticnet,98,17Networks_RH_TempPar_1,0.05012987012987012,5 -hcp,region_elasticnet,8,17Networks_LH_SomMotA_1,0.05035714285714286,5 -hcp,region_elasticnet,61,17Networks_RH_SomMotB_Aud_1,0.051071428571428566,5 -hcp,region_elasticnet,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.05246753246753246,5 -hcp,region_elasticnet,57,17Networks_RH_SomMotA_1,0.05246753246753246,5 -hcp,region_elasticnet,92,17Networks_RH_DefaultA_PFCm_1,0.05357142857142857,5 -hcp,region_elasticnet,20,17Networks_LH_DorsAttnB_FEF_1,0.05387662337662338,5 -hcp,region_elasticnet,70,17Networks_RH_DorsAttnB_FEF_1,0.055129870129870126,5 -hcp,region_elasticnet,15,17Networks_LH_DorsAttnA_ParOcc_1,0.056467532467532465,5 -hcp,region_elasticnet,83,17Networks_RH_ContB_Temp_1,0.05812987012987013,5 -hcp,region_elasticnet,46,17Networks_LH_DefaultB_PFCv_1,0.061558441558441555,5 -hcp,region_elasticnet,23,17Networks_LH_SalVentAttnA_Ins_2,0.06275324675324676,5 -hcp,region_elasticnet,53,17Networks_RH_VisCent_ExStr_3,0.06441558441558441,5 -hcp,region_elasticnet,5,17Networks_LH_VisPeri_ExStrInf_1,0.06831168831168831,5 -hcp,region_elasticnet,52,17Networks_RH_VisCent_ExStr_2,0.06838311688311688,5 -hcp,region_elasticnet,89,17Networks_RH_DefaultA_IPL_1,0.06914285714285714,5 -hcp,region_elasticnet,88,17Networks_RH_ContC_pCun_1,0.07247402597402597,5 -hcp,region_elasticnet,32,17Networks_LH_ContA_PFCl_1,0.07935714285714286,5 -hcp,region_elasticnet,31,17Networks_LH_ContA_IPS_1,0.08535714285714285,5 -hcp,region_elasticnet,69,17Networks_RH_DorsAttnB_PostC_2,0.08535714285714285,5 -hcp,region_elasticnet,50,17Networks_LH_TempPar_1,0.08841558441558442,5 -hcp,region_elasticnet,14,17Networks_LH_DorsAttnA_TempOcc_1,0.09045454545454545,5 -hcp,region_elasticnet,56,17Networks_RH_VisPeri_ExStrSup_1,0.09581168831168832,5 -hcp,region_elasticnet,84,17Networks_RH_ContB_IPL_1,0.10051948051948052,5 -hcp,region_elasticnet,64,17Networks_RH_SomMotB_Cent_1,0.1014935064935065,5 -hcp,region_elasticnet,29,17Networks_LH_LimbicA_TempPole_1,0.1037012987012987,5 -hcp,region_elasticnet,67,17Networks_RH_DorsAttnA_SPL_1,0.10496753246753247,5 -hcp,region_elasticnet,55,17Networks_RH_VisPeri_ExStrInf_1,0.11035714285714286,5 -hcp,region_elasticnet,2,17Networks_LH_VisCent_ExStr_2,0.11113636363636363,5 -hcp,region_elasticnet,87,17Networks_RH_ContC_Cingp_1,0.11285714285714285,5 -hcp,region_elasticnet,19,17Networks_LH_DorsAttnB_PostC_3,0.1200974025974026,5 -hcp,region_elasticnet,4,17Networks_LH_VisCent_ExStr_3,0.12018181818181817,5 -hcp,region_elasticnet,44,17Networks_LH_DefaultB_PFCd_1,0.12176623376623377,5 -hcp,region_elasticnet,16,17Networks_LH_DorsAttnA_SPL_1,0.12194805194805194,5 -hcp,region_elasticnet,38,17Networks_LH_DefaultA_PFCd_1,0.12571428571428572,5 -hcp,region_elasticnet,58,17Networks_RH_SomMotA_2,0.13444805194805193,5 -hcp,region_elasticnet,80,17Networks_RH_ContA_IPS_1,0.1480194805194805,5 -hcp,region_elasticnet,28,17Networks_LH_LimbicB_OFC_1,0.1514285714285714,5 -hcp,region_elasticnet,79,17Networks_RH_LimbicA_TempPole_1,0.1556818181818182,5 -hcp,region_elasticnet,10,17Networks_LH_SomMotB_Aud_1,0.16259740259740257,5 -hcp,region_elasticnet,45,17Networks_LH_DefaultB_PFCl_1,0.16571428571428573,5 -hcp,region_elasticnet,22,17Networks_LH_SalVentAttnA_Ins_1,0.17753246753246754,5 -hcp,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.1799025974025974,5 -hcp,region_elasticnet,6,17Networks_LH_VisPeri_StriCal_1,0.18155844155844153,5 -hcp,region_elasticnet,100,17Networks_RH_TempPar_3,0.19116883116883115,5 -hcp,region_elasticnet,9,17Networks_LH_SomMotA_2,0.20033766233766234,5 -hcp,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.2569480519480519,5 -hcp,region_elasticnet,60,17Networks_RH_SomMotA_4,0.2580844155844156,5 -hcp,region_elasticnet,68,17Networks_RH_DorsAttnB_PostC_1,0.25957142857142856,5 -hcp,region_elasticnet,43,17Networks_LH_DefaultB_IPL_1,0.33306493506493506,5 -hcp,region_elasticnet,35,17Networks_LH_ContC_pCun_1,0.3763116883116883,5 -hcp,region_elasticnet,72,17Networks_RH_SalVentAttnA_Ins_1,0.38137012987012986,5 -hcp,region_elasticnet,34,17Networks_LH_ContB_PFClv_1,0.44516233766233765,5 -hcp,region_elasticnet,94,17Networks_RH_DefaultB_PFCv_1,0.46564285714285714,5 -hcp,region_elasticnet,47,17Networks_LH_DefaultB_PFCv_2,0.5572272727272727,5 -hcp,region_elasticnet,97,17Networks_RH_DefaultC_PHC_1,0.5595,5 -hcp,region_elasticnet,59,17Networks_RH_SomMotA_3,0.5822987012987013,5 -hcp,region_elasticnet,49,17Networks_LH_DefaultC_PHC_1,0.6307857142857143,5 -hcp,region_elasticnet,40,17Networks_LH_DefaultA_PFCm_1,0.6489415584415584,5 -hcp,region_group_lasso,62,17Networks_RH_SomMotB_S2_1,0.005,5 -hcp,region_group_lasso,30,17Networks_LH_LimbicA_TempPole_2,0.01,5 -hcp,region_group_lasso,48,17Networks_LH_DefaultC_Rsp_1,0.01,5 -hcp,region_group_lasso,18,17Networks_LH_DorsAttnB_PostC_2,0.010714285714285714,5 -hcp,region_group_lasso,55,17Networks_RH_VisPeri_ExStrInf_1,0.010714285714285714,5 -hcp,region_group_lasso,99,17Networks_RH_TempPar_2,0.010714285714285714,5 -hcp,region_group_lasso,91,17Networks_RH_DefaultA_pCunPCC_1,0.011428571428571429,5 -hcp,region_group_lasso,7,17Networks_LH_VisPeri_ExStrSup_1,0.015714285714285715,5 -hcp,region_group_lasso,36,17Networks_LH_ContC_pCun_2,0.015714285714285715,5 -hcp,region_group_lasso,42,17Networks_LH_DefaultB_Temp_2,0.015714285714285715,5 -hcp,region_group_lasso,85,17Networks_RH_ContB_PFCld_1,0.015714285714285715,5 -hcp,region_group_lasso,66,17Networks_RH_DorsAttnA_ParOcc_1,0.02015873015873016,5 -hcp,region_group_lasso,96,17Networks_RH_DefaultC_Rsp_1,0.02015873015873016,5 -hcp,region_group_lasso,13,17Networks_LH_SomMotB_Cent_1,0.02142857142857143,5 -hcp,region_group_lasso,33,17Networks_LH_ContA_PFCl_2,0.025873015873015874,5 -hcp,region_group_lasso,41,17Networks_LH_DefaultB_Temp_1,0.026587301587301587,5 -hcp,region_group_lasso,17,17Networks_LH_DorsAttnB_PostC_1,0.027142857142857146,5 -hcp,region_group_lasso,65,17Networks_RH_DorsAttnA_TempOcc_1,0.02777777777777778,5 -hcp,region_group_lasso,39,17Networks_LH_DefaultA_pCunPCC_1,0.028492063492063492,5 -hcp,region_group_lasso,76,17Networks_RH_SalVentAttnB_PFCl_1,0.02904761904761905,5 -hcp,region_group_lasso,81,17Networks_RH_ContA_PFCl_1,0.02904761904761905,5 -hcp,region_group_lasso,51,17Networks_RH_VisCent_ExStr_1,0.03142857142857143,5 -hcp,region_group_lasso,11,17Networks_LH_SomMotB_S2_1,0.03158730158730159,5 -hcp,region_group_lasso,54,17Networks_RH_VisPeri_StriCal_1,0.032380952380952385,5 -hcp,region_group_lasso,87,17Networks_RH_ContC_Cingp_1,0.032857142857142856,5 -hcp,region_group_lasso,73,17Networks_RH_SalVentAttnA_ParMed_1,0.0334920634920635,5 -hcp,region_group_lasso,83,17Networks_RH_ContB_Temp_1,0.034206349206349206,5 -hcp,region_group_lasso,57,17Networks_RH_SomMotA_1,0.03476190476190476,5 -hcp,region_group_lasso,12,17Networks_LH_SomMotB_S2_2,0.03547619047619048,5 -hcp,region_group_lasso,21,17Networks_LH_SalVentAttnA_ParOper_1,0.0373015873015873,5 -hcp,region_group_lasso,25,17Networks_LH_SalVentAttnA_FrMed_1,0.0373015873015873,5 -hcp,region_group_lasso,3,17Networks_LH_VisCent_Striate_1,0.03801587301587302,5 -hcp,region_group_lasso,1,17Networks_LH_VisCent_ExStr_1,0.0392063492063492,5 -hcp,region_group_lasso,75,17Networks_RH_SalVentAttnB_IPL_1,0.039285714285714285,5 -hcp,region_group_lasso,46,17Networks_LH_DefaultB_PFCv_1,0.03976190476190476,5 -hcp,region_group_lasso,52,17Networks_RH_VisCent_ExStr_2,0.04182539682539683,5 -hcp,region_group_lasso,63,17Networks_RH_SomMotB_S2_2,0.0423015873015873,5 -hcp,region_group_lasso,19,17Networks_LH_DorsAttnB_PostC_3,0.04238095238095238,5 -hcp,region_group_lasso,98,17Networks_RH_TempPar_1,0.04238095238095238,5 -hcp,region_group_lasso,26,17Networks_LH_SalVentAttnB_PFCl_1,0.04357142857142857,5 -hcp,region_group_lasso,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.045476190476190476,5 -hcp,region_group_lasso,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.04571428571428572,5 -hcp,region_group_lasso,5,17Networks_LH_VisPeri_ExStrInf_1,0.048095238095238094,5 -hcp,region_group_lasso,70,17Networks_RH_DorsAttnB_FEF_1,0.048095238095238094,5 -hcp,region_group_lasso,74,17Networks_RH_SalVentAttnA_FrMed_1,0.04873015873015873,5 -hcp,region_group_lasso,82,17Networks_RH_ContA_PFCl_2,0.04873015873015873,5 -hcp,region_group_lasso,37,17Networks_LH_ContC_Cingp_1,0.05063492063492063,5 -hcp,region_group_lasso,53,17Networks_RH_VisCent_ExStr_3,0.05063492063492063,5 -hcp,region_group_lasso,23,17Networks_LH_SalVentAttnA_Ins_2,0.05182539682539683,5 -hcp,region_group_lasso,58,17Networks_RH_SomMotA_2,0.05444444444444445,5 -hcp,region_group_lasso,64,17Networks_RH_SomMotB_Cent_1,0.055158730158730164,5 -hcp,region_group_lasso,6,17Networks_LH_VisPeri_StriCal_1,0.055634920634920634,5 -hcp,region_group_lasso,95,17Networks_RH_DefaultB_PFCv_2,0.055714285714285716,5 -hcp,region_group_lasso,88,17Networks_RH_ContC_pCun_1,0.05634920634920635,5 -hcp,region_group_lasso,24,17Networks_LH_SalVentAttnA_ParMed_1,0.06142857142857142,5 -hcp,region_group_lasso,69,17Networks_RH_DorsAttnB_PostC_2,0.06333333333333332,5 -hcp,region_group_lasso,2,17Networks_LH_VisCent_ExStr_2,0.06825396825396826,5 -hcp,region_group_lasso,32,17Networks_LH_ContA_PFCl_1,0.07158730158730159,5 -hcp,region_group_lasso,90,17Networks_RH_DefaultA_PFCd_1,0.07277777777777779,5 -hcp,region_group_lasso,15,17Networks_LH_DorsAttnA_ParOcc_1,0.0734920634920635,5 -hcp,region_group_lasso,71,17Networks_RH_SalVentAttnA_ParOper_1,0.07357142857142858,5 -hcp,region_group_lasso,20,17Networks_LH_DorsAttnB_FEF_1,0.08158730158730158,5 -hcp,region_group_lasso,31,17Networks_LH_ContA_IPS_1,0.08158730158730158,5 -hcp,region_group_lasso,56,17Networks_RH_VisPeri_ExStrSup_1,0.08682539682539683,5 -hcp,region_group_lasso,80,17Networks_RH_ContA_IPS_1,0.08714285714285715,5 -hcp,region_group_lasso,67,17Networks_RH_DorsAttnA_SPL_1,0.08809523809523809,5 -hcp,region_group_lasso,84,17Networks_RH_ContB_IPL_1,0.08825396825396825,5 -hcp,region_group_lasso,92,17Networks_RH_DefaultA_PFCm_1,0.08928571428571427,5 -hcp,region_group_lasso,89,17Networks_RH_DefaultA_IPL_1,0.0923015873015873,5 -hcp,region_group_lasso,38,17Networks_LH_DefaultA_PFCd_1,0.09992063492063492,5 -hcp,region_group_lasso,86,17Networks_RH_ContB_PFClv_1,0.10015873015873016,5 -hcp,region_group_lasso,50,17Networks_LH_TempPar_1,0.11666666666666667,5 -hcp,region_group_lasso,4,17Networks_LH_VisCent_ExStr_3,0.12492063492063492,5 -hcp,region_group_lasso,68,17Networks_RH_DorsAttnB_PostC_1,0.1353968253968254,5 -hcp,region_group_lasso,8,17Networks_LH_SomMotA_1,0.14333333333333334,5 -hcp,region_group_lasso,61,17Networks_RH_SomMotB_Aud_1,0.14714285714285713,5 -hcp,region_group_lasso,16,17Networks_LH_DorsAttnA_SPL_1,0.14785714285714285,5 -hcp,region_group_lasso,93,17Networks_RH_DefaultB_PFCd_1,0.17142857142857143,5 -hcp,region_group_lasso,44,17Networks_LH_DefaultB_PFCd_1,0.17253968253968252,5 -hcp,region_group_lasso,14,17Networks_LH_DorsAttnA_TempOcc_1,0.17896825396825397,5 -hcp,region_group_lasso,29,17Networks_LH_LimbicA_TempPole_1,0.19357142857142856,5 -hcp,region_group_lasso,10,17Networks_LH_SomMotB_Aud_1,0.20023809523809524,5 -hcp,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.21357142857142858,5 -hcp,region_group_lasso,45,17Networks_LH_DefaultB_PFCl_1,0.21984126984126987,5 -hcp,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.22373015873015872,5 -hcp,region_group_lasso,100,17Networks_RH_TempPar_3,0.24230158730158732,5 -hcp,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.2523015873015873,5 -hcp,region_group_lasso,35,17Networks_LH_ContC_pCun_1,0.3103174603174603,5 -hcp,region_group_lasso,9,17Networks_LH_SomMotA_2,0.33492063492063495,5 -hcp,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.35666666666666663,5 -hcp,region_group_lasso,60,17Networks_RH_SomMotA_4,0.4093650793650793,5 -hcp,region_group_lasso,72,17Networks_RH_SalVentAttnA_Ins_1,0.44103174603174605,5 -hcp,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.451031746031746,5 -hcp,region_group_lasso,34,17Networks_LH_ContB_PFClv_1,0.484047619047619,5 -hcp,region_group_lasso,47,17Networks_LH_DefaultB_PFCv_2,0.518968253968254,5 -hcp,region_group_lasso,49,17Networks_LH_DefaultC_PHC_1,0.5321428571428571,5 -hcp,region_group_lasso,94,17Networks_RH_DefaultB_PFCv_1,0.5664285714285715,5 -hcp,region_group_lasso,97,17Networks_RH_DefaultC_PHC_1,0.575952380952381,5 -hcp,region_group_lasso,59,17Networks_RH_SomMotA_3,0.641984126984127,5 -hcp,region_group_lasso,40,17Networks_LH_DefaultA_PFCm_1,0.7090476190476191,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_main_network_rank_table.csv b/scripts/interpretability/focus/outputs/csv/consensus2_main_network_rank_table.csv deleted file mode 100644 index 4e49ea96..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_main_network_rank_table.csv +++ /dev/null @@ -1,5 +0,0 @@ -Network,camcan_score,camcan_std,camcan_n_subnetworks,camcan_rank,hcp_score,hcp_std,hcp_n_subnetworks,hcp_rank -Visual,0.744167918413957,0.0,1,1,0.5212188856528112,0.0,1,3 -Limbic,0.5602834543024853,0.0,1,4,0.46096140801028496,0.0,1,4 -Frontoparietal/Control,0.6404281326381431,0.0,1,3,0.8649834960126739,0.0,1,2 -Default,0.7329734742787606,0.0,1,2,0.9952582703602352,0.0,1,1 diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_main_network_rank_table.tex b/scripts/interpretability/focus/outputs/csv/consensus2_main_network_rank_table.tex deleted file mode 100644 index 3b1eb8da..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_main_network_rank_table.tex +++ /dev/null @@ -1,14 +0,0 @@ -\begin{table}[ht] -\caption{Main Yeo-network consensus scores, within-network subnetwork variability (SD), and ranking for each dataset. Score = mean consensus score averaged over all models and embedding representations; SD = standard deviation across subnetworks belonging to each main network; rank 1 = most selected.} -\label{tab:main_network_ranks} -\begin{tabular}{lcccccccc} -\toprule -Network & CAMCAN score & CAMCAN SD & $n_{\text{sub}}$ & CAMCAN rank & HCP score & HCP SD & $n_{\text{sub}}$ & HCP rank \\ -\midrule -Visual & 0.744 & 0.000 & 1 & 1 & 0.521 & 0.000 & 1 & 3 \\ -Limbic & 0.560 & 0.000 & 1 & 4 & 0.461 & 0.000 & 1 & 4 \\ -Frontoparietal/Control & 0.640 & 0.000 & 1 & 3 & 0.865 & 0.000 & 1 & 2 \\ -Default & 0.733 & 0.000 & 1 & 2 & 0.995 & 0.000 & 1 & 1 \\ -\bottomrule -\end{tabular} -\end{table} diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_main_networks_global_kendall_table.tex b/scripts/interpretability/focus/outputs/csv/consensus2_main_networks_global_kendall_table.tex deleted file mode 100644 index 24972101..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_main_networks_global_kendall_table.tex +++ /dev/null @@ -1,17 +0,0 @@ -\begin{table}[ht] -\caption{Global network selection ranking concordance between HCP and CamCAN (averaged across all models and embedding representations). Kendall $\tau = 0.3333$, $p = 0.3813$ ((ns)), $n = 7$ networks.} -\label{tab:global_kendall} -\begin{tabular}{lccccc} -\toprule -Network & HCP score & HCP rank & CamCAN score & CamCAN rank & $\Delta$ rank \\ -\midrule -Default & 0.9953 & 1 & 0.7330 & 2 & -1 \\ -Somatomotor & 0.9251 & 2 & 0.7217 & 3 & -1 \\ -Control & 0.8650 & 3 & 0.6404 & 4 & -1 \\ -VentralAttention & 0.6678 & 4 & 0.4913 & 6 & -2 \\ -DorsalAttention & 0.6250 & 5 & 0.4667 & 7 & -2 \\ -Visual & 0.5212 & 6 & 0.7442 & 1 & +5 \\ -Limbic & 0.4610 & 7 & 0.5603 & 5 & +2 \\ -\bottomrule -\end{tabular} -\end{table} diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_networks_average_scores.csv b/scripts/interpretability/focus/outputs/csv/consensus2_networks_average_scores.csv deleted file mode 100644 index 0b6393ae..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_networks_average_scores.csv +++ /dev/null @@ -1,29 +0,0 @@ -dataset,model,network_name,average_score,embedding_count -camcan,region_elasticnet,VentralAttention,0.40374736693846536,5 -camcan,region_elasticnet,DorsalAttention,0.4411531877577833,5 -camcan,region_elasticnet,Limbic,0.5471062043940638,5 -camcan,region_elasticnet,Control,0.629492971203947,5 -camcan,region_elasticnet,Default,0.6414585222119495,5 -camcan,region_elasticnet,Somatomotor,0.7139903977667252,5 -camcan,region_elasticnet,Visual,0.7745273840946648,5 -camcan,region_group_lasso,DorsalAttention,0.49231043801367014,5 -camcan,region_group_lasso,Limbic,0.5734607042109069,5 -camcan,region_group_lasso,VentralAttention,0.5789084249351445,5 -camcan,region_group_lasso,Control,0.6513632940723392,5 -camcan,region_group_lasso,Visual,0.7138084527332492,5 -camcan,region_group_lasso,Somatomotor,0.7293819543020927,5 -camcan,region_group_lasso,Default,0.8244884263455715,5 -hcp,region_elasticnet,Limbic,0.4421307823826036,5 -hcp,region_elasticnet,Visual,0.6018188287911587,5 -hcp,region_elasticnet,VentralAttention,0.624419292696101,5 -hcp,region_elasticnet,DorsalAttention,0.6582789276777726,5 -hcp,region_elasticnet,Somatomotor,0.8763925948957356,5 -hcp,region_elasticnet,Control,0.8942707379855864,5 -hcp,region_elasticnet,Default,0.9952012062403639,5 -hcp,region_group_lasso,Visual,0.44061894251446365,5 -hcp,region_group_lasso,Limbic,0.47979203363796624,5 -hcp,region_group_lasso,DorsalAttention,0.5918027805740629,5 -hcp,region_group_lasso,VentralAttention,0.7112469715800149,5 -hcp,region_group_lasso,Control,0.8356962540397614,5 -hcp,region_group_lasso,Somatomotor,0.9738728366004498,5 -hcp,region_group_lasso,Default,0.9953153344801065,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall.csv b/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall.csv deleted file mode 100644 index 52cbd7cb..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall.csv +++ /dev/null @@ -1,8 +0,0 @@ -network_name,hcp_score,camcan_score,hcp_rank,camcan_rank -Default,0.9952582703602353,0.7329734742787606,1,2 -Somatomotor,0.9251327157480926,0.721686176034409,2,3 -Control,0.8649834960126739,0.6404281326381431,3,4 -VentralAttention,0.667833132138058,0.4913278959368049,4,6 -DorsalAttention,0.6250408541259178,0.4667318128857267,5,7 -Visual,0.521218885652811,0.744167918413957,6,1 -Limbic,0.46096140801028496,0.5602834543024853,7,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall_table.csv b/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall_table.csv deleted file mode 100644 index 2bd64572..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall_table.csv +++ /dev/null @@ -1,8 +0,0 @@ -network_name,hcp_score,hcp_rank,camcan_score,camcan_rank,rank_delta -Default,0.9953,1,0.7330,2,-1 -Somatomotor,0.9251,2,0.7217,3,-1 -Control,0.8650,3,0.6404,4,-1 -VentralAttention,0.6678,4,0.4913,6,-2 -DorsalAttention,0.6250,5,0.4667,7,-2 -Visual,0.5212,6,0.7442,1,+5 -Limbic,0.4610,7,0.5603,5,+2 diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall_table.tex b/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall_table.tex deleted file mode 100644 index 317be673..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_networks_global_kendall_table.tex +++ /dev/null @@ -1,27 +0,0 @@ -\begin{table}[ht] -\caption{Global network selection ranking concordance between HCP and CamCAN (averaged across all models and embedding representations). Kendall $\tau = 0.3235$, $p = 0.0762$ ((ns)), $n = 17$ networks.} -\label{tab:global_kendall} -\begin{tabular}{lccccc} -\toprule -Network & HCP score & HCP rank & CamCAN score & CamCAN rank & $\Delta$ rank \\ -\midrule -SomMotA & 0.8674 & 1 & 0.5461 & 2 & -1 \\ -DefaultB & 0.8501 & 2 & 0.5441 & 3 & -1 \\ -DefaultA & 0.7870 & 3 & 0.2460 & 13 & -10 \\ -DefaultC & 0.6905 & 4 & 0.0952 & 17 & -13 \\ -SalVentAttnA & 0.6291 & 5 & 0.4132 & 6 & -1 \\ -ContB & 0.5659 & 6 & 0.3478 & 8 & -2 \\ -ContC & 0.4639 & 7 & 0.3494 & 7 & +0 \\ -DorsAttnB & 0.4156 & 8 & 0.2839 & 10 & -2 \\ -SomMotB & 0.3902 & 9 & 0.4509 & 5 & +4 \\ -LimbicB & 0.3864 & 10 & 0.4900 & 4 & +6 \\ -DorsAttnA & 0.3765 & 11 & 0.2797 & 11 & +0 \\ -VisCent & 0.3433 & 12 & 0.7051 & 1 & +11 \\ -ContA & 0.3145 & 13 & 0.2861 & 9 & +4 \\ -VisPeri & 0.3092 & 14 & 0.1868 & 15 & -1 \\ -TempPar & 0.3091 & 15 & 0.2791 & 12 & +3 \\ -LimbicA & 0.2617 & 16 & 0.2211 & 14 & +2 \\ -SalVentAttnB & 0.1652 & 17 & 0.1732 & 16 & +1 \\ -\bottomrule -\end{tabular} -\end{table} diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_networks_kendall_tau.csv b/scripts/interpretability/focus/outputs/csv/consensus2_networks_kendall_tau.csv deleted file mode 100644 index d7f528c3..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_networks_kendall_tau.csv +++ /dev/null @@ -1,11 +0,0 @@ -model,region_representation,kendall_tau,p_value,n_networks -region_elasticnet,flatten,0.2381,0.5619,7 -region_elasticnet,mean_std,0.4286,0.2389,7 -region_elasticnet,pca,0.3333,0.3813,7 -region_elasticnet,percentiles,-0.0476,1.0,7 -region_elasticnet,summary_stats,0.5238,0.1361,7 -region_group_lasso,flatten,0.7143,0.0302,7 -region_group_lasso,mean_std,0.488,0.1287,7 -region_group_lasso,pca,0.3333,0.3813,7 -region_group_lasso,percentiles,-0.0476,1.0,7 -region_group_lasso,summary_stats,0.5238,0.1361,7 diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_networks_top20.csv b/scripts/interpretability/focus/outputs/csv/consensus2_networks_top20.csv deleted file mode 100644 index a0feacde..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_networks_top20.csv +++ /dev/null @@ -1,29 +0,0 @@ -dataset,model,network_name,average_score,embedding_count -camcan,region_elasticnet,Visual,0.7745273840946648,5 -camcan,region_elasticnet,Somatomotor,0.7139903977667252,5 -camcan,region_elasticnet,Default,0.6414585222119495,5 -camcan,region_elasticnet,Control,0.629492971203947,5 -camcan,region_elasticnet,Limbic,0.5471062043940638,5 -camcan,region_elasticnet,DorsalAttention,0.4411531877577833,5 -camcan,region_elasticnet,VentralAttention,0.40374736693846536,5 -camcan,region_group_lasso,Default,0.8244884263455715,5 -camcan,region_group_lasso,Somatomotor,0.7293819543020927,5 -camcan,region_group_lasso,Visual,0.7138084527332492,5 -camcan,region_group_lasso,Control,0.6513632940723392,5 -camcan,region_group_lasso,VentralAttention,0.5789084249351445,5 -camcan,region_group_lasso,Limbic,0.5734607042109069,5 -camcan,region_group_lasso,DorsalAttention,0.49231043801367014,5 -hcp,region_elasticnet,Default,0.9952012062403639,5 -hcp,region_elasticnet,Control,0.8942707379855864,5 -hcp,region_elasticnet,Somatomotor,0.8763925948957356,5 -hcp,region_elasticnet,DorsalAttention,0.6582789276777726,5 -hcp,region_elasticnet,VentralAttention,0.624419292696101,5 -hcp,region_elasticnet,Visual,0.6018188287911587,5 -hcp,region_elasticnet,Limbic,0.4421307823826036,5 -hcp,region_group_lasso,Default,0.9953153344801065,5 -hcp,region_group_lasso,Somatomotor,0.9738728366004498,5 -hcp,region_group_lasso,Control,0.8356962540397614,5 -hcp,region_group_lasso,VentralAttention,0.7112469715800149,5 -hcp,region_group_lasso,DorsalAttention,0.5918027805740629,5 -hcp,region_group_lasso,Limbic,0.47979203363796624,5 -hcp,region_group_lasso,Visual,0.44061894251446365,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus2_top20_parcels.csv b/scripts/interpretability/focus/outputs/csv/consensus2_top20_parcels.csv deleted file mode 100644 index ae86e2a0..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus2_top20_parcels.csv +++ /dev/null @@ -1,81 +0,0 @@ -dataset,model,region_id,region_name,average_score,embedding_count -camcan,region_elasticnet,3,17Networks_LH_VisCent_Striate_1,0.52,5 -camcan,region_elasticnet,28,17Networks_LH_LimbicB_OFC_1,0.41047619047619044,5 -camcan,region_elasticnet,59,17Networks_RH_SomMotA_3,0.28190476190476194,5 -camcan,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.22952380952380952,5 -camcan,region_elasticnet,4,17Networks_LH_VisCent_ExStr_3,0.22000000000000003,5 -camcan,region_elasticnet,8,17Networks_LH_SomMotA_1,0.21142857142857144,5 -camcan,region_elasticnet,9,17Networks_LH_SomMotA_2,0.19523809523809524,5 -camcan,region_elasticnet,87,17Networks_RH_ContC_Cingp_1,0.17238095238095238,5 -camcan,region_elasticnet,52,17Networks_RH_VisCent_ExStr_2,0.1580952380952381,5 -camcan,region_elasticnet,60,17Networks_RH_SomMotA_4,0.1580952380952381,5 -camcan,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.15523809523809523,5 -camcan,region_elasticnet,99,17Networks_RH_TempPar_2,0.14952380952380953,5 -camcan,region_elasticnet,86,17Networks_RH_ContB_PFClv_1,0.14857142857142858,5 -camcan,region_elasticnet,2,17Networks_LH_VisCent_ExStr_2,0.14476190476190476,5 -camcan,region_elasticnet,95,17Networks_RH_DefaultB_PFCv_2,0.12952380952380954,5 -camcan,region_elasticnet,13,17Networks_LH_SomMotB_Cent_1,0.12190476190476192,5 -camcan,region_elasticnet,61,17Networks_RH_SomMotB_Aud_1,0.12190476190476189,5 -camcan,region_elasticnet,53,17Networks_RH_VisCent_ExStr_3,0.12095238095238095,5 -camcan,region_elasticnet,17,17Networks_LH_DorsAttnB_PostC_1,0.11619047619047618,5 -camcan,region_elasticnet,24,17Networks_LH_SalVentAttnA_ParMed_1,0.11333333333333333,5 -camcan,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.4011111111111111,5 -camcan,region_group_lasso,3,17Networks_LH_VisCent_Striate_1,0.4004444444444445,5 -camcan,region_group_lasso,9,17Networks_LH_SomMotA_2,0.21444444444444444,5 -camcan,region_group_lasso,86,17Networks_RH_ContB_PFClv_1,0.21155555555555558,5 -camcan,region_group_lasso,59,17Networks_RH_SomMotA_3,0.2053333333333333,5 -camcan,region_group_lasso,93,17Networks_RH_DefaultB_PFCd_1,0.19522222222222224,5 -camcan,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.19333333333333333,5 -camcan,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.1911111111111111,5 -camcan,region_group_lasso,4,17Networks_LH_VisCent_ExStr_3,0.18644444444444444,5 -camcan,region_group_lasso,52,17Networks_RH_VisCent_ExStr_2,0.16444444444444445,5 -camcan,region_group_lasso,61,17Networks_RH_SomMotB_Aud_1,0.149,5 -camcan,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.14866666666666667,5 -camcan,region_group_lasso,44,17Networks_LH_DefaultB_PFCd_1,0.14855555555555555,5 -camcan,region_group_lasso,24,17Networks_LH_SalVentAttnA_ParMed_1,0.14500000000000002,5 -camcan,region_group_lasso,1,17Networks_LH_VisCent_ExStr_1,0.14355555555555558,5 -camcan,region_group_lasso,60,17Networks_RH_SomMotA_4,0.14177777777777778,5 -camcan,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.14033333333333334,5 -camcan,region_group_lasso,31,17Networks_LH_ContA_IPS_1,0.14,5 -camcan,region_group_lasso,8,17Networks_LH_SomMotA_1,0.13877777777777778,5 -camcan,region_group_lasso,87,17Networks_RH_ContC_Cingp_1,0.13366666666666666,5 -hcp,region_elasticnet,40,17Networks_LH_DefaultA_PFCm_1,0.6489415584415584,5 -hcp,region_elasticnet,49,17Networks_LH_DefaultC_PHC_1,0.6307857142857143,5 -hcp,region_elasticnet,59,17Networks_RH_SomMotA_3,0.5822987012987013,5 -hcp,region_elasticnet,97,17Networks_RH_DefaultC_PHC_1,0.5595,5 -hcp,region_elasticnet,47,17Networks_LH_DefaultB_PFCv_2,0.5572272727272727,5 -hcp,region_elasticnet,94,17Networks_RH_DefaultB_PFCv_1,0.46564285714285714,5 -hcp,region_elasticnet,34,17Networks_LH_ContB_PFClv_1,0.44516233766233765,5 -hcp,region_elasticnet,72,17Networks_RH_SalVentAttnA_Ins_1,0.38137012987012986,5 -hcp,region_elasticnet,35,17Networks_LH_ContC_pCun_1,0.3763116883116883,5 -hcp,region_elasticnet,43,17Networks_LH_DefaultB_IPL_1,0.33306493506493506,5 -hcp,region_elasticnet,68,17Networks_RH_DorsAttnB_PostC_1,0.25957142857142856,5 -hcp,region_elasticnet,60,17Networks_RH_SomMotA_4,0.2580844155844156,5 -hcp,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.2569480519480519,5 -hcp,region_elasticnet,9,17Networks_LH_SomMotA_2,0.20033766233766234,5 -hcp,region_elasticnet,100,17Networks_RH_TempPar_3,0.19116883116883115,5 -hcp,region_elasticnet,6,17Networks_LH_VisPeri_StriCal_1,0.18155844155844153,5 -hcp,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.1799025974025974,5 -hcp,region_elasticnet,22,17Networks_LH_SalVentAttnA_Ins_1,0.17753246753246754,5 -hcp,region_elasticnet,45,17Networks_LH_DefaultB_PFCl_1,0.16571428571428573,5 -hcp,region_elasticnet,10,17Networks_LH_SomMotB_Aud_1,0.16259740259740257,5 -hcp,region_group_lasso,40,17Networks_LH_DefaultA_PFCm_1,0.7090476190476191,5 -hcp,region_group_lasso,59,17Networks_RH_SomMotA_3,0.641984126984127,5 -hcp,region_group_lasso,97,17Networks_RH_DefaultC_PHC_1,0.575952380952381,5 -hcp,region_group_lasso,94,17Networks_RH_DefaultB_PFCv_1,0.5664285714285715,5 -hcp,region_group_lasso,49,17Networks_LH_DefaultC_PHC_1,0.5321428571428571,5 -hcp,region_group_lasso,47,17Networks_LH_DefaultB_PFCv_2,0.518968253968254,5 -hcp,region_group_lasso,34,17Networks_LH_ContB_PFClv_1,0.484047619047619,5 -hcp,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.451031746031746,5 -hcp,region_group_lasso,72,17Networks_RH_SalVentAttnA_Ins_1,0.44103174603174605,5 -hcp,region_group_lasso,60,17Networks_RH_SomMotA_4,0.4093650793650793,5 -hcp,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.35666666666666663,5 -hcp,region_group_lasso,9,17Networks_LH_SomMotA_2,0.33492063492063495,5 -hcp,region_group_lasso,35,17Networks_LH_ContC_pCun_1,0.3103174603174603,5 -hcp,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.2523015873015873,5 -hcp,region_group_lasso,100,17Networks_RH_TempPar_3,0.24230158730158732,5 -hcp,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.22373015873015872,5 -hcp,region_group_lasso,45,17Networks_LH_DefaultB_PFCl_1,0.21984126984126987,5 -hcp,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.21357142857142858,5 -hcp,region_group_lasso,10,17Networks_LH_SomMotB_Aud_1,0.20023809523809524,5 -hcp,region_group_lasso,29,17Networks_LH_LimbicA_TempPole_1,0.19357142857142856,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus_average_scores.csv b/scripts/interpretability/focus/outputs/csv/consensus_average_scores.csv deleted file mode 100644 index f654147f..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus_average_scores.csv +++ /dev/null @@ -1,401 +0,0 @@ -dataset,model,region_id,region_name,average_score,embedding_count -camcan,region_elasticnet,11,17Networks_LH_SomMotB_S2_1,0.011428571428571429,5 -camcan,region_elasticnet,36,17Networks_LH_ContC_pCun_2,0.011428571428571429,5 -camcan,region_elasticnet,48,17Networks_LH_DefaultC_Rsp_1,0.011428571428571429,5 -camcan,region_elasticnet,49,17Networks_LH_DefaultC_PHC_1,0.011428571428571429,5 -camcan,region_elasticnet,57,17Networks_RH_SomMotA_1,0.011428571428571429,5 -camcan,region_elasticnet,5,17Networks_LH_VisPeri_ExStrInf_1,0.017142857142857144,5 -camcan,region_elasticnet,47,17Networks_LH_DefaultB_PFCv_2,0.017142857142857144,5 -camcan,region_elasticnet,72,17Networks_RH_SalVentAttnA_Ins_1,0.017142857142857144,5 -camcan,region_elasticnet,94,17Networks_RH_DefaultB_PFCv_1,0.018095238095238095,5 -camcan,region_elasticnet,30,17Networks_LH_LimbicA_TempPole_2,0.023809523809523808,5 -camcan,region_elasticnet,56,17Networks_RH_VisPeri_ExStrSup_1,0.023809523809523808,5 -camcan,region_elasticnet,69,17Networks_RH_DorsAttnB_PostC_2,0.023809523809523808,5 -camcan,region_elasticnet,89,17Networks_RH_DefaultA_IPL_1,0.023809523809523808,5 -camcan,region_elasticnet,96,17Networks_RH_DefaultC_Rsp_1,0.023809523809523808,5 -camcan,region_elasticnet,97,17Networks_RH_DefaultC_PHC_1,0.023809523809523808,5 -camcan,region_elasticnet,45,17Networks_LH_DefaultB_PFCl_1,0.024761904761904763,5 -camcan,region_elasticnet,82,17Networks_RH_ContA_PFCl_2,0.024761904761904763,5 -camcan,region_elasticnet,19,17Networks_LH_DorsAttnB_PostC_3,0.029523809523809525,5 -camcan,region_elasticnet,21,17Networks_LH_SalVentAttnA_ParOper_1,0.029523809523809525,5 -camcan,region_elasticnet,38,17Networks_LH_DefaultA_PFCd_1,0.029523809523809525,5 -camcan,region_elasticnet,58,17Networks_RH_SomMotA_2,0.03047619047619048,5 -camcan,region_elasticnet,75,17Networks_RH_SalVentAttnB_IPL_1,0.03047619047619048,5 -camcan,region_elasticnet,81,17Networks_RH_ContA_PFCl_1,0.03142857142857143,5 -camcan,region_elasticnet,90,17Networks_RH_DefaultA_PFCd_1,0.03142857142857143,5 -camcan,region_elasticnet,71,17Networks_RH_SalVentAttnA_ParOper_1,0.03238095238095238,5 -camcan,region_elasticnet,70,17Networks_RH_DorsAttnB_FEF_1,0.032380952380952385,5 -camcan,region_elasticnet,44,17Networks_LH_DefaultB_PFCd_1,0.03428571428571429,5 -camcan,region_elasticnet,54,17Networks_RH_VisPeri_StriCal_1,0.035238095238095235,5 -camcan,region_elasticnet,16,17Networks_LH_DorsAttnA_SPL_1,0.03619047619047619,5 -camcan,region_elasticnet,98,17Networks_RH_TempPar_1,0.03619047619047619,5 -camcan,region_elasticnet,7,17Networks_LH_VisPeri_ExStrSup_1,0.037142857142857144,5 -camcan,region_elasticnet,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.037142857142857144,5 -camcan,region_elasticnet,42,17Networks_LH_DefaultB_Temp_2,0.037142857142857144,5 -camcan,region_elasticnet,62,17Networks_RH_SomMotB_S2_1,0.037142857142857144,5 -camcan,region_elasticnet,65,17Networks_RH_DorsAttnA_TempOcc_1,0.037142857142857144,5 -camcan,region_elasticnet,67,17Networks_RH_DorsAttnA_SPL_1,0.037142857142857144,5 -camcan,region_elasticnet,91,17Networks_RH_DefaultA_pCunPCC_1,0.037142857142857144,5 -camcan,region_elasticnet,6,17Networks_LH_VisPeri_StriCal_1,0.04285714285714286,5 -camcan,region_elasticnet,25,17Networks_LH_SalVentAttnA_FrMed_1,0.04285714285714286,5 -camcan,region_elasticnet,83,17Networks_RH_ContB_Temp_1,0.04285714285714286,5 -camcan,region_elasticnet,92,17Networks_RH_DefaultA_PFCm_1,0.04285714285714286,5 -camcan,region_elasticnet,26,17Networks_LH_SalVentAttnB_PFCl_1,0.04380952380952381,5 -camcan,region_elasticnet,73,17Networks_RH_SalVentAttnA_ParMed_1,0.04380952380952381,5 -camcan,region_elasticnet,74,17Networks_RH_SalVentAttnA_FrMed_1,0.04380952380952381,5 -camcan,region_elasticnet,33,17Networks_LH_ContA_PFCl_2,0.04476190476190476,5 -camcan,region_elasticnet,76,17Networks_RH_SalVentAttnB_PFCl_1,0.049523809523809526,5 -camcan,region_elasticnet,12,17Networks_LH_SomMotB_S2_2,0.051428571428571435,5 -camcan,region_elasticnet,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.051428571428571435,5 -camcan,region_elasticnet,66,17Networks_RH_DorsAttnA_ParOcc_1,0.05714285714285714,5 -camcan,region_elasticnet,35,17Networks_LH_ContC_pCun_1,0.05809523809523809,5 -camcan,region_elasticnet,20,17Networks_LH_DorsAttnB_FEF_1,0.0580952380952381,5 -camcan,region_elasticnet,23,17Networks_LH_SalVentAttnA_Ins_2,0.0580952380952381,5 -camcan,region_elasticnet,84,17Networks_RH_ContB_IPL_1,0.06190476190476191,5 -camcan,region_elasticnet,10,17Networks_LH_SomMotB_Aud_1,0.06285714285714286,5 -camcan,region_elasticnet,15,17Networks_LH_DorsAttnA_ParOcc_1,0.06285714285714286,5 -camcan,region_elasticnet,39,17Networks_LH_DefaultA_pCunPCC_1,0.0638095238095238,5 -camcan,region_elasticnet,50,17Networks_LH_TempPar_1,0.0638095238095238,5 -camcan,region_elasticnet,68,17Networks_RH_DorsAttnB_PostC_1,0.0638095238095238,5 -camcan,region_elasticnet,18,17Networks_LH_DorsAttnB_PostC_2,0.06476190476190476,5 -camcan,region_elasticnet,46,17Networks_LH_DefaultB_PFCv_1,0.06666666666666667,5 -camcan,region_elasticnet,40,17Networks_LH_DefaultA_PFCm_1,0.0676190476190476,5 -camcan,region_elasticnet,32,17Networks_LH_ContA_PFCl_1,0.06952380952380952,5 -camcan,region_elasticnet,85,17Networks_RH_ContB_PFCld_1,0.06952380952380952,5 -camcan,region_elasticnet,88,17Networks_RH_ContC_pCun_1,0.07047619047619047,5 -camcan,region_elasticnet,41,17Networks_LH_DefaultB_Temp_1,0.07142857142857142,5 -camcan,region_elasticnet,63,17Networks_RH_SomMotB_S2_2,0.07238095238095238,5 -camcan,region_elasticnet,14,17Networks_LH_DorsAttnA_TempOcc_1,0.07619047619047618,5 -camcan,region_elasticnet,80,17Networks_RH_ContA_IPS_1,0.07714285714285715,5 -camcan,region_elasticnet,22,17Networks_LH_SalVentAttnA_Ins_1,0.08,5 -camcan,region_elasticnet,55,17Networks_RH_VisPeri_ExStrInf_1,0.08095238095238096,5 -camcan,region_elasticnet,100,17Networks_RH_TempPar_3,0.08285714285714285,5 -camcan,region_elasticnet,1,17Networks_LH_VisCent_ExStr_1,0.0838095238095238,5 -camcan,region_elasticnet,51,17Networks_RH_VisCent_ExStr_1,0.08571428571428572,5 -camcan,region_elasticnet,29,17Networks_LH_LimbicA_TempPole_1,0.08761904761904762,5 -camcan,region_elasticnet,64,17Networks_RH_SomMotB_Cent_1,0.09142857142857143,5 -camcan,region_elasticnet,37,17Networks_LH_ContC_Cingp_1,0.09142857142857144,5 -camcan,region_elasticnet,34,17Networks_LH_ContB_PFClv_1,0.09714285714285716,5 -camcan,region_elasticnet,43,17Networks_LH_DefaultB_IPL_1,0.10095238095238095,5 -camcan,region_elasticnet,79,17Networks_RH_LimbicA_TempPole_1,0.1019047619047619,5 -camcan,region_elasticnet,31,17Networks_LH_ContA_IPS_1,0.10666666666666666,5 -camcan,region_elasticnet,24,17Networks_LH_SalVentAttnA_ParMed_1,0.11333333333333333,5 -camcan,region_elasticnet,17,17Networks_LH_DorsAttnB_PostC_1,0.11619047619047618,5 -camcan,region_elasticnet,53,17Networks_RH_VisCent_ExStr_3,0.12095238095238095,5 -camcan,region_elasticnet,61,17Networks_RH_SomMotB_Aud_1,0.12190476190476189,5 -camcan,region_elasticnet,13,17Networks_LH_SomMotB_Cent_1,0.12190476190476192,5 -camcan,region_elasticnet,95,17Networks_RH_DefaultB_PFCv_2,0.12952380952380954,5 -camcan,region_elasticnet,2,17Networks_LH_VisCent_ExStr_2,0.14476190476190476,5 -camcan,region_elasticnet,86,17Networks_RH_ContB_PFClv_1,0.14857142857142858,5 -camcan,region_elasticnet,99,17Networks_RH_TempPar_2,0.14952380952380953,5 -camcan,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.15523809523809523,5 -camcan,region_elasticnet,52,17Networks_RH_VisCent_ExStr_2,0.1580952380952381,5 -camcan,region_elasticnet,60,17Networks_RH_SomMotA_4,0.1580952380952381,5 -camcan,region_elasticnet,87,17Networks_RH_ContC_Cingp_1,0.17238095238095238,5 -camcan,region_elasticnet,9,17Networks_LH_SomMotA_2,0.19523809523809524,5 -camcan,region_elasticnet,8,17Networks_LH_SomMotA_1,0.21142857142857144,5 -camcan,region_elasticnet,4,17Networks_LH_VisCent_ExStr_3,0.22000000000000003,5 -camcan,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.22952380952380952,5 -camcan,region_elasticnet,59,17Networks_RH_SomMotA_3,0.28190476190476194,5 -camcan,region_elasticnet,28,17Networks_LH_LimbicB_OFC_1,0.41047619047619044,5 -camcan,region_elasticnet,3,17Networks_LH_VisCent_Striate_1,0.52,5 -camcan,region_group_lasso,11,17Networks_LH_SomMotB_S2_1,0.008,5 -camcan,region_group_lasso,75,17Networks_RH_SalVentAttnB_IPL_1,0.008,5 -camcan,region_group_lasso,56,17Networks_RH_VisPeri_ExStrSup_1,0.012444444444444445,5 -camcan,region_group_lasso,89,17Networks_RH_DefaultA_IPL_1,0.012444444444444445,5 -camcan,region_group_lasso,42,17Networks_LH_DefaultB_Temp_2,0.016,5 -camcan,region_group_lasso,94,17Networks_RH_DefaultB_PFCv_1,0.016,5 -camcan,region_group_lasso,96,17Networks_RH_DefaultC_Rsp_1,0.016,5 -camcan,region_group_lasso,82,17Networks_RH_ContA_PFCl_2,0.01688888888888889,5 -camcan,region_group_lasso,47,17Networks_LH_DefaultB_PFCv_2,0.017444444444444446,5 -camcan,region_group_lasso,48,17Networks_LH_DefaultC_Rsp_1,0.017444444444444446,5 -camcan,region_group_lasso,69,17Networks_RH_DorsAttnB_PostC_2,0.020444444444444446,5 -camcan,region_group_lasso,7,17Networks_LH_VisPeri_ExStrSup_1,0.021888888888888892,5 -camcan,region_group_lasso,38,17Networks_LH_DefaultA_PFCd_1,0.021888888888888892,5 -camcan,region_group_lasso,36,17Networks_LH_ContC_pCun_2,0.024888888888888887,5 -camcan,region_group_lasso,49,17Networks_LH_DefaultC_PHC_1,0.024888888888888887,5 -camcan,region_group_lasso,76,17Networks_RH_SalVentAttnB_PFCl_1,0.024888888888888887,5 -camcan,region_group_lasso,57,17Networks_RH_SomMotA_1,0.025444444444444447,5 -camcan,region_group_lasso,67,17Networks_RH_DorsAttnA_SPL_1,0.02688888888888889,5 -camcan,region_group_lasso,21,17Networks_LH_SalVentAttnA_ParOper_1,0.02744444444444445,5 -camcan,region_group_lasso,81,17Networks_RH_ContA_PFCl_1,0.028444444444444446,5 -camcan,region_group_lasso,19,17Networks_LH_DorsAttnB_PostC_3,0.029000000000000005,5 -camcan,region_group_lasso,90,17Networks_RH_DefaultA_PFCd_1,0.029000000000000005,5 -camcan,region_group_lasso,83,17Networks_RH_ContB_Temp_1,0.031,5 -camcan,region_group_lasso,30,17Networks_LH_LimbicA_TempPole_2,0.03188888888888889,5 -camcan,region_group_lasso,45,17Networks_LH_DefaultB_PFCl_1,0.032,5 -camcan,region_group_lasso,5,17Networks_LH_VisPeri_ExStrInf_1,0.03244444444444444,5 -camcan,region_group_lasso,6,17Networks_LH_VisPeri_StriCal_1,0.03288888888888889,5 -camcan,region_group_lasso,18,17Networks_LH_DorsAttnB_PostC_2,0.033,5 -camcan,region_group_lasso,54,17Networks_RH_VisPeri_StriCal_1,0.03344444444444444,5 -camcan,region_group_lasso,70,17Networks_RH_DorsAttnB_FEF_1,0.036444444444444446,5 -camcan,region_group_lasso,64,17Networks_RH_SomMotB_Cent_1,0.03866666666666667,5 -camcan,region_group_lasso,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.04,5 -camcan,region_group_lasso,84,17Networks_RH_ContB_IPL_1,0.04,5 -camcan,region_group_lasso,26,17Networks_LH_SalVentAttnB_PFCl_1,0.041444444444444443,5 -camcan,region_group_lasso,62,17Networks_RH_SomMotB_S2_1,0.042333333333333334,5 -camcan,region_group_lasso,65,17Networks_RH_DorsAttnA_TempOcc_1,0.042888888888888886,5 -camcan,region_group_lasso,98,17Networks_RH_TempPar_1,0.043777777777777784,5 -camcan,region_group_lasso,20,17Networks_LH_DorsAttnB_FEF_1,0.04444444444444444,5 -camcan,region_group_lasso,50,17Networks_LH_TempPar_1,0.04444444444444444,5 -camcan,region_group_lasso,33,17Networks_LH_ContA_PFCl_2,0.04622222222222222,5 -camcan,region_group_lasso,15,17Networks_LH_DorsAttnA_ParOcc_1,0.048,5 -camcan,region_group_lasso,39,17Networks_LH_DefaultA_pCunPCC_1,0.04888888888888889,5 -camcan,region_group_lasso,12,17Networks_LH_SomMotB_S2_2,0.049444444444444444,5 -camcan,region_group_lasso,85,17Networks_RH_ContB_PFCld_1,0.05,5 -camcan,region_group_lasso,72,17Networks_RH_SalVentAttnA_Ins_1,0.050777777777777776,5 -camcan,region_group_lasso,91,17Networks_RH_DefaultA_pCunPCC_1,0.05177777777777778,5 -camcan,region_group_lasso,68,17Networks_RH_DorsAttnB_PostC_1,0.052000000000000005,5 -camcan,region_group_lasso,66,17Networks_RH_DorsAttnA_ParOcc_1,0.05388888888888889,5 -camcan,region_group_lasso,55,17Networks_RH_VisPeri_ExStrInf_1,0.05533333333333333,5 -camcan,region_group_lasso,32,17Networks_LH_ContA_PFCl_1,0.05611111111111111,5 -camcan,region_group_lasso,73,17Networks_RH_SalVentAttnA_ParMed_1,0.05644444444444444,5 -camcan,region_group_lasso,40,17Networks_LH_DefaultA_PFCm_1,0.058666666666666666,5 -camcan,region_group_lasso,71,17Networks_RH_SalVentAttnA_ParOper_1,0.06188888888888888,5 -camcan,region_group_lasso,2,17Networks_LH_VisCent_ExStr_2,0.06633333333333333,5 -camcan,region_group_lasso,41,17Networks_LH_DefaultB_Temp_1,0.07033333333333333,5 -camcan,region_group_lasso,23,17Networks_LH_SalVentAttnA_Ins_2,0.07111111111111111,5 -camcan,region_group_lasso,97,17Networks_RH_DefaultC_PHC_1,0.07177777777777777,5 -camcan,region_group_lasso,37,17Networks_LH_ContC_Cingp_1,0.072,5 -camcan,region_group_lasso,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.074,5 -camcan,region_group_lasso,53,17Networks_RH_VisCent_ExStr_3,0.074,5 -camcan,region_group_lasso,16,17Networks_LH_DorsAttnA_SPL_1,0.07544444444444445,5 -camcan,region_group_lasso,46,17Networks_LH_DefaultB_PFCv_1,0.07577777777777778,5 -camcan,region_group_lasso,74,17Networks_RH_SalVentAttnA_FrMed_1,0.07788888888888888,5 -camcan,region_group_lasso,17,17Networks_LH_DorsAttnB_PostC_1,0.07866666666666666,5 -camcan,region_group_lasso,92,17Networks_RH_DefaultA_PFCm_1,0.08166666666666667,5 -camcan,region_group_lasso,80,17Networks_RH_ContA_IPS_1,0.085,5 -camcan,region_group_lasso,25,17Networks_LH_SalVentAttnA_FrMed_1,0.092,5 -camcan,region_group_lasso,63,17Networks_RH_SomMotB_S2_2,0.09333333333333334,5 -camcan,region_group_lasso,88,17Networks_RH_ContC_pCun_1,0.095,5 -camcan,region_group_lasso,58,17Networks_RH_SomMotA_2,0.09655555555555555,5 -camcan,region_group_lasso,10,17Networks_LH_SomMotB_Aud_1,0.10277777777777777,5 -camcan,region_group_lasso,34,17Networks_LH_ContB_PFClv_1,0.10333333333333332,5 -camcan,region_group_lasso,51,17Networks_RH_VisCent_ExStr_1,0.10588888888888888,5 -camcan,region_group_lasso,13,17Networks_LH_SomMotB_Cent_1,0.11011111111111109,5 -camcan,region_group_lasso,99,17Networks_RH_TempPar_2,0.11066666666666666,5 -camcan,region_group_lasso,35,17Networks_LH_ContC_pCun_1,0.11177777777777778,5 -camcan,region_group_lasso,100,17Networks_RH_TempPar_3,0.11499999999999999,5 -camcan,region_group_lasso,14,17Networks_LH_DorsAttnA_TempOcc_1,0.12111111111111113,5 -camcan,region_group_lasso,95,17Networks_RH_DefaultB_PFCv_2,0.12722222222222224,5 -camcan,region_group_lasso,29,17Networks_LH_LimbicA_TempPole_1,0.13155555555555556,5 -camcan,region_group_lasso,87,17Networks_RH_ContC_Cingp_1,0.13366666666666666,5 -camcan,region_group_lasso,8,17Networks_LH_SomMotA_1,0.13877777777777778,5 -camcan,region_group_lasso,31,17Networks_LH_ContA_IPS_1,0.14,5 -camcan,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.14033333333333334,5 -camcan,region_group_lasso,60,17Networks_RH_SomMotA_4,0.14177777777777778,5 -camcan,region_group_lasso,1,17Networks_LH_VisCent_ExStr_1,0.14355555555555558,5 -camcan,region_group_lasso,24,17Networks_LH_SalVentAttnA_ParMed_1,0.14500000000000002,5 -camcan,region_group_lasso,44,17Networks_LH_DefaultB_PFCd_1,0.14855555555555555,5 -camcan,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.14866666666666667,5 -camcan,region_group_lasso,61,17Networks_RH_SomMotB_Aud_1,0.149,5 -camcan,region_group_lasso,52,17Networks_RH_VisCent_ExStr_2,0.16444444444444445,5 -camcan,region_group_lasso,4,17Networks_LH_VisCent_ExStr_3,0.18644444444444444,5 -camcan,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.1911111111111111,5 -camcan,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.19333333333333333,5 -camcan,region_group_lasso,93,17Networks_RH_DefaultB_PFCd_1,0.19522222222222224,5 -camcan,region_group_lasso,59,17Networks_RH_SomMotA_3,0.2053333333333333,5 -camcan,region_group_lasso,86,17Networks_RH_ContB_PFClv_1,0.21155555555555558,5 -camcan,region_group_lasso,9,17Networks_LH_SomMotA_2,0.21444444444444444,5 -camcan,region_group_lasso,3,17Networks_LH_VisCent_Striate_1,0.4004444444444445,5 -camcan,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.4011111111111111,5 -hcp,region_elasticnet,41,17Networks_LH_DefaultB_Temp_1,0.017142857142857144,5 -hcp,region_elasticnet,62,17Networks_RH_SomMotB_S2_1,0.017142857142857144,5 -hcp,region_elasticnet,66,17Networks_RH_DorsAttnA_ParOcc_1,0.017142857142857144,5 -hcp,region_elasticnet,99,17Networks_RH_TempPar_2,0.017142857142857144,5 -hcp,region_elasticnet,48,17Networks_LH_DefaultC_Rsp_1,0.019642857142857142,5 -hcp,region_elasticnet,73,17Networks_RH_SalVentAttnA_ParMed_1,0.019642857142857142,5 -hcp,region_elasticnet,11,17Networks_LH_SomMotB_S2_1,0.022857142857142857,5 -hcp,region_elasticnet,17,17Networks_LH_DorsAttnB_PostC_1,0.022857142857142857,5 -hcp,region_elasticnet,18,17Networks_LH_DorsAttnB_PostC_2,0.022857142857142857,5 -hcp,region_elasticnet,21,17Networks_LH_SalVentAttnA_ParOper_1,0.022857142857142857,5 -hcp,region_elasticnet,25,17Networks_LH_SalVentAttnA_FrMed_1,0.022857142857142857,5 -hcp,region_elasticnet,42,17Networks_LH_DefaultB_Temp_2,0.022857142857142857,5 -hcp,region_elasticnet,75,17Networks_RH_SalVentAttnB_IPL_1,0.022857142857142857,5 -hcp,region_elasticnet,91,17Networks_RH_DefaultA_pCunPCC_1,0.022857142857142857,5 -hcp,region_elasticnet,39,17Networks_LH_DefaultA_pCunPCC_1,0.023896103896103894,5 -hcp,region_elasticnet,74,17Networks_RH_SalVentAttnA_FrMed_1,0.025357142857142856,5 -hcp,region_elasticnet,85,17Networks_RH_ContB_PFCld_1,0.025357142857142856,5 -hcp,region_elasticnet,76,17Networks_RH_SalVentAttnB_PFCl_1,0.02623376623376623,5 -hcp,region_elasticnet,96,17Networks_RH_DefaultC_Rsp_1,0.026857142857142857,5 -hcp,region_elasticnet,30,17Networks_LH_LimbicA_TempPole_2,0.027142857142857146,5 -hcp,region_elasticnet,26,17Networks_LH_SalVentAttnB_PFCl_1,0.02857142857142857,5 -hcp,region_elasticnet,63,17Networks_RH_SomMotB_S2_2,0.02857142857142857,5 -hcp,region_elasticnet,36,17Networks_LH_ContC_pCun_2,0.03035714285714286,5 -hcp,region_elasticnet,3,17Networks_LH_VisCent_Striate_1,0.03194805194805195,5 -hcp,region_elasticnet,81,17Networks_RH_ContA_PFCl_1,0.03194805194805195,5 -hcp,region_elasticnet,13,17Networks_LH_SomMotB_Cent_1,0.032857142857142856,5 -hcp,region_elasticnet,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.03444805194805195,5 -hcp,region_elasticnet,7,17Networks_LH_VisPeri_ExStrSup_1,0.036071428571428574,5 -hcp,region_elasticnet,12,17Networks_LH_SomMotB_S2_2,0.03694805194805195,5 -hcp,region_elasticnet,90,17Networks_RH_DefaultA_PFCd_1,0.03766233766233766,5 -hcp,region_elasticnet,82,17Networks_RH_ContA_PFCl_2,0.03785714285714285,5 -hcp,region_elasticnet,33,17Networks_LH_ContA_PFCl_2,0.04057142857142857,5 -hcp,region_elasticnet,24,17Networks_LH_SalVentAttnA_ParMed_1,0.04178571428571428,5 -hcp,region_elasticnet,95,17Networks_RH_DefaultB_PFCv_2,0.043376623376623374,5 -hcp,region_elasticnet,51,17Networks_RH_VisCent_ExStr_1,0.04337662337662338,5 -hcp,region_elasticnet,65,17Networks_RH_DorsAttnA_TempOcc_1,0.044415584415584415,5 -hcp,region_elasticnet,86,17Networks_RH_ContB_PFClv_1,0.046285714285714284,5 -hcp,region_elasticnet,37,17Networks_LH_ContC_Cingp_1,0.04694805194805195,5 -hcp,region_elasticnet,71,17Networks_RH_SalVentAttnA_ParOper_1,0.0475,5 -hcp,region_elasticnet,54,17Networks_RH_VisPeri_StriCal_1,0.0487012987012987,5 -hcp,region_elasticnet,1,17Networks_LH_VisCent_ExStr_1,0.05012987012987012,5 -hcp,region_elasticnet,98,17Networks_RH_TempPar_1,0.05012987012987012,5 -hcp,region_elasticnet,8,17Networks_LH_SomMotA_1,0.05035714285714286,5 -hcp,region_elasticnet,61,17Networks_RH_SomMotB_Aud_1,0.051071428571428566,5 -hcp,region_elasticnet,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.05246753246753246,5 -hcp,region_elasticnet,57,17Networks_RH_SomMotA_1,0.05246753246753246,5 -hcp,region_elasticnet,92,17Networks_RH_DefaultA_PFCm_1,0.05357142857142857,5 -hcp,region_elasticnet,20,17Networks_LH_DorsAttnB_FEF_1,0.05387662337662338,5 -hcp,region_elasticnet,70,17Networks_RH_DorsAttnB_FEF_1,0.055129870129870126,5 -hcp,region_elasticnet,15,17Networks_LH_DorsAttnA_ParOcc_1,0.056467532467532465,5 -hcp,region_elasticnet,83,17Networks_RH_ContB_Temp_1,0.05812987012987013,5 -hcp,region_elasticnet,46,17Networks_LH_DefaultB_PFCv_1,0.061558441558441555,5 -hcp,region_elasticnet,23,17Networks_LH_SalVentAttnA_Ins_2,0.06275324675324676,5 -hcp,region_elasticnet,53,17Networks_RH_VisCent_ExStr_3,0.06441558441558441,5 -hcp,region_elasticnet,5,17Networks_LH_VisPeri_ExStrInf_1,0.06831168831168831,5 -hcp,region_elasticnet,52,17Networks_RH_VisCent_ExStr_2,0.06838311688311688,5 -hcp,region_elasticnet,89,17Networks_RH_DefaultA_IPL_1,0.06914285714285714,5 -hcp,region_elasticnet,88,17Networks_RH_ContC_pCun_1,0.07247402597402597,5 -hcp,region_elasticnet,32,17Networks_LH_ContA_PFCl_1,0.07935714285714286,5 -hcp,region_elasticnet,31,17Networks_LH_ContA_IPS_1,0.08535714285714285,5 -hcp,region_elasticnet,69,17Networks_RH_DorsAttnB_PostC_2,0.08535714285714285,5 -hcp,region_elasticnet,50,17Networks_LH_TempPar_1,0.08841558441558442,5 -hcp,region_elasticnet,14,17Networks_LH_DorsAttnA_TempOcc_1,0.09045454545454545,5 -hcp,region_elasticnet,56,17Networks_RH_VisPeri_ExStrSup_1,0.09581168831168832,5 -hcp,region_elasticnet,84,17Networks_RH_ContB_IPL_1,0.10051948051948052,5 -hcp,region_elasticnet,64,17Networks_RH_SomMotB_Cent_1,0.1014935064935065,5 -hcp,region_elasticnet,29,17Networks_LH_LimbicA_TempPole_1,0.1037012987012987,5 -hcp,region_elasticnet,67,17Networks_RH_DorsAttnA_SPL_1,0.10496753246753247,5 -hcp,region_elasticnet,55,17Networks_RH_VisPeri_ExStrInf_1,0.11035714285714286,5 -hcp,region_elasticnet,2,17Networks_LH_VisCent_ExStr_2,0.11113636363636363,5 -hcp,region_elasticnet,87,17Networks_RH_ContC_Cingp_1,0.11285714285714285,5 -hcp,region_elasticnet,19,17Networks_LH_DorsAttnB_PostC_3,0.1200974025974026,5 -hcp,region_elasticnet,4,17Networks_LH_VisCent_ExStr_3,0.12018181818181817,5 -hcp,region_elasticnet,44,17Networks_LH_DefaultB_PFCd_1,0.12176623376623377,5 -hcp,region_elasticnet,16,17Networks_LH_DorsAttnA_SPL_1,0.12194805194805194,5 -hcp,region_elasticnet,38,17Networks_LH_DefaultA_PFCd_1,0.12571428571428572,5 -hcp,region_elasticnet,58,17Networks_RH_SomMotA_2,0.13444805194805193,5 -hcp,region_elasticnet,80,17Networks_RH_ContA_IPS_1,0.1480194805194805,5 -hcp,region_elasticnet,28,17Networks_LH_LimbicB_OFC_1,0.1514285714285714,5 -hcp,region_elasticnet,79,17Networks_RH_LimbicA_TempPole_1,0.1556818181818182,5 -hcp,region_elasticnet,10,17Networks_LH_SomMotB_Aud_1,0.16259740259740257,5 -hcp,region_elasticnet,45,17Networks_LH_DefaultB_PFCl_1,0.16571428571428573,5 -hcp,region_elasticnet,22,17Networks_LH_SalVentAttnA_Ins_1,0.17753246753246754,5 -hcp,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.1799025974025974,5 -hcp,region_elasticnet,6,17Networks_LH_VisPeri_StriCal_1,0.18155844155844153,5 -hcp,region_elasticnet,100,17Networks_RH_TempPar_3,0.19116883116883115,5 -hcp,region_elasticnet,9,17Networks_LH_SomMotA_2,0.20033766233766234,5 -hcp,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.2569480519480519,5 -hcp,region_elasticnet,60,17Networks_RH_SomMotA_4,0.2580844155844156,5 -hcp,region_elasticnet,68,17Networks_RH_DorsAttnB_PostC_1,0.25957142857142856,5 -hcp,region_elasticnet,43,17Networks_LH_DefaultB_IPL_1,0.33306493506493506,5 -hcp,region_elasticnet,35,17Networks_LH_ContC_pCun_1,0.3763116883116883,5 -hcp,region_elasticnet,72,17Networks_RH_SalVentAttnA_Ins_1,0.38137012987012986,5 -hcp,region_elasticnet,34,17Networks_LH_ContB_PFClv_1,0.44516233766233765,5 -hcp,region_elasticnet,94,17Networks_RH_DefaultB_PFCv_1,0.46564285714285714,5 -hcp,region_elasticnet,47,17Networks_LH_DefaultB_PFCv_2,0.5572272727272727,5 -hcp,region_elasticnet,97,17Networks_RH_DefaultC_PHC_1,0.5595,5 -hcp,region_elasticnet,59,17Networks_RH_SomMotA_3,0.5822987012987013,5 -hcp,region_elasticnet,49,17Networks_LH_DefaultC_PHC_1,0.6307857142857143,5 -hcp,region_elasticnet,40,17Networks_LH_DefaultA_PFCm_1,0.6489415584415584,5 -hcp,region_group_lasso,62,17Networks_RH_SomMotB_S2_1,0.005,5 -hcp,region_group_lasso,30,17Networks_LH_LimbicA_TempPole_2,0.01,5 -hcp,region_group_lasso,48,17Networks_LH_DefaultC_Rsp_1,0.01,5 -hcp,region_group_lasso,18,17Networks_LH_DorsAttnB_PostC_2,0.010714285714285714,5 -hcp,region_group_lasso,55,17Networks_RH_VisPeri_ExStrInf_1,0.010714285714285714,5 -hcp,region_group_lasso,99,17Networks_RH_TempPar_2,0.010714285714285714,5 -hcp,region_group_lasso,91,17Networks_RH_DefaultA_pCunPCC_1,0.011428571428571429,5 -hcp,region_group_lasso,7,17Networks_LH_VisPeri_ExStrSup_1,0.015714285714285715,5 -hcp,region_group_lasso,36,17Networks_LH_ContC_pCun_2,0.015714285714285715,5 -hcp,region_group_lasso,42,17Networks_LH_DefaultB_Temp_2,0.015714285714285715,5 -hcp,region_group_lasso,85,17Networks_RH_ContB_PFCld_1,0.015714285714285715,5 -hcp,region_group_lasso,66,17Networks_RH_DorsAttnA_ParOcc_1,0.02015873015873016,5 -hcp,region_group_lasso,96,17Networks_RH_DefaultC_Rsp_1,0.02015873015873016,5 -hcp,region_group_lasso,13,17Networks_LH_SomMotB_Cent_1,0.02142857142857143,5 -hcp,region_group_lasso,33,17Networks_LH_ContA_PFCl_2,0.025873015873015874,5 -hcp,region_group_lasso,41,17Networks_LH_DefaultB_Temp_1,0.026587301587301587,5 -hcp,region_group_lasso,17,17Networks_LH_DorsAttnB_PostC_1,0.027142857142857146,5 -hcp,region_group_lasso,65,17Networks_RH_DorsAttnA_TempOcc_1,0.02777777777777778,5 -hcp,region_group_lasso,39,17Networks_LH_DefaultA_pCunPCC_1,0.028492063492063492,5 -hcp,region_group_lasso,76,17Networks_RH_SalVentAttnB_PFCl_1,0.02904761904761905,5 -hcp,region_group_lasso,81,17Networks_RH_ContA_PFCl_1,0.02904761904761905,5 -hcp,region_group_lasso,51,17Networks_RH_VisCent_ExStr_1,0.03142857142857143,5 -hcp,region_group_lasso,11,17Networks_LH_SomMotB_S2_1,0.03158730158730159,5 -hcp,region_group_lasso,54,17Networks_RH_VisPeri_StriCal_1,0.032380952380952385,5 -hcp,region_group_lasso,87,17Networks_RH_ContC_Cingp_1,0.032857142857142856,5 -hcp,region_group_lasso,73,17Networks_RH_SalVentAttnA_ParMed_1,0.0334920634920635,5 -hcp,region_group_lasso,83,17Networks_RH_ContB_Temp_1,0.034206349206349206,5 -hcp,region_group_lasso,57,17Networks_RH_SomMotA_1,0.03476190476190476,5 -hcp,region_group_lasso,12,17Networks_LH_SomMotB_S2_2,0.03547619047619048,5 -hcp,region_group_lasso,21,17Networks_LH_SalVentAttnA_ParOper_1,0.0373015873015873,5 -hcp,region_group_lasso,25,17Networks_LH_SalVentAttnA_FrMed_1,0.0373015873015873,5 -hcp,region_group_lasso,3,17Networks_LH_VisCent_Striate_1,0.03801587301587302,5 -hcp,region_group_lasso,1,17Networks_LH_VisCent_ExStr_1,0.0392063492063492,5 -hcp,region_group_lasso,75,17Networks_RH_SalVentAttnB_IPL_1,0.039285714285714285,5 -hcp,region_group_lasso,46,17Networks_LH_DefaultB_PFCv_1,0.03976190476190476,5 -hcp,region_group_lasso,52,17Networks_RH_VisCent_ExStr_2,0.04182539682539683,5 -hcp,region_group_lasso,63,17Networks_RH_SomMotB_S2_2,0.0423015873015873,5 -hcp,region_group_lasso,19,17Networks_LH_DorsAttnB_PostC_3,0.04238095238095238,5 -hcp,region_group_lasso,98,17Networks_RH_TempPar_1,0.04238095238095238,5 -hcp,region_group_lasso,26,17Networks_LH_SalVentAttnB_PFCl_1,0.04357142857142857,5 -hcp,region_group_lasso,27,17Networks_LH_SalVentAttnB_PFCmp_1,0.045476190476190476,5 -hcp,region_group_lasso,77,17Networks_RH_SalVentAttnB_PFCmp_1,0.04571428571428572,5 -hcp,region_group_lasso,5,17Networks_LH_VisPeri_ExStrInf_1,0.048095238095238094,5 -hcp,region_group_lasso,70,17Networks_RH_DorsAttnB_FEF_1,0.048095238095238094,5 -hcp,region_group_lasso,74,17Networks_RH_SalVentAttnA_FrMed_1,0.04873015873015873,5 -hcp,region_group_lasso,82,17Networks_RH_ContA_PFCl_2,0.04873015873015873,5 -hcp,region_group_lasso,37,17Networks_LH_ContC_Cingp_1,0.05063492063492063,5 -hcp,region_group_lasso,53,17Networks_RH_VisCent_ExStr_3,0.05063492063492063,5 -hcp,region_group_lasso,23,17Networks_LH_SalVentAttnA_Ins_2,0.05182539682539683,5 -hcp,region_group_lasso,58,17Networks_RH_SomMotA_2,0.05444444444444445,5 -hcp,region_group_lasso,64,17Networks_RH_SomMotB_Cent_1,0.055158730158730164,5 -hcp,region_group_lasso,6,17Networks_LH_VisPeri_StriCal_1,0.055634920634920634,5 -hcp,region_group_lasso,95,17Networks_RH_DefaultB_PFCv_2,0.055714285714285716,5 -hcp,region_group_lasso,88,17Networks_RH_ContC_pCun_1,0.05634920634920635,5 -hcp,region_group_lasso,24,17Networks_LH_SalVentAttnA_ParMed_1,0.06142857142857142,5 -hcp,region_group_lasso,69,17Networks_RH_DorsAttnB_PostC_2,0.06333333333333332,5 -hcp,region_group_lasso,2,17Networks_LH_VisCent_ExStr_2,0.06825396825396826,5 -hcp,region_group_lasso,32,17Networks_LH_ContA_PFCl_1,0.07158730158730159,5 -hcp,region_group_lasso,90,17Networks_RH_DefaultA_PFCd_1,0.07277777777777779,5 -hcp,region_group_lasso,15,17Networks_LH_DorsAttnA_ParOcc_1,0.0734920634920635,5 -hcp,region_group_lasso,71,17Networks_RH_SalVentAttnA_ParOper_1,0.07357142857142858,5 -hcp,region_group_lasso,20,17Networks_LH_DorsAttnB_FEF_1,0.08158730158730158,5 -hcp,region_group_lasso,31,17Networks_LH_ContA_IPS_1,0.08158730158730158,5 -hcp,region_group_lasso,56,17Networks_RH_VisPeri_ExStrSup_1,0.08682539682539683,5 -hcp,region_group_lasso,80,17Networks_RH_ContA_IPS_1,0.08714285714285715,5 -hcp,region_group_lasso,67,17Networks_RH_DorsAttnA_SPL_1,0.08809523809523809,5 -hcp,region_group_lasso,84,17Networks_RH_ContB_IPL_1,0.08825396825396825,5 -hcp,region_group_lasso,92,17Networks_RH_DefaultA_PFCm_1,0.08928571428571427,5 -hcp,region_group_lasso,89,17Networks_RH_DefaultA_IPL_1,0.0923015873015873,5 -hcp,region_group_lasso,38,17Networks_LH_DefaultA_PFCd_1,0.09992063492063492,5 -hcp,region_group_lasso,86,17Networks_RH_ContB_PFClv_1,0.10015873015873016,5 -hcp,region_group_lasso,50,17Networks_LH_TempPar_1,0.11666666666666667,5 -hcp,region_group_lasso,4,17Networks_LH_VisCent_ExStr_3,0.12492063492063492,5 -hcp,region_group_lasso,68,17Networks_RH_DorsAttnB_PostC_1,0.1353968253968254,5 -hcp,region_group_lasso,8,17Networks_LH_SomMotA_1,0.14333333333333334,5 -hcp,region_group_lasso,61,17Networks_RH_SomMotB_Aud_1,0.14714285714285713,5 -hcp,region_group_lasso,16,17Networks_LH_DorsAttnA_SPL_1,0.14785714285714285,5 -hcp,region_group_lasso,93,17Networks_RH_DefaultB_PFCd_1,0.17142857142857143,5 -hcp,region_group_lasso,44,17Networks_LH_DefaultB_PFCd_1,0.17253968253968252,5 -hcp,region_group_lasso,14,17Networks_LH_DorsAttnA_TempOcc_1,0.17896825396825397,5 -hcp,region_group_lasso,29,17Networks_LH_LimbicA_TempPole_1,0.19357142857142856,5 -hcp,region_group_lasso,10,17Networks_LH_SomMotB_Aud_1,0.20023809523809524,5 -hcp,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.21357142857142858,5 -hcp,region_group_lasso,45,17Networks_LH_DefaultB_PFCl_1,0.21984126984126987,5 -hcp,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.22373015873015872,5 -hcp,region_group_lasso,100,17Networks_RH_TempPar_3,0.24230158730158732,5 -hcp,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.2523015873015873,5 -hcp,region_group_lasso,35,17Networks_LH_ContC_pCun_1,0.3103174603174603,5 -hcp,region_group_lasso,9,17Networks_LH_SomMotA_2,0.33492063492063495,5 -hcp,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.35666666666666663,5 -hcp,region_group_lasso,60,17Networks_RH_SomMotA_4,0.4093650793650793,5 -hcp,region_group_lasso,72,17Networks_RH_SalVentAttnA_Ins_1,0.44103174603174605,5 -hcp,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.451031746031746,5 -hcp,region_group_lasso,34,17Networks_LH_ContB_PFClv_1,0.484047619047619,5 -hcp,region_group_lasso,47,17Networks_LH_DefaultB_PFCv_2,0.518968253968254,5 -hcp,region_group_lasso,49,17Networks_LH_DefaultC_PHC_1,0.5321428571428571,5 -hcp,region_group_lasso,94,17Networks_RH_DefaultB_PFCv_1,0.5664285714285715,5 -hcp,region_group_lasso,97,17Networks_RH_DefaultC_PHC_1,0.575952380952381,5 -hcp,region_group_lasso,59,17Networks_RH_SomMotA_3,0.641984126984127,5 -hcp,region_group_lasso,40,17Networks_LH_DefaultA_PFCm_1,0.7090476190476191,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus_networks_average_scores.csv b/scripts/interpretability/focus/outputs/csv/consensus_networks_average_scores.csv deleted file mode 100644 index 206cb6cb..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus_networks_average_scores.csv +++ /dev/null @@ -1,69 +0,0 @@ -dataset,model,network_name,average_score,embedding_count -camcan,region_elasticnet,DefaultC,0.06448823730852886,5 -camcan,region_elasticnet,SalVentAttnB,0.17299887205727774,5 -camcan,region_elasticnet,LimbicA,0.190121757909513,5 -camcan,region_elasticnet,VisPeri,0.200913886911066,5 -camcan,region_elasticnet,DefaultA,0.23089244591718955,5 -camcan,region_elasticnet,DorsAttnA,0.23745478518644436,5 -camcan,region_elasticnet,ContA,0.2715601095129486,5 -camcan,region_elasticnet,TempPar,0.2853020698165888,5 -camcan,region_elasticnet,DorsAttnB,0.3131343887113198,5 -camcan,region_elasticnet,SalVentAttnA,0.33515478638367097,5 -camcan,region_elasticnet,ContB,0.33587598976616884,5 -camcan,region_elasticnet,ContC,0.34025912014614723,5 -camcan,region_elasticnet,SomMotB,0.4405064388055756,5 -camcan,region_elasticnet,DefaultB,0.4727410595423369,5 -camcan,region_elasticnet,LimbicB,0.48509297052154193,5 -camcan,region_elasticnet,SomMotA,0.5522558703582082,5 -camcan,region_elasticnet,VisCent,0.7298071543822727,5 -camcan,region_group_lasso,DefaultC,0.12592796152537725,5 -camcan,region_group_lasso,VisPeri,0.17259458450958548,5 -camcan,region_group_lasso,SalVentAttnB,0.17336325478452677,5 -camcan,region_group_lasso,LimbicA,0.2521699604938271,5 -camcan,region_group_lasso,DorsAttnB,0.2547387230422517,5 -camcan,region_group_lasso,DefaultA,0.2611625876685944,5 -camcan,region_group_lasso,TempPar,0.27295701527572025,5 -camcan,region_group_lasso,ContA,0.3007127007560721,5 -camcan,region_group_lasso,DorsAttnA,0.32193572851150626,5 -camcan,region_group_lasso,ContC,0.3586229711529218,5 -camcan,region_group_lasso,ContB,0.3597825840118519,5 -camcan,region_group_lasso,SomMotB,0.46123039162185736,5 -camcan,region_group_lasso,SalVentAttnA,0.49122558397853117,5 -camcan,region_group_lasso,LimbicB,0.49496938271604946,5 -camcan,region_group_lasso,SomMotA,0.5399105597235477,5 -camcan,region_group_lasso,DefaultB,0.6155168132492037,5 -camcan,region_group_lasso,VisCent,0.6803952390565985,5 -hcp,region_elasticnet,SalVentAttnB,0.1470204824861667,5 -hcp,region_elasticnet,LimbicA,0.24308031776317374,5 -hcp,region_elasticnet,TempPar,0.2843317470963608,5 -hcp,region_elasticnet,ContA,0.34023656154001164,5 -hcp,region_elasticnet,LimbicB,0.34342764378478663,5 -hcp,region_elasticnet,DorsAttnA,0.3521033287067322,5 -hcp,region_elasticnet,SomMotB,0.361063019524172,5 -hcp,region_elasticnet,VisCent,0.3713089557928687,5 -hcp,region_elasticnet,VisPeri,0.3980920845829265,5 -hcp,region_elasticnet,DorsAttnB,0.49182166390276694,5 -hcp,region_elasticnet,ContC,0.5372878809604136,5 -hcp,region_elasticnet,ContB,0.5423766224214763,5 -hcp,region_elasticnet,SalVentAttnA,0.5826971504076504,5 -hcp,region_elasticnet,DefaultC,0.7118694903829134,5 -hcp,region_elasticnet,DefaultA,0.7453300796171117,5 -hcp,region_elasticnet,DefaultB,0.7875372925190165,5 -hcp,region_elasticnet,SomMotA,0.81023463257946,5 -hcp,region_group_lasso,SalVentAttnB,0.18333583103291118,5 -hcp,region_group_lasso,VisPeri,0.22022753511126103,5 -hcp,region_group_lasso,LimbicA,0.28035522959183673,5 -hcp,region_group_lasso,ContA,0.2887688304778613,5 -hcp,region_group_lasso,VisCent,0.3152685710668993,5 -hcp,region_group_lasso,TempPar,0.3339607170189504,5 -hcp,region_group_lasso,DorsAttnB,0.33933734527693904,5 -hcp,region_group_lasso,ContC,0.39048076127083525,5 -hcp,region_group_lasso,DorsAttnA,0.40091390859984993,5 -hcp,region_group_lasso,SomMotB,0.41932934589740845,5 -hcp,region_group_lasso,LimbicB,0.4294325396825397,5 -hcp,region_group_lasso,ContB,0.5894198658622178,5 -hcp,region_group_lasso,DefaultC,0.669088353680758,5 -hcp,region_group_lasso,SalVentAttnA,0.6754573612661054,5 -hcp,region_group_lasso,DefaultA,0.8287264031812039,5 -hcp,region_group_lasso,DefaultB,0.9127104486023969,5 -hcp,region_group_lasso,SomMotA,0.9245878983162126,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus_networks_top20.csv b/scripts/interpretability/focus/outputs/csv/consensus_networks_top20.csv deleted file mode 100644 index 414a1a2b..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus_networks_top20.csv +++ /dev/null @@ -1,69 +0,0 @@ -dataset,model,network_name,average_score,embedding_count -camcan,region_elasticnet,VisCent,0.7298071543822727,5 -camcan,region_elasticnet,SomMotA,0.5522558703582082,5 -camcan,region_elasticnet,LimbicB,0.48509297052154193,5 -camcan,region_elasticnet,DefaultB,0.4727410595423369,5 -camcan,region_elasticnet,SomMotB,0.4405064388055756,5 -camcan,region_elasticnet,ContC,0.34025912014614723,5 -camcan,region_elasticnet,ContB,0.33587598976616884,5 -camcan,region_elasticnet,SalVentAttnA,0.33515478638367097,5 -camcan,region_elasticnet,DorsAttnB,0.3131343887113198,5 -camcan,region_elasticnet,TempPar,0.2853020698165888,5 -camcan,region_elasticnet,ContA,0.2715601095129486,5 -camcan,region_elasticnet,DorsAttnA,0.23745478518644436,5 -camcan,region_elasticnet,DefaultA,0.23089244591718955,5 -camcan,region_elasticnet,VisPeri,0.200913886911066,5 -camcan,region_elasticnet,LimbicA,0.190121757909513,5 -camcan,region_elasticnet,SalVentAttnB,0.17299887205727774,5 -camcan,region_elasticnet,DefaultC,0.06448823730852886,5 -camcan,region_group_lasso,VisCent,0.6803952390565985,5 -camcan,region_group_lasso,DefaultB,0.6155168132492037,5 -camcan,region_group_lasso,SomMotA,0.5399105597235477,5 -camcan,region_group_lasso,LimbicB,0.49496938271604946,5 -camcan,region_group_lasso,SalVentAttnA,0.49122558397853117,5 -camcan,region_group_lasso,SomMotB,0.46123039162185736,5 -camcan,region_group_lasso,ContB,0.3597825840118519,5 -camcan,region_group_lasso,ContC,0.3586229711529218,5 -camcan,region_group_lasso,DorsAttnA,0.32193572851150626,5 -camcan,region_group_lasso,ContA,0.3007127007560721,5 -camcan,region_group_lasso,TempPar,0.27295701527572025,5 -camcan,region_group_lasso,DefaultA,0.2611625876685944,5 -camcan,region_group_lasso,DorsAttnB,0.2547387230422517,5 -camcan,region_group_lasso,LimbicA,0.2521699604938271,5 -camcan,region_group_lasso,SalVentAttnB,0.17336325478452677,5 -camcan,region_group_lasso,VisPeri,0.17259458450958548,5 -camcan,region_group_lasso,DefaultC,0.12592796152537725,5 -hcp,region_elasticnet,SomMotA,0.81023463257946,5 -hcp,region_elasticnet,DefaultB,0.7875372925190165,5 -hcp,region_elasticnet,DefaultA,0.7453300796171117,5 -hcp,region_elasticnet,DefaultC,0.7118694903829134,5 -hcp,region_elasticnet,SalVentAttnA,0.5826971504076504,5 -hcp,region_elasticnet,ContB,0.5423766224214763,5 -hcp,region_elasticnet,ContC,0.5372878809604136,5 -hcp,region_elasticnet,DorsAttnB,0.49182166390276694,5 -hcp,region_elasticnet,VisPeri,0.3980920845829265,5 -hcp,region_elasticnet,VisCent,0.3713089557928687,5 -hcp,region_elasticnet,SomMotB,0.361063019524172,5 -hcp,region_elasticnet,DorsAttnA,0.3521033287067322,5 -hcp,region_elasticnet,LimbicB,0.34342764378478663,5 -hcp,region_elasticnet,ContA,0.34023656154001164,5 -hcp,region_elasticnet,TempPar,0.2843317470963608,5 -hcp,region_elasticnet,LimbicA,0.24308031776317374,5 -hcp,region_elasticnet,SalVentAttnB,0.1470204824861667,5 -hcp,region_group_lasso,SomMotA,0.9245878983162126,5 -hcp,region_group_lasso,DefaultB,0.9127104486023969,5 -hcp,region_group_lasso,DefaultA,0.8287264031812039,5 -hcp,region_group_lasso,SalVentAttnA,0.6754573612661054,5 -hcp,region_group_lasso,DefaultC,0.669088353680758,5 -hcp,region_group_lasso,ContB,0.5894198658622178,5 -hcp,region_group_lasso,LimbicB,0.4294325396825397,5 -hcp,region_group_lasso,SomMotB,0.41932934589740845,5 -hcp,region_group_lasso,DorsAttnA,0.40091390859984993,5 -hcp,region_group_lasso,ContC,0.39048076127083525,5 -hcp,region_group_lasso,DorsAttnB,0.33933734527693904,5 -hcp,region_group_lasso,TempPar,0.3339607170189504,5 -hcp,region_group_lasso,VisCent,0.3152685710668993,5 -hcp,region_group_lasso,ContA,0.2887688304778613,5 -hcp,region_group_lasso,LimbicA,0.28035522959183673,5 -hcp,region_group_lasso,VisPeri,0.22022753511126103,5 -hcp,region_group_lasso,SalVentAttnB,0.18333583103291118,5 diff --git a/scripts/interpretability/focus/outputs/csv/consensus_top20_parcels.csv b/scripts/interpretability/focus/outputs/csv/consensus_top20_parcels.csv deleted file mode 100644 index ae86e2a0..00000000 --- a/scripts/interpretability/focus/outputs/csv/consensus_top20_parcels.csv +++ /dev/null @@ -1,81 +0,0 @@ -dataset,model,region_id,region_name,average_score,embedding_count -camcan,region_elasticnet,3,17Networks_LH_VisCent_Striate_1,0.52,5 -camcan,region_elasticnet,28,17Networks_LH_LimbicB_OFC_1,0.41047619047619044,5 -camcan,region_elasticnet,59,17Networks_RH_SomMotA_3,0.28190476190476194,5 -camcan,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.22952380952380952,5 -camcan,region_elasticnet,4,17Networks_LH_VisCent_ExStr_3,0.22000000000000003,5 -camcan,region_elasticnet,8,17Networks_LH_SomMotA_1,0.21142857142857144,5 -camcan,region_elasticnet,9,17Networks_LH_SomMotA_2,0.19523809523809524,5 -camcan,region_elasticnet,87,17Networks_RH_ContC_Cingp_1,0.17238095238095238,5 -camcan,region_elasticnet,52,17Networks_RH_VisCent_ExStr_2,0.1580952380952381,5 -camcan,region_elasticnet,60,17Networks_RH_SomMotA_4,0.1580952380952381,5 -camcan,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.15523809523809523,5 -camcan,region_elasticnet,99,17Networks_RH_TempPar_2,0.14952380952380953,5 -camcan,region_elasticnet,86,17Networks_RH_ContB_PFClv_1,0.14857142857142858,5 -camcan,region_elasticnet,2,17Networks_LH_VisCent_ExStr_2,0.14476190476190476,5 -camcan,region_elasticnet,95,17Networks_RH_DefaultB_PFCv_2,0.12952380952380954,5 -camcan,region_elasticnet,13,17Networks_LH_SomMotB_Cent_1,0.12190476190476192,5 -camcan,region_elasticnet,61,17Networks_RH_SomMotB_Aud_1,0.12190476190476189,5 -camcan,region_elasticnet,53,17Networks_RH_VisCent_ExStr_3,0.12095238095238095,5 -camcan,region_elasticnet,17,17Networks_LH_DorsAttnB_PostC_1,0.11619047619047618,5 -camcan,region_elasticnet,24,17Networks_LH_SalVentAttnA_ParMed_1,0.11333333333333333,5 -camcan,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.4011111111111111,5 -camcan,region_group_lasso,3,17Networks_LH_VisCent_Striate_1,0.4004444444444445,5 -camcan,region_group_lasso,9,17Networks_LH_SomMotA_2,0.21444444444444444,5 -camcan,region_group_lasso,86,17Networks_RH_ContB_PFClv_1,0.21155555555555558,5 -camcan,region_group_lasso,59,17Networks_RH_SomMotA_3,0.2053333333333333,5 -camcan,region_group_lasso,93,17Networks_RH_DefaultB_PFCd_1,0.19522222222222224,5 -camcan,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.19333333333333333,5 -camcan,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.1911111111111111,5 -camcan,region_group_lasso,4,17Networks_LH_VisCent_ExStr_3,0.18644444444444444,5 -camcan,region_group_lasso,52,17Networks_RH_VisCent_ExStr_2,0.16444444444444445,5 -camcan,region_group_lasso,61,17Networks_RH_SomMotB_Aud_1,0.149,5 -camcan,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.14866666666666667,5 -camcan,region_group_lasso,44,17Networks_LH_DefaultB_PFCd_1,0.14855555555555555,5 -camcan,region_group_lasso,24,17Networks_LH_SalVentAttnA_ParMed_1,0.14500000000000002,5 -camcan,region_group_lasso,1,17Networks_LH_VisCent_ExStr_1,0.14355555555555558,5 -camcan,region_group_lasso,60,17Networks_RH_SomMotA_4,0.14177777777777778,5 -camcan,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.14033333333333334,5 -camcan,region_group_lasso,31,17Networks_LH_ContA_IPS_1,0.14,5 -camcan,region_group_lasso,8,17Networks_LH_SomMotA_1,0.13877777777777778,5 -camcan,region_group_lasso,87,17Networks_RH_ContC_Cingp_1,0.13366666666666666,5 -hcp,region_elasticnet,40,17Networks_LH_DefaultA_PFCm_1,0.6489415584415584,5 -hcp,region_elasticnet,49,17Networks_LH_DefaultC_PHC_1,0.6307857142857143,5 -hcp,region_elasticnet,59,17Networks_RH_SomMotA_3,0.5822987012987013,5 -hcp,region_elasticnet,97,17Networks_RH_DefaultC_PHC_1,0.5595,5 -hcp,region_elasticnet,47,17Networks_LH_DefaultB_PFCv_2,0.5572272727272727,5 -hcp,region_elasticnet,94,17Networks_RH_DefaultB_PFCv_1,0.46564285714285714,5 -hcp,region_elasticnet,34,17Networks_LH_ContB_PFClv_1,0.44516233766233765,5 -hcp,region_elasticnet,72,17Networks_RH_SalVentAttnA_Ins_1,0.38137012987012986,5 -hcp,region_elasticnet,35,17Networks_LH_ContC_pCun_1,0.3763116883116883,5 -hcp,region_elasticnet,43,17Networks_LH_DefaultB_IPL_1,0.33306493506493506,5 -hcp,region_elasticnet,68,17Networks_RH_DorsAttnB_PostC_1,0.25957142857142856,5 -hcp,region_elasticnet,60,17Networks_RH_SomMotA_4,0.2580844155844156,5 -hcp,region_elasticnet,78,17Networks_RH_LimbicB_OFC_1,0.2569480519480519,5 -hcp,region_elasticnet,9,17Networks_LH_SomMotA_2,0.20033766233766234,5 -hcp,region_elasticnet,100,17Networks_RH_TempPar_3,0.19116883116883115,5 -hcp,region_elasticnet,6,17Networks_LH_VisPeri_StriCal_1,0.18155844155844153,5 -hcp,region_elasticnet,93,17Networks_RH_DefaultB_PFCd_1,0.1799025974025974,5 -hcp,region_elasticnet,22,17Networks_LH_SalVentAttnA_Ins_1,0.17753246753246754,5 -hcp,region_elasticnet,45,17Networks_LH_DefaultB_PFCl_1,0.16571428571428573,5 -hcp,region_elasticnet,10,17Networks_LH_SomMotB_Aud_1,0.16259740259740257,5 -hcp,region_group_lasso,40,17Networks_LH_DefaultA_PFCm_1,0.7090476190476191,5 -hcp,region_group_lasso,59,17Networks_RH_SomMotA_3,0.641984126984127,5 -hcp,region_group_lasso,97,17Networks_RH_DefaultC_PHC_1,0.575952380952381,5 -hcp,region_group_lasso,94,17Networks_RH_DefaultB_PFCv_1,0.5664285714285715,5 -hcp,region_group_lasso,49,17Networks_LH_DefaultC_PHC_1,0.5321428571428571,5 -hcp,region_group_lasso,47,17Networks_LH_DefaultB_PFCv_2,0.518968253968254,5 -hcp,region_group_lasso,34,17Networks_LH_ContB_PFClv_1,0.484047619047619,5 -hcp,region_group_lasso,43,17Networks_LH_DefaultB_IPL_1,0.451031746031746,5 -hcp,region_group_lasso,72,17Networks_RH_SalVentAttnA_Ins_1,0.44103174603174605,5 -hcp,region_group_lasso,60,17Networks_RH_SomMotA_4,0.4093650793650793,5 -hcp,region_group_lasso,78,17Networks_RH_LimbicB_OFC_1,0.35666666666666663,5 -hcp,region_group_lasso,9,17Networks_LH_SomMotA_2,0.33492063492063495,5 -hcp,region_group_lasso,35,17Networks_LH_ContC_pCun_1,0.3103174603174603,5 -hcp,region_group_lasso,22,17Networks_LH_SalVentAttnA_Ins_1,0.2523015873015873,5 -hcp,region_group_lasso,100,17Networks_RH_TempPar_3,0.24230158730158732,5 -hcp,region_group_lasso,28,17Networks_LH_LimbicB_OFC_1,0.22373015873015872,5 -hcp,region_group_lasso,45,17Networks_LH_DefaultB_PFCl_1,0.21984126984126987,5 -hcp,region_group_lasso,79,17Networks_RH_LimbicA_TempPole_1,0.21357142857142858,5 -hcp,region_group_lasso,10,17Networks_LH_SomMotB_Aud_1,0.20023809523809524,5 -hcp,region_group_lasso,29,17Networks_LH_LimbicA_TempPole_1,0.19357142857142856,5 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification.csv deleted file mode 100644 index 003afada..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,0.9999999999999999,0.5156240930072565,0.52768975182635,0.14093032191052007,0.2949552504802204 -mean_std,0.5156240930072565,0.9999999999999999,0.6838356823682372,0.18583635574599333,0.4943558762288604 -percentiles,0.5276897518263499,0.6838356823682373,1.0000000000000002,0.034335080174973644,0.424833277414636 -pca,0.14093032191052007,0.18583635574599333,0.034335080174973644,0.9999999999999998,0.0 -flatten,0.2949552504802205,0.4943558762288604,0.42483327741463606,0.0,0.9999999999999999 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_full_regions.csv deleted file mode 100644 index a743ff1e..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.8259269912943711,0.4689877343273435,0.40077436268648287,0.42137491403952626 -mean_std,0.8259269912943711,1.0,0.6330560341781531,0.3969681098504822,0.5342614846303769 -percentiles,0.4689877343273435,0.6330560341781531,1.0,0.07986466419712668,0.4766922144266 -pca,0.40077436268648287,0.3969681098504822,0.07986466419712668,1.0000000000000002,0.05902777777777777 -flatten,0.42137491403952626,0.5342614846303769,0.4766922144266,0.05902777777777777,0.9999999999999999 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks.csv deleted file mode 100644 index 8fae15e1..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.8357041152657884,0.4432316150768726,0.7329606133463917,0.3293698719487684 -mean_std,0.8357041152657884,1.0,0.4840605330715499,0.8272289945110047,0.3869652515007267 -percentiles,0.4432316150768726,0.4840605330715499,1.0,0.4400768320306763,0.7833795703590862 -pca,0.7329606133463917,0.8272289945110047,0.4400768320306763,1.0,0.22361456404235103 -flatten,0.3293698719487684,0.3869652515007267,0.7833795703590862,0.22361456404235103,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index 60c5d9bf..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.9757980607147971,0.6702263546653617,0.7600972058936962,0.630681957206024 -mean_std,0.9757980607147971,0.9999999999999999,0.7474591785683515,0.783720487740271,0.7011018766030718 -percentiles,0.6702263546653617,0.7474591785683515,1.0,0.5488419673459531,0.8180529394482196 -pca,0.7600972058936962,0.783720487740271,0.5488419673459531,1.0,0.3764710098878843 -flatten,0.630681957206024,0.7011018766030718,0.8180529394482196,0.3764710098878843,1.0000000000000002 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index b0efcf05..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -camcan,binary_classification,md,region_elasticnet,flatten,SomMotA,0.9664139941690962 -camcan,binary_classification,md,region_elasticnet,flatten,LimbicB,0.963265306122449 -camcan,binary_classification,md,region_elasticnet,flatten,VisCent,0.7671370262390671 -camcan,binary_classification,md,region_elasticnet,flatten,SomMotB,0.5649812578092461 -camcan,binary_classification,md,region_elasticnet,flatten,DorsAttnB,0.5083381924198251 -camcan,binary_classification,md,region_elasticnet,mean_std,VisCent,1.0 -camcan,binary_classification,md,region_elasticnet,mean_std,DefaultB,0.7463015269135802 -camcan,binary_classification,md,region_elasticnet,mean_std,SomMotB,0.6922538666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,SalVentAttnA,0.6803676711111111 -camcan,binary_classification,md,region_elasticnet,mean_std,ContB,0.6779999999999999 -camcan,binary_classification,md,region_elasticnet,pca,SalVentAttnA,0.4267492711370262 -camcan,binary_classification,md,region_elasticnet,pca,VisCent,0.3746355685131194 -camcan,binary_classification,md,region_elasticnet,pca,DefaultB,0.32252186588921283 -camcan,binary_classification,md,region_elasticnet,pca,ContA,0.27040816326530615 -camcan,binary_classification,md,region_elasticnet,pca,ContB,0.2142857142857143 -camcan,binary_classification,md,region_elasticnet,percentiles,VisCent,0.9599452609031951 -camcan,binary_classification,md,region_elasticnet,percentiles,LimbicB,0.7575510204081632 -camcan,binary_classification,md,region_elasticnet,percentiles,SomMotA,0.7216326530612245 -camcan,binary_classification,md,region_elasticnet,percentiles,ContC,0.5178542274052478 -camcan,binary_classification,md,region_elasticnet,percentiles,DefaultB,0.4844781341107872 -camcan,binary_classification,md,region_elasticnet,summary_stats,DefaultB,0.6201996891654513 -camcan,binary_classification,md,region_elasticnet,summary_stats,VisCent,0.5473179162559819 -camcan,binary_classification,md,region_elasticnet,summary_stats,SalVentAttnA,0.5400855610987889 -camcan,binary_classification,md,region_elasticnet,summary_stats,DefaultA,0.4492715663206417 -camcan,binary_classification,md,region_elasticnet,summary_stats,SomMotB,0.4477810345665427 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_top_regions.csv deleted file mode 100644 index a65ae33c..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_elasticnet_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -camcan,binary_classification,md,region_elasticnet,flatten,28,17Networks_LH_LimbicB_OFC_1,0.8571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,78,17Networks_RH_LimbicB_OFC_1,0.7428571428571429 -camcan,binary_classification,md,region_elasticnet,flatten,3,17Networks_LH_VisCent_Striate_1,0.6571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,8,17Networks_LH_SomMotA_1,0.6571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,9,17Networks_LH_SomMotA_2,0.6571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,60,17Networks_RH_SomMotA_4,0.6 -camcan,binary_classification,md,region_elasticnet,flatten,17,17Networks_LH_DorsAttnB_PostC_1,0.42857142857142855 -camcan,binary_classification,md,region_elasticnet,flatten,61,17Networks_RH_SomMotB_Aud_1,0.42857142857142855 -camcan,binary_classification,md,region_elasticnet,flatten,29,17Networks_LH_LimbicA_TempPole_1,0.3142857142857143 -camcan,binary_classification,md,region_elasticnet,flatten,59,17Networks_RH_SomMotA_3,0.2857142857142857 -camcan,binary_classification,md,region_elasticnet,mean_std,3,17Networks_LH_VisCent_Striate_1,1.0 -camcan,binary_classification,md,region_elasticnet,mean_std,28,17Networks_LH_LimbicB_OFC_1,0.36666666666666664 -camcan,binary_classification,md,region_elasticnet,mean_std,4,17Networks_LH_VisCent_ExStr_3,0.3 -camcan,binary_classification,md,region_elasticnet,mean_std,86,17Networks_RH_ContB_PFClv_1,0.3 -camcan,binary_classification,md,region_elasticnet,mean_std,2,17Networks_LH_VisCent_ExStr_2,0.26666666666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,24,17Networks_LH_SalVentAttnA_ParMed_1,0.26666666666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,59,17Networks_RH_SomMotA_3,0.26666666666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,1,17Networks_LH_VisCent_ExStr_1,0.23333333333333334 -camcan,binary_classification,md,region_elasticnet,mean_std,9,17Networks_LH_SomMotA_2,0.23333333333333334 -camcan,binary_classification,md,region_elasticnet,mean_std,20,17Networks_LH_DorsAttnB_FEF_1,0.23333333333333334 -camcan,binary_classification,md,region_elasticnet,pca,22,17Networks_LH_SalVentAttnA_Ins_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,24,17Networks_LH_SalVentAttnA_ParMed_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,31,17Networks_LH_ContA_IPS_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,52,17Networks_RH_VisCent_ExStr_2,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,86,17Networks_RH_ContB_PFClv_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,95,17Networks_RH_DefaultB_PFCv_2,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,13,17Networks_LH_SomMotB_Cent_1,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,pca,51,17Networks_RH_VisCent_ExStr_1,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,pca,1,17Networks_LH_VisCent_ExStr_1,0.07142857142857142 -camcan,binary_classification,md,region_elasticnet,pca,14,17Networks_LH_DorsAttnA_TempOcc_1,0.07142857142857142 -camcan,binary_classification,md,region_elasticnet,percentiles,3,17Networks_LH_VisCent_Striate_1,0.7428571428571429 -camcan,binary_classification,md,region_elasticnet,percentiles,28,17Networks_LH_LimbicB_OFC_1,0.7428571428571429 -camcan,binary_classification,md,region_elasticnet,percentiles,4,17Networks_LH_VisCent_ExStr_3,0.6857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,59,17Networks_RH_SomMotA_3,0.6857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,87,17Networks_RH_ContC_Cingp_1,0.45714285714285713 -camcan,binary_classification,md,region_elasticnet,percentiles,99,17Networks_RH_TempPar_2,0.42857142857142855 -camcan,binary_classification,md,region_elasticnet,percentiles,93,17Networks_RH_DefaultB_PFCd_1,0.34285714285714286 -camcan,binary_classification,md,region_elasticnet,percentiles,2,17Networks_LH_VisCent_ExStr_2,0.2857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,53,17Networks_RH_VisCent_ExStr_3,0.2857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,13,17Networks_LH_SomMotB_Cent_1,0.22857142857142856 -camcan,binary_classification,md,region_elasticnet,summary_stats,3,17Networks_LH_VisCent_Striate_1,0.2 -camcan,binary_classification,md,region_elasticnet,summary_stats,43,17Networks_LH_DefaultB_IPL_1,0.2 -camcan,binary_classification,md,region_elasticnet,summary_stats,59,17Networks_RH_SomMotA_3,0.17142857142857143 -camcan,binary_classification,md,region_elasticnet,summary_stats,87,17Networks_RH_ContC_Cingp_1,0.17142857142857143 -camcan,binary_classification,md,region_elasticnet,summary_stats,86,17Networks_RH_ContB_PFClv_1,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,summary_stats,100,17Networks_RH_TempPar_3,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.11428571428571428 -camcan,binary_classification,md,region_elasticnet,summary_stats,14,17Networks_LH_DorsAttnA_TempOcc_1,0.11428571428571428 -camcan,binary_classification,md,region_elasticnet,summary_stats,21,17Networks_LH_SalVentAttnA_ParOper_1,0.11428571428571428 -camcan,binary_classification,md,region_elasticnet,summary_stats,78,17Networks_RH_LimbicB_OFC_1,0.11428571428571428 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification.csv deleted file mode 100644 index eb2dab8b..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,0.9999999999999998,0.6260870965844154,0.6462472678347012,0.18724057091928917,0.09714995687149498 -mean_std,0.6260870965844154,1.0,0.8373872150266096,0.1486430495444275,0.18565376302194167 -percentiles,0.6462472678347012,0.8373872150266096,1.0000000000000002,0.020667014070970192,0.20318042136245612 -pca,0.18724057091928914,0.14864304954442747,0.020667014070970192,0.9999999999999998,0.06238247031525727 -flatten,0.09714995687149497,0.18565376302194167,0.20318042136245612,0.06238247031525727,1.0000000000000002 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_full_regions.csv deleted file mode 100644 index 13591851..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.7144587326479123,0.6461437467759916,0.6519688103313069,0.37867119702112223 -mean_std,0.7144587326479123,1.0,0.8483454123469417,0.5098442370101776,0.35475087222499746 -percentiles,0.6461437467759916,0.8483454123469417,1.0000000000000002,0.28072094969436834,0.33402484611347083 -pca,0.6519688103313069,0.5098442370101776,0.28072094969436834,0.9999999999999999,0.2301083625098688 -flatten,0.37867119702112223,0.35475087222499746,0.33402484611347083,0.2301083625098688,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks.csv deleted file mode 100644 index 1513effd..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,0.9999999999999998,0.6815066449631698,0.6126717057592754,0.7277298947203947,0.395620483659437 -mean_std,0.6815066449631698,1.0,0.6940859267095274,0.4801307491934096,0.48891754038495694 -percentiles,0.6126717057592754,0.6940859267095274,0.9999999999999999,0.5326430018695371,0.5711299080270277 -pca,0.7277298947203947,0.4801307491934097,0.5326430018695371,1.0,0.20398659862088953 -flatten,0.395620483659437,0.488917540384957,0.5711299080270277,0.20398659862088953,0.9999999999999999 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index 65aec32d..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.960995938005012,0.9083750967748432,0.936616846889536,0.6728105489568719 -mean_std,0.960995938005012,0.9999999999999998,0.9421843304842645,0.9119790198298958,0.6799427388173429 -percentiles,0.9083750967748432,0.9421843304842645,1.0,0.8136160913081881,0.727063578554112 -pca,0.936616846889536,0.9119790198298958,0.8136160913081881,1.0,0.5549580245465665 -flatten,0.6728105489568719,0.6799427388173429,0.727063578554112,0.5549580245465665,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index 4b9a3fd0..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -camcan,binary_classification,md,region_group_lasso,flatten,SomMotA,0.9520123456790124 -camcan,binary_classification,md,region_group_lasso,flatten,LimbicB,0.8411111111111111 -camcan,binary_classification,md,region_group_lasso,flatten,DefaultB,0.804 -camcan,binary_classification,md,region_group_lasso,flatten,LimbicA,0.7822222222222222 -camcan,binary_classification,md,region_group_lasso,flatten,SomMotB,0.6928148148148148 -camcan,binary_classification,md,region_group_lasso,mean_std,VisCent,1.0 -camcan,binary_classification,md,region_group_lasso,mean_std,ContB,0.6586024960000001 -camcan,binary_classification,md,region_group_lasso,mean_std,DefaultB,0.6446756627808257 -camcan,binary_classification,md,region_group_lasso,mean_std,LimbicB,0.5968 -camcan,binary_classification,md,region_group_lasso,mean_std,SomMotB,0.59385228673024 -camcan,binary_classification,md,region_group_lasso,pca,SalVentAttnA,0.8473144493935545 -camcan,binary_classification,md,region_group_lasso,pca,VisCent,0.7296573870965921 -camcan,binary_classification,md,region_group_lasso,pca,DefaultB,0.7234943497577342 -camcan,binary_classification,md,region_group_lasso,pca,ContA,0.610215125743027 -camcan,binary_classification,md,region_group_lasso,pca,ContC,0.528875720164609 -camcan,binary_classification,md,region_group_lasso,percentiles,VisCent,0.8687249956864 -camcan,binary_classification,md,region_group_lasso,percentiles,LimbicB,0.6928000000000001 -camcan,binary_classification,md,region_group_lasso,percentiles,SomMotA,0.576006197248 -camcan,binary_classification,md,region_group_lasso,percentiles,ContC,0.4351845376 -camcan,binary_classification,md,region_group_lasso,percentiles,DefaultB,0.3894158603480833 -camcan,binary_classification,md,region_group_lasso,summary_stats,VisCent,0.5535938125000002 -camcan,binary_classification,md,region_group_lasso,summary_stats,DefaultB,0.5159981933593749 -camcan,binary_classification,md,region_group_lasso,summary_stats,SalVentAttnA,0.49557822991943357 -camcan,binary_classification,md,region_group_lasso,summary_stats,ContB,0.4024500000000001 -camcan,binary_classification,md,region_group_lasso,summary_stats,SomMotA,0.36783437500000005 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_top_regions.csv deleted file mode 100644 index 702cdcbf..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_camcan_region_group_lasso_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -camcan,binary_classification,md,region_group_lasso,flatten,9,17Networks_LH_SomMotA_2,0.6666666666666666 -camcan,binary_classification,md,region_group_lasso,flatten,28,17Networks_LH_LimbicB_OFC_1,0.6333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,8,17Networks_LH_SomMotA_1,0.5666666666666667 -camcan,binary_classification,md,region_group_lasso,flatten,60,17Networks_RH_SomMotA_4,0.5666666666666667 -camcan,binary_classification,md,region_group_lasso,flatten,78,17Networks_RH_LimbicB_OFC_1,0.5666666666666667 -camcan,binary_classification,md,region_group_lasso,flatten,29,17Networks_LH_LimbicA_TempPole_1,0.5333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,44,17Networks_LH_DefaultB_PFCd_1,0.5333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,79,17Networks_RH_LimbicA_TempPole_1,0.5333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,61,17Networks_RH_SomMotB_Aud_1,0.5 -camcan,binary_classification,md,region_group_lasso,flatten,93,17Networks_RH_DefaultB_PFCd_1,0.4 -camcan,binary_classification,md,region_group_lasso,mean_std,3,17Networks_LH_VisCent_Striate_1,1.0 -camcan,binary_classification,md,region_group_lasso,mean_std,28,17Networks_LH_LimbicB_OFC_1,0.52 -camcan,binary_classification,md,region_group_lasso,mean_std,86,17Networks_RH_ContB_PFClv_1,0.4 -camcan,binary_classification,md,region_group_lasso,mean_std,4,17Networks_LH_VisCent_ExStr_3,0.36 -camcan,binary_classification,md,region_group_lasso,mean_std,59,17Networks_RH_SomMotA_3,0.28 -camcan,binary_classification,md,region_group_lasso,mean_std,1,17Networks_LH_VisCent_ExStr_1,0.2 -camcan,binary_classification,md,region_group_lasso,mean_std,37,17Networks_LH_ContC_Cingp_1,0.2 -camcan,binary_classification,md,region_group_lasso,mean_std,2,17Networks_LH_VisCent_ExStr_2,0.16 -camcan,binary_classification,md,region_group_lasso,mean_std,9,17Networks_LH_SomMotA_2,0.16 -camcan,binary_classification,md,region_group_lasso,mean_std,10,17Networks_LH_SomMotB_Aud_1,0.16 -camcan,binary_classification,md,region_group_lasso,pca,22,17Networks_LH_SalVentAttnA_Ins_1,0.4 -camcan,binary_classification,md,region_group_lasso,pca,24,17Networks_LH_SalVentAttnA_ParMed_1,0.4 -camcan,binary_classification,md,region_group_lasso,pca,31,17Networks_LH_ContA_IPS_1,0.4 -camcan,binary_classification,md,region_group_lasso,pca,1,17Networks_LH_VisCent_ExStr_1,0.37777777777777777 -camcan,binary_classification,md,region_group_lasso,pca,86,17Networks_RH_ContB_PFClv_1,0.37777777777777777 -camcan,binary_classification,md,region_group_lasso,pca,14,17Networks_LH_DorsAttnA_TempOcc_1,0.35555555555555557 -camcan,binary_classification,md,region_group_lasso,pca,52,17Networks_RH_VisCent_ExStr_2,0.35555555555555557 -camcan,binary_classification,md,region_group_lasso,pca,93,17Networks_RH_DefaultB_PFCd_1,0.3111111111111111 -camcan,binary_classification,md,region_group_lasso,pca,95,17Networks_RH_DefaultB_PFCv_2,0.3111111111111111 -camcan,binary_classification,md,region_group_lasso,pca,35,17Networks_LH_ContC_pCun_1,0.28888888888888886 -camcan,binary_classification,md,region_group_lasso,percentiles,3,17Networks_LH_VisCent_Striate_1,0.68 -camcan,binary_classification,md,region_group_lasso,percentiles,28,17Networks_LH_LimbicB_OFC_1,0.68 -camcan,binary_classification,md,region_group_lasso,percentiles,59,17Networks_RH_SomMotA_3,0.48 -camcan,binary_classification,md,region_group_lasso,percentiles,4,17Networks_LH_VisCent_ExStr_3,0.4 -camcan,binary_classification,md,region_group_lasso,percentiles,87,17Networks_RH_ContC_Cingp_1,0.24 -camcan,binary_classification,md,region_group_lasso,percentiles,37,17Networks_LH_ContC_Cingp_1,0.16 -camcan,binary_classification,md,region_group_lasso,percentiles,53,17Networks_RH_VisCent_ExStr_3,0.16 -camcan,binary_classification,md,region_group_lasso,percentiles,99,17Networks_RH_TempPar_2,0.16 -camcan,binary_classification,md,region_group_lasso,percentiles,2,17Networks_LH_VisCent_ExStr_2,0.08 -camcan,binary_classification,md,region_group_lasso,percentiles,14,17Networks_LH_DorsAttnA_TempOcc_1,0.08 -camcan,binary_classification,md,region_group_lasso,summary_stats,3,17Networks_LH_VisCent_Striate_1,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,43,17Networks_LH_DefaultB_IPL_1,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,59,17Networks_RH_SomMotA_3,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,86,17Networks_RH_ContB_PFClv_1,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,87,17Networks_RH_ContC_Cingp_1,0.175 -camcan,binary_classification,md,region_group_lasso,summary_stats,100,17Networks_RH_TempPar_3,0.175 -camcan,binary_classification,md,region_group_lasso,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.15 -camcan,binary_classification,md,region_group_lasso,summary_stats,28,17Networks_LH_LimbicB_OFC_1,0.15 -camcan,binary_classification,md,region_group_lasso,summary_stats,34,17Networks_LH_ContB_PFClv_1,0.15 -camcan,binary_classification,md,region_group_lasso,summary_stats,35,17Networks_LH_ContC_pCun_1,0.15 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification.csv deleted file mode 100644 index 3ab6dfdf..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0000000000000002,0.5554625452793291,0.5803887177786781,0.5583246250893941,0.2552751715209067 -mean_std,0.5554625452793291,1.0000000000000002,0.8696579415624482,0.3898909519438638,0.4386706876239521 -percentiles,0.5803887177786781,0.8696579415624482,1.0,0.4767841224286081,0.39248676141740607 -pca,0.5583246250893941,0.3898909519438638,0.4767841224286081,1.0000000000000002,0.14764874296538455 -flatten,0.2552751715209067,0.4386706876239522,0.39248676141740607,0.14764874296538458,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_full_regions.csv deleted file mode 100644 index ccf5411f..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0000000000000002,0.619860067037814,0.7282074158347642,0.6517288461847653,0.5168766202984362 -mean_std,0.619860067037814,1.0,0.8917743685860114,0.43970759030158113,0.4559924441340692 -percentiles,0.7282074158347642,0.8917743685860114,1.0,0.5533037167107904,0.5372458598563743 -pca,0.6517288461847653,0.43970759030158113,0.5533037167107904,1.0,0.3263908776696566 -flatten,0.5168766202984362,0.4559924441340692,0.5372458598563743,0.3263908776696566,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks.csv deleted file mode 100644 index 453421da..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0000000000000002,0.6497514260887608,0.6216063359226472,0.637796686310846,0.21779635642036455 -mean_std,0.6497514260887609,1.0,0.995302063759928,0.5854362894669588,0.41731470441504054 -percentiles,0.6216063359226472,0.995302063759928,1.0,0.6148006445852238,0.4303194867785462 -pca,0.637796686310846,0.5854362894669588,0.6148006445852238,1.0000000000000002,0.1981027372827598 -flatten,0.21779635642036455,0.4173147044150404,0.43031948677854615,0.19810273728275976,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index c0055d4a..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.7034345002989657,0.9195753280336789,0.8997206523936272,0.7811385388612485 -mean_std,0.7034345002989657,1.0,0.8713143677480942,0.5596503081440259,0.5462921055815352 -percentiles,0.9195753280336789,0.8713143677480942,0.9999999999999999,0.7944260545023414,0.7842437992017375 -pca,0.8997206523936272,0.5596503081440259,0.7944260545023414,1.0000000000000002,0.7002767013416813 -flatten,0.7811385388612485,0.5462921055815352,0.7842437992017375,0.7002767013416813,0.9999999999999998 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index 3f56242e..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -hcp,binary_classification,md,region_elasticnet,flatten,DefaultC,0.9779355468750001 -hcp,binary_classification,md,region_elasticnet,flatten,VisPeri,0.8225541015625 -hcp,binary_classification,md,region_elasticnet,flatten,LimbicB,0.8125 -hcp,binary_classification,md,region_elasticnet,flatten,SomMotA,0.7578691284179687 -hcp,binary_classification,md,region_elasticnet,flatten,DorsAttnB,0.7052326965332032 -hcp,binary_classification,md,region_elasticnet,mean_std,DefaultC,0.9811840000000001 -hcp,binary_classification,md,region_elasticnet,mean_std,DefaultB,0.958638592 -hcp,binary_classification,md,region_elasticnet,mean_std,ContB,0.90976 -hcp,binary_classification,md,region_elasticnet,mean_std,DefaultA,0.80448 -hcp,binary_classification,md,region_elasticnet,mean_std,SomMotA,0.72352 -hcp,binary_classification,md,region_elasticnet,pca,DefaultB,0.9987331088232355 -hcp,binary_classification,md,region_elasticnet,pca,SomMotA,0.9911984402456365 -hcp,binary_classification,md,region_elasticnet,pca,SalVentAttnA,0.9267468069120962 -hcp,binary_classification,md,region_elasticnet,pca,DefaultA,0.8816679188580016 -hcp,binary_classification,md,region_elasticnet,pca,ContC,0.8106686701728024 -hcp,binary_classification,md,region_elasticnet,percentiles,DefaultC,0.9992296543107039 -hcp,binary_classification,md,region_elasticnet,percentiles,DefaultB,0.9974620079651859 -hcp,binary_classification,md,region_elasticnet,percentiles,ContB,0.9835366121258999 -hcp,binary_classification,md,region_elasticnet,percentiles,SomMotA,0.9801584104582275 -hcp,binary_classification,md,region_elasticnet,percentiles,DefaultA,0.909200713036235 -hcp,binary_classification,md,region_elasticnet,summary_stats,DefaultB,0.8073766795879112 -hcp,binary_classification,md,region_elasticnet,summary_stats,DefaultA,0.6453642661913221 -hcp,binary_classification,md,region_elasticnet,summary_stats,SalVentAttnA,0.6088704185297618 -hcp,binary_classification,md,region_elasticnet,summary_stats,SomMotB,0.6032847992889816 -hcp,binary_classification,md,region_elasticnet,summary_stats,DefaultC,0.6009982507288629 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_top_regions.csv deleted file mode 100644 index 70982c4b..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_elasticnet_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -hcp,binary_classification,md,region_elasticnet,flatten,49,17Networks_LH_DefaultC_PHC_1,0.8625 -hcp,binary_classification,md,region_elasticnet,flatten,97,17Networks_RH_DefaultC_PHC_1,0.8375 -hcp,binary_classification,md,region_elasticnet,flatten,78,17Networks_RH_LimbicB_OFC_1,0.625 -hcp,binary_classification,md,region_elasticnet,flatten,6,17Networks_LH_VisPeri_StriCal_1,0.6 -hcp,binary_classification,md,region_elasticnet,flatten,58,17Networks_RH_SomMotA_2,0.5125 -hcp,binary_classification,md,region_elasticnet,flatten,28,17Networks_LH_LimbicB_OFC_1,0.5 -hcp,binary_classification,md,region_elasticnet,flatten,79,17Networks_RH_LimbicA_TempPole_1,0.4875 -hcp,binary_classification,md,region_elasticnet,flatten,87,17Networks_RH_ContC_Cingp_1,0.45 -hcp,binary_classification,md,region_elasticnet,flatten,55,17Networks_RH_VisPeri_ExStrInf_1,0.4375 -hcp,binary_classification,md,region_elasticnet,flatten,40,17Networks_LH_DefaultA_PFCm_1,0.4125 -hcp,binary_classification,md,region_elasticnet,mean_std,49,17Networks_LH_DefaultC_PHC_1,0.92 -hcp,binary_classification,md,region_elasticnet,mean_std,34,17Networks_LH_ContB_PFClv_1,0.9 -hcp,binary_classification,md,region_elasticnet,mean_std,97,17Networks_RH_DefaultC_PHC_1,0.76 -hcp,binary_classification,md,region_elasticnet,mean_std,40,17Networks_LH_DefaultA_PFCm_1,0.74 -hcp,binary_classification,md,region_elasticnet,mean_std,59,17Networks_RH_SomMotA_3,0.68 -hcp,binary_classification,md,region_elasticnet,mean_std,94,17Networks_RH_DefaultB_PFCv_1,0.68 -hcp,binary_classification,md,region_elasticnet,mean_std,47,17Networks_LH_DefaultB_PFCv_2,0.66 -hcp,binary_classification,md,region_elasticnet,mean_std,45,17Networks_LH_DefaultB_PFCl_1,0.4 -hcp,binary_classification,md,region_elasticnet,mean_std,43,17Networks_LH_DefaultB_IPL_1,0.34 -hcp,binary_classification,md,region_elasticnet,mean_std,38,17Networks_LH_DefaultA_PFCd_1,0.2 -hcp,binary_classification,md,region_elasticnet,pca,40,17Networks_LH_DefaultA_PFCm_1,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,47,17Networks_LH_DefaultB_PFCv_2,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,59,17Networks_RH_SomMotA_3,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,60,17Networks_RH_SomMotA_4,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,72,17Networks_RH_SalVentAttnA_Ins_1,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,43,17Networks_LH_DefaultB_IPL_1,0.8181818181818182 -hcp,binary_classification,md,region_elasticnet,pca,93,17Networks_RH_DefaultB_PFCd_1,0.7727272727272727 -hcp,binary_classification,md,region_elasticnet,pca,35,17Networks_LH_ContC_pCun_1,0.7272727272727273 -hcp,binary_classification,md,region_elasticnet,pca,100,17Networks_RH_TempPar_3,0.7272727272727273 -hcp,binary_classification,md,region_elasticnet,pca,78,17Networks_RH_LimbicB_OFC_1,0.5454545454545454 -hcp,binary_classification,md,region_elasticnet,percentiles,34,17Networks_LH_ContB_PFClv_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,49,17Networks_LH_DefaultC_PHC_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,59,17Networks_RH_SomMotA_3,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,94,17Networks_RH_DefaultB_PFCv_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,97,17Networks_RH_DefaultC_PHC_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,40,17Networks_LH_DefaultA_PFCm_1,0.8 -hcp,binary_classification,md,region_elasticnet,percentiles,47,17Networks_LH_DefaultB_PFCv_2,0.8 -hcp,binary_classification,md,region_elasticnet,percentiles,35,17Networks_LH_ContC_pCun_1,0.6857142857142857 -hcp,binary_classification,md,region_elasticnet,percentiles,68,17Networks_RH_DorsAttnB_PostC_1,0.6571428571428571 -hcp,binary_classification,md,region_elasticnet,percentiles,72,17Networks_RH_SalVentAttnA_Ins_1,0.6 -hcp,binary_classification,md,region_elasticnet,summary_stats,35,17Networks_LH_ContC_pCun_1,0.42857142857142855 -hcp,binary_classification,md,region_elasticnet,summary_stats,40,17Networks_LH_DefaultA_PFCm_1,0.42857142857142855 -hcp,binary_classification,md,region_elasticnet,summary_stats,47,17Networks_LH_DefaultB_PFCv_2,0.4 -hcp,binary_classification,md,region_elasticnet,summary_stats,49,17Networks_LH_DefaultC_PHC_1,0.4 -hcp,binary_classification,md,region_elasticnet,summary_stats,59,17Networks_RH_SomMotA_3,0.37142857142857144 -hcp,binary_classification,md,region_elasticnet,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.3142857142857143 -hcp,binary_classification,md,region_elasticnet,summary_stats,16,17Networks_LH_DorsAttnA_SPL_1,0.2857142857142857 -hcp,binary_classification,md,region_elasticnet,summary_stats,10,17Networks_LH_SomMotB_Aud_1,0.2571428571428571 -hcp,binary_classification,md,region_elasticnet,summary_stats,50,17Networks_LH_TempPar_1,0.2571428571428571 -hcp,binary_classification,md,region_elasticnet,summary_stats,43,17Networks_LH_DefaultB_IPL_1,0.22857142857142856 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification.csv deleted file mode 100644 index cff2e98a..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.5697175237905894,0.5641693418070918,0.4087319321233776,0.16622187075947892 -mean_std,0.5697175237905894,1.0000000000000002,0.9083685361137405,0.4008962498203259,0.17932547306886623 -percentiles,0.5641693418070919,0.9083685361137405,1.0000000000000002,0.3407947276876659,0.21877847713450227 -pca,0.4087319321233778,0.4008962498203259,0.3407947276876659,1.0000000000000002,0.42030656808866973 -flatten,0.1662218707594789,0.1793254730688662,0.21877847713450235,0.42030656808866973,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_full_regions.csv deleted file mode 100644 index 0d7da7f4..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0000000000000002,0.6198921685963898,0.6667941849691645,0.553452938546566,0.41767222263061 -mean_std,0.6198921685963898,1.0,0.9129924532894084,0.47815761688017416,0.274180244022152 -percentiles,0.6667941849691645,0.9129924532894084,1.0,0.47467887031354083,0.3457291439925741 -pca,0.553452938546566,0.47815761688017416,0.47467887031354083,1.0,0.5459443847485613 -flatten,0.41767222263061,0.274180244022152,0.3457291439925741,0.5459443847485613,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks.csv deleted file mode 100644 index 17350256..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,0.9999999999999999,0.41387925280548016,0.4014858780326797,0.6282706094717936,0.3732984182057458 -mean_std,0.41387925280548016,1.0,0.9989175002915563,0.6008299670021338,0.3708838374481298 -percentiles,0.4014858780326797,0.9989175002915563,1.0,0.5981737275686316,0.36326441278600213 -pca,0.6282706094717936,0.6008299670021338,0.5981737275686316,1.0,0.5766203572281875 -flatten,0.3732984182057458,0.3708838374481298,0.36326441278600213,0.5766203572281875,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index 9c5d5d92..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.7462409981395816,0.9074012096930788,0.8611727404337889,0.7275184748439457 -mean_std,0.7462409981395816,1.0,0.9333790084175507,0.6230948793976143,0.6235129278407625 -percentiles,0.9074012096930788,0.9333790084175507,1.0000000000000002,0.7722995797363564,0.7454547226675273 -pca,0.8611727404337889,0.6230948793976143,0.7722995797363564,1.0000000000000002,0.7539174597938667 -flatten,0.7275184748439457,0.6235129278407625,0.7454547226675273,0.7539174597938667,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index 78f13a31..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -hcp,binary_classification,md,region_group_lasso,flatten,SomMotA,0.9895643481882549 -hcp,binary_classification,md,region_group_lasso,flatten,LimbicA,0.9836734693877551 -hcp,binary_classification,md,region_group_lasso,flatten,LimbicB,0.9804081632653061 -hcp,binary_classification,md,region_group_lasso,flatten,SalVentAttnA,0.8960932944606413 -hcp,binary_classification,md,region_group_lasso,flatten,DefaultA,0.8096793002915452 -hcp,binary_classification,md,region_group_lasso,mean_std,ContB,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,DefaultC,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,DefaultB,0.999415266733278 -hcp,binary_classification,md,region_group_lasso,mean_std,SomMotA,0.9811150739216583 -hcp,binary_classification,md,region_group_lasso,mean_std,DefaultA,0.8864386445155719 -hcp,binary_classification,md,region_group_lasso,pca,DefaultB,0.9984513580246913 -hcp,binary_classification,md,region_group_lasso,pca,SomMotA,0.9883851851851851 -hcp,binary_classification,md,region_group_lasso,pca,SalVentAttnA,0.935288888888889 -hcp,binary_classification,md,region_group_lasso,pca,TempPar,0.8497777777777777 -hcp,binary_classification,md,region_group_lasso,pca,DefaultA,0.8257777777777778 -hcp,binary_classification,md,region_group_lasso,percentiles,DefaultC,0.9994359375 -hcp,binary_classification,md,region_group_lasso,percentiles,DefaultB,0.990295170171814 -hcp,binary_classification,md,region_group_lasso,percentiles,SomMotA,0.981673609375 -hcp,binary_classification,md,region_group_lasso,percentiles,ContB,0.94720375 -hcp,binary_classification,md,region_group_lasso,percentiles,DefaultA,0.7764512573242188 -hcp,binary_classification,md,region_group_lasso,summary_stats,DefaultB,0.8956097091043941 -hcp,binary_classification,md,region_group_lasso,summary_stats,DefaultA,0.845285035996906 -hcp,binary_classification,md,region_group_lasso,summary_stats,SalVentAttnA,0.8236256309071751 -hcp,binary_classification,md,region_group_lasso,summary_stats,DorsAttnA,0.7838092794668887 -hcp,binary_classification,md,region_group_lasso,summary_stats,SomMotB,0.7182459787955213 diff --git a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_top_regions.csv deleted file mode 100644 index 151db37d..00000000 --- a/scripts/interpretability/focus/outputs/csv/cosine_hcp_region_group_lasso_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -hcp,binary_classification,md,region_group_lasso,flatten,79,17Networks_RH_LimbicA_TempPole_1,0.9428571428571428 -hcp,binary_classification,md,region_group_lasso,flatten,28,17Networks_LH_LimbicB_OFC_1,0.8857142857142857 -hcp,binary_classification,md,region_group_lasso,flatten,9,17Networks_LH_SomMotA_2,0.8571428571428571 -hcp,binary_classification,md,region_group_lasso,flatten,72,17Networks_RH_SalVentAttnA_Ins_1,0.8571428571428571 -hcp,binary_classification,md,region_group_lasso,flatten,60,17Networks_RH_SomMotA_4,0.8285714285714286 -hcp,binary_classification,md,region_group_lasso,flatten,78,17Networks_RH_LimbicB_OFC_1,0.8285714285714286 -hcp,binary_classification,md,region_group_lasso,flatten,40,17Networks_LH_DefaultA_PFCm_1,0.7714285714285715 -hcp,binary_classification,md,region_group_lasso,flatten,29,17Networks_LH_LimbicA_TempPole_1,0.7142857142857143 -hcp,binary_classification,md,region_group_lasso,flatten,97,17Networks_RH_DefaultC_PHC_1,0.5428571428571428 -hcp,binary_classification,md,region_group_lasso,flatten,8,17Networks_LH_SomMotA_1,0.4857142857142857 -hcp,binary_classification,md,region_group_lasso,mean_std,34,17Networks_LH_ContB_PFClv_1,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,49,17Networks_LH_DefaultC_PHC_1,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,59,17Networks_RH_SomMotA_3,0.9777777777777777 -hcp,binary_classification,md,region_group_lasso,mean_std,47,17Networks_LH_DefaultB_PFCv_2,0.9555555555555556 -hcp,binary_classification,md,region_group_lasso,mean_std,94,17Networks_RH_DefaultB_PFCv_1,0.9333333333333333 -hcp,binary_classification,md,region_group_lasso,mean_std,97,17Networks_RH_DefaultC_PHC_1,0.9333333333333333 -hcp,binary_classification,md,region_group_lasso,mean_std,40,17Networks_LH_DefaultA_PFCm_1,0.8666666666666667 -hcp,binary_classification,md,region_group_lasso,mean_std,45,17Networks_LH_DefaultB_PFCl_1,0.5777777777777777 -hcp,binary_classification,md,region_group_lasso,mean_std,43,17Networks_LH_DefaultB_IPL_1,0.5111111111111111 -hcp,binary_classification,md,region_group_lasso,mean_std,68,17Networks_RH_DorsAttnB_PostC_1,0.15555555555555556 -hcp,binary_classification,md,region_group_lasso,pca,40,17Networks_LH_DefaultA_PFCm_1,0.8 -hcp,binary_classification,md,region_group_lasso,pca,47,17Networks_LH_DefaultB_PFCv_2,0.8 -hcp,binary_classification,md,region_group_lasso,pca,59,17Networks_RH_SomMotA_3,0.8 -hcp,binary_classification,md,region_group_lasso,pca,60,17Networks_RH_SomMotA_4,0.8 -hcp,binary_classification,md,region_group_lasso,pca,72,17Networks_RH_SalVentAttnA_Ins_1,0.8 -hcp,binary_classification,md,region_group_lasso,pca,93,17Networks_RH_DefaultB_PFCd_1,0.8 -hcp,binary_classification,md,region_group_lasso,pca,100,17Networks_RH_TempPar_3,0.8 -hcp,binary_classification,md,region_group_lasso,pca,35,17Networks_LH_ContC_pCun_1,0.7333333333333333 -hcp,binary_classification,md,region_group_lasso,pca,43,17Networks_LH_DefaultB_IPL_1,0.7333333333333333 -hcp,binary_classification,md,region_group_lasso,pca,78,17Networks_RH_LimbicB_OFC_1,0.7333333333333333 -hcp,binary_classification,md,region_group_lasso,percentiles,49,17Networks_LH_DefaultC_PHC_1,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,59,17Networks_RH_SomMotA_3,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,94,17Networks_RH_DefaultB_PFCv_1,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,97,17Networks_RH_DefaultC_PHC_1,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,34,17Networks_LH_ContB_PFClv_1,0.925 -hcp,binary_classification,md,region_group_lasso,percentiles,40,17Networks_LH_DefaultA_PFCm_1,0.65 -hcp,binary_classification,md,region_group_lasso,percentiles,68,17Networks_RH_DorsAttnB_PostC_1,0.35 -hcp,binary_classification,md,region_group_lasso,percentiles,47,17Networks_LH_DefaultB_PFCv_2,0.325 -hcp,binary_classification,md,region_group_lasso,percentiles,72,17Networks_RH_SalVentAttnA_Ins_1,0.275 -hcp,binary_classification,md,region_group_lasso,percentiles,35,17Networks_LH_ContC_pCun_1,0.25 -hcp,binary_classification,md,region_group_lasso,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,10,17Networks_LH_SomMotB_Aud_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,16,17Networks_LH_DorsAttnA_SPL_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,35,17Networks_LH_ContC_pCun_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,40,17Networks_LH_DefaultA_PFCm_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,47,17Networks_LH_DefaultB_PFCv_2,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,49,17Networks_LH_DefaultC_PHC_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,59,17Networks_RH_SomMotA_3,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,97,17Networks_RH_DefaultC_PHC_1,0.42857142857142855 -hcp,binary_classification,md,region_group_lasso,summary_stats,14,17Networks_LH_DorsAttnA_TempOcc_1,0.4 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification.csv deleted file mode 100644 index 514229a8..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.14537444933920707,0.11500000000000002,0.07177033492822966,0.07327586206896552 -mean_std,0.14537444933920707,1.0,0.3031203566121842,0.10681586978636826,0.2012578616352201 -percentiles,0.11499999999999999,0.3031203566121843,1.0,0.02212389380530973,0.1909385113268608 -pca,0.07177033492822966,0.10681586978636827,0.022123893805309734,1.0,0.0 -flatten,0.07327586206896551,0.2012578616352201,0.19093851132686085,0.0,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_full_regions.csv deleted file mode 100644 index 1ca00052..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.4451364175563464,0.16859122401847576,0.15151515151515152,0.17012448132780084 -mean_std,0.4451364175563464,1.0,0.23786268313702955,0.13841717398269784,0.21434159061277705 -percentiles,0.16859122401847576,0.23786268313702955,1.0,0.055350553505535055,0.2207792207792208 -pca,0.15151515151515152,0.13841717398269784,0.055350553505535055,1.0,0.03458646616541354 -flatten,0.17012448132780084,0.21434159061277705,0.2207792207792208,0.03458646616541354,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks.csv deleted file mode 100644 index 4fa5c163..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.507603722482469,0.20576984355535244,0.3638004223230235,0.18497319940801107 -mean_std,0.507603722482469,1.0,0.24929808875108314,0.32900994407021794,0.213653726412306 -percentiles,0.20576984355535244,0.24929808875108314,1.0,0.16015914047250202,0.4524059752143163 -pca,0.3638004223230235,0.32900994407021794,0.16015914047250202,1.0,0.07486571197000774 -flatten,0.1849731994080111,0.213653726412306,0.45240597521431625,0.07486571197000774,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index 26e52bba..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.6691084456196252,0.3730727443382468,0.30703244206011887,0.3548796117204331 -mean_std,0.6691084456196252,1.0,0.41788545030270735,0.2155337119587551,0.384173626275574 -percentiles,0.3730727443382468,0.41788545030270735,1.0,0.25816713469554164,0.4829074753005456 -pca,0.30703244206011887,0.2155337119587551,0.25816713469554164,1.0,0.18978953289106523 -flatten,0.3548796117204331,0.384173626275574,0.4829074753005456,0.18978953289106523,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index b0efcf05..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -camcan,binary_classification,md,region_elasticnet,flatten,SomMotA,0.9664139941690962 -camcan,binary_classification,md,region_elasticnet,flatten,LimbicB,0.963265306122449 -camcan,binary_classification,md,region_elasticnet,flatten,VisCent,0.7671370262390671 -camcan,binary_classification,md,region_elasticnet,flatten,SomMotB,0.5649812578092461 -camcan,binary_classification,md,region_elasticnet,flatten,DorsAttnB,0.5083381924198251 -camcan,binary_classification,md,region_elasticnet,mean_std,VisCent,1.0 -camcan,binary_classification,md,region_elasticnet,mean_std,DefaultB,0.7463015269135802 -camcan,binary_classification,md,region_elasticnet,mean_std,SomMotB,0.6922538666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,SalVentAttnA,0.6803676711111111 -camcan,binary_classification,md,region_elasticnet,mean_std,ContB,0.6779999999999999 -camcan,binary_classification,md,region_elasticnet,pca,SalVentAttnA,0.4267492711370262 -camcan,binary_classification,md,region_elasticnet,pca,VisCent,0.3746355685131194 -camcan,binary_classification,md,region_elasticnet,pca,DefaultB,0.32252186588921283 -camcan,binary_classification,md,region_elasticnet,pca,ContA,0.27040816326530615 -camcan,binary_classification,md,region_elasticnet,pca,ContB,0.2142857142857143 -camcan,binary_classification,md,region_elasticnet,percentiles,VisCent,0.9599452609031951 -camcan,binary_classification,md,region_elasticnet,percentiles,LimbicB,0.7575510204081632 -camcan,binary_classification,md,region_elasticnet,percentiles,SomMotA,0.7216326530612245 -camcan,binary_classification,md,region_elasticnet,percentiles,ContC,0.5178542274052478 -camcan,binary_classification,md,region_elasticnet,percentiles,DefaultB,0.4844781341107872 -camcan,binary_classification,md,region_elasticnet,summary_stats,DefaultB,0.6201996891654513 -camcan,binary_classification,md,region_elasticnet,summary_stats,VisCent,0.5473179162559819 -camcan,binary_classification,md,region_elasticnet,summary_stats,SalVentAttnA,0.5400855610987889 -camcan,binary_classification,md,region_elasticnet,summary_stats,DefaultA,0.4492715663206417 -camcan,binary_classification,md,region_elasticnet,summary_stats,SomMotB,0.4477810345665427 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_top_regions.csv deleted file mode 100644 index a65ae33c..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_elasticnet_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -camcan,binary_classification,md,region_elasticnet,flatten,28,17Networks_LH_LimbicB_OFC_1,0.8571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,78,17Networks_RH_LimbicB_OFC_1,0.7428571428571429 -camcan,binary_classification,md,region_elasticnet,flatten,3,17Networks_LH_VisCent_Striate_1,0.6571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,8,17Networks_LH_SomMotA_1,0.6571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,9,17Networks_LH_SomMotA_2,0.6571428571428571 -camcan,binary_classification,md,region_elasticnet,flatten,60,17Networks_RH_SomMotA_4,0.6 -camcan,binary_classification,md,region_elasticnet,flatten,17,17Networks_LH_DorsAttnB_PostC_1,0.42857142857142855 -camcan,binary_classification,md,region_elasticnet,flatten,61,17Networks_RH_SomMotB_Aud_1,0.42857142857142855 -camcan,binary_classification,md,region_elasticnet,flatten,29,17Networks_LH_LimbicA_TempPole_1,0.3142857142857143 -camcan,binary_classification,md,region_elasticnet,flatten,59,17Networks_RH_SomMotA_3,0.2857142857142857 -camcan,binary_classification,md,region_elasticnet,mean_std,3,17Networks_LH_VisCent_Striate_1,1.0 -camcan,binary_classification,md,region_elasticnet,mean_std,28,17Networks_LH_LimbicB_OFC_1,0.36666666666666664 -camcan,binary_classification,md,region_elasticnet,mean_std,4,17Networks_LH_VisCent_ExStr_3,0.3 -camcan,binary_classification,md,region_elasticnet,mean_std,86,17Networks_RH_ContB_PFClv_1,0.3 -camcan,binary_classification,md,region_elasticnet,mean_std,2,17Networks_LH_VisCent_ExStr_2,0.26666666666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,24,17Networks_LH_SalVentAttnA_ParMed_1,0.26666666666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,59,17Networks_RH_SomMotA_3,0.26666666666666666 -camcan,binary_classification,md,region_elasticnet,mean_std,1,17Networks_LH_VisCent_ExStr_1,0.23333333333333334 -camcan,binary_classification,md,region_elasticnet,mean_std,9,17Networks_LH_SomMotA_2,0.23333333333333334 -camcan,binary_classification,md,region_elasticnet,mean_std,20,17Networks_LH_DorsAttnB_FEF_1,0.23333333333333334 -camcan,binary_classification,md,region_elasticnet,pca,22,17Networks_LH_SalVentAttnA_Ins_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,24,17Networks_LH_SalVentAttnA_ParMed_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,31,17Networks_LH_ContA_IPS_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,52,17Networks_RH_VisCent_ExStr_2,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,86,17Networks_RH_ContB_PFClv_1,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,95,17Networks_RH_DefaultB_PFCv_2,0.21428571428571427 -camcan,binary_classification,md,region_elasticnet,pca,13,17Networks_LH_SomMotB_Cent_1,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,pca,51,17Networks_RH_VisCent_ExStr_1,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,pca,1,17Networks_LH_VisCent_ExStr_1,0.07142857142857142 -camcan,binary_classification,md,region_elasticnet,pca,14,17Networks_LH_DorsAttnA_TempOcc_1,0.07142857142857142 -camcan,binary_classification,md,region_elasticnet,percentiles,3,17Networks_LH_VisCent_Striate_1,0.7428571428571429 -camcan,binary_classification,md,region_elasticnet,percentiles,28,17Networks_LH_LimbicB_OFC_1,0.7428571428571429 -camcan,binary_classification,md,region_elasticnet,percentiles,4,17Networks_LH_VisCent_ExStr_3,0.6857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,59,17Networks_RH_SomMotA_3,0.6857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,87,17Networks_RH_ContC_Cingp_1,0.45714285714285713 -camcan,binary_classification,md,region_elasticnet,percentiles,99,17Networks_RH_TempPar_2,0.42857142857142855 -camcan,binary_classification,md,region_elasticnet,percentiles,93,17Networks_RH_DefaultB_PFCd_1,0.34285714285714286 -camcan,binary_classification,md,region_elasticnet,percentiles,2,17Networks_LH_VisCent_ExStr_2,0.2857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,53,17Networks_RH_VisCent_ExStr_3,0.2857142857142857 -camcan,binary_classification,md,region_elasticnet,percentiles,13,17Networks_LH_SomMotB_Cent_1,0.22857142857142856 -camcan,binary_classification,md,region_elasticnet,summary_stats,3,17Networks_LH_VisCent_Striate_1,0.2 -camcan,binary_classification,md,region_elasticnet,summary_stats,43,17Networks_LH_DefaultB_IPL_1,0.2 -camcan,binary_classification,md,region_elasticnet,summary_stats,59,17Networks_RH_SomMotA_3,0.17142857142857143 -camcan,binary_classification,md,region_elasticnet,summary_stats,87,17Networks_RH_ContC_Cingp_1,0.17142857142857143 -camcan,binary_classification,md,region_elasticnet,summary_stats,86,17Networks_RH_ContB_PFClv_1,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,summary_stats,100,17Networks_RH_TempPar_3,0.14285714285714285 -camcan,binary_classification,md,region_elasticnet,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.11428571428571428 -camcan,binary_classification,md,region_elasticnet,summary_stats,14,17Networks_LH_DorsAttnA_TempOcc_1,0.11428571428571428 -camcan,binary_classification,md,region_elasticnet,summary_stats,21,17Networks_LH_SalVentAttnA_ParOper_1,0.11428571428571428 -camcan,binary_classification,md,region_elasticnet,summary_stats,78,17Networks_RH_LimbicB_OFC_1,0.11428571428571428 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification.csv deleted file mode 100644 index 571f2115..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.2097902097902098,0.2190237797246558,0.0703125,0.02112676056338028 -mean_std,0.20979020979020976,1.0,0.46428571428571425,0.08971704623878536,0.08232445520581115 -percentiles,0.2190237797246558,0.4642857142857142,1.0,0.01208865010073875,0.07929883138564274 -pca,0.0703125,0.08971704623878535,0.01208865010073875,1.0,0.03548795944233207 -flatten,0.02112676056338028,0.08232445520581115,0.07929883138564273,0.035487959442332066,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_full_regions.csv deleted file mode 100644 index b3457c35..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.3548514851485148,0.36284627919608897,0.33881493082746017,0.1469964664310954 -mean_std,0.3548514851485148,1.0,0.45110410094637216,0.35135942635195705,0.1604790419161677 -percentiles,0.36284627919608897,0.45110410094637216,1.0,0.24892857142857144,0.1336053034166242 -pca,0.33881493082746017,0.35135942635195705,0.24892857142857144,1.0,0.11385767790262175 -flatten,0.1469964664310954,0.1604790419161677,0.1336053034166242,0.11385767790262175,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks.csv deleted file mode 100644 index 0fa2914a..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.33783018431700934,0.3288008096019697,0.37178840825653675,0.1600049535910837 -mean_std,0.3378301843170093,1.0,0.4031497505331355,0.24721980073217356,0.32025891714052884 -percentiles,0.3288008096019697,0.4031497505331355,1.0,0.3206353709809888,0.3084450256847549 -pca,0.37178840825653686,0.2472198007321736,0.3206353709809888,1.0,0.10658081370861511 -flatten,0.1600049535910837,0.3202589171405288,0.3084450256847549,0.10658081370861512,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index 157db0cf..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.5771415904309859,0.6758916404528011,0.6385088214634351,0.36411841337203243 -mean_std,0.5771415904309859,1.0,0.6583818836202799,0.6725997766769772,0.39370343612307107 -percentiles,0.6758916404528011,0.6583818836202799,1.0,0.560004235369665,0.4428828596721211 -pca,0.6385088214634351,0.6725997766769772,0.560004235369665,1.0,0.3142724491205095 -flatten,0.36411841337203243,0.39370343612307107,0.4428828596721211,0.3142724491205095,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index 4b9a3fd0..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -camcan,binary_classification,md,region_group_lasso,flatten,SomMotA,0.9520123456790124 -camcan,binary_classification,md,region_group_lasso,flatten,LimbicB,0.8411111111111111 -camcan,binary_classification,md,region_group_lasso,flatten,DefaultB,0.804 -camcan,binary_classification,md,region_group_lasso,flatten,LimbicA,0.7822222222222222 -camcan,binary_classification,md,region_group_lasso,flatten,SomMotB,0.6928148148148148 -camcan,binary_classification,md,region_group_lasso,mean_std,VisCent,1.0 -camcan,binary_classification,md,region_group_lasso,mean_std,ContB,0.6586024960000001 -camcan,binary_classification,md,region_group_lasso,mean_std,DefaultB,0.6446756627808257 -camcan,binary_classification,md,region_group_lasso,mean_std,LimbicB,0.5968 -camcan,binary_classification,md,region_group_lasso,mean_std,SomMotB,0.59385228673024 -camcan,binary_classification,md,region_group_lasso,pca,SalVentAttnA,0.8473144493935545 -camcan,binary_classification,md,region_group_lasso,pca,VisCent,0.7296573870965921 -camcan,binary_classification,md,region_group_lasso,pca,DefaultB,0.7234943497577342 -camcan,binary_classification,md,region_group_lasso,pca,ContA,0.610215125743027 -camcan,binary_classification,md,region_group_lasso,pca,ContC,0.528875720164609 -camcan,binary_classification,md,region_group_lasso,percentiles,VisCent,0.8687249956864 -camcan,binary_classification,md,region_group_lasso,percentiles,LimbicB,0.6928000000000001 -camcan,binary_classification,md,region_group_lasso,percentiles,SomMotA,0.576006197248 -camcan,binary_classification,md,region_group_lasso,percentiles,ContC,0.4351845376 -camcan,binary_classification,md,region_group_lasso,percentiles,DefaultB,0.3894158603480833 -camcan,binary_classification,md,region_group_lasso,summary_stats,VisCent,0.5535938125000002 -camcan,binary_classification,md,region_group_lasso,summary_stats,DefaultB,0.5159981933593749 -camcan,binary_classification,md,region_group_lasso,summary_stats,SalVentAttnA,0.49557822991943357 -camcan,binary_classification,md,region_group_lasso,summary_stats,ContB,0.4024500000000001 -camcan,binary_classification,md,region_group_lasso,summary_stats,SomMotA,0.36783437500000005 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_top_regions.csv deleted file mode 100644 index 702cdcbf..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_camcan_region_group_lasso_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -camcan,binary_classification,md,region_group_lasso,flatten,9,17Networks_LH_SomMotA_2,0.6666666666666666 -camcan,binary_classification,md,region_group_lasso,flatten,28,17Networks_LH_LimbicB_OFC_1,0.6333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,8,17Networks_LH_SomMotA_1,0.5666666666666667 -camcan,binary_classification,md,region_group_lasso,flatten,60,17Networks_RH_SomMotA_4,0.5666666666666667 -camcan,binary_classification,md,region_group_lasso,flatten,78,17Networks_RH_LimbicB_OFC_1,0.5666666666666667 -camcan,binary_classification,md,region_group_lasso,flatten,29,17Networks_LH_LimbicA_TempPole_1,0.5333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,44,17Networks_LH_DefaultB_PFCd_1,0.5333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,79,17Networks_RH_LimbicA_TempPole_1,0.5333333333333333 -camcan,binary_classification,md,region_group_lasso,flatten,61,17Networks_RH_SomMotB_Aud_1,0.5 -camcan,binary_classification,md,region_group_lasso,flatten,93,17Networks_RH_DefaultB_PFCd_1,0.4 -camcan,binary_classification,md,region_group_lasso,mean_std,3,17Networks_LH_VisCent_Striate_1,1.0 -camcan,binary_classification,md,region_group_lasso,mean_std,28,17Networks_LH_LimbicB_OFC_1,0.52 -camcan,binary_classification,md,region_group_lasso,mean_std,86,17Networks_RH_ContB_PFClv_1,0.4 -camcan,binary_classification,md,region_group_lasso,mean_std,4,17Networks_LH_VisCent_ExStr_3,0.36 -camcan,binary_classification,md,region_group_lasso,mean_std,59,17Networks_RH_SomMotA_3,0.28 -camcan,binary_classification,md,region_group_lasso,mean_std,1,17Networks_LH_VisCent_ExStr_1,0.2 -camcan,binary_classification,md,region_group_lasso,mean_std,37,17Networks_LH_ContC_Cingp_1,0.2 -camcan,binary_classification,md,region_group_lasso,mean_std,2,17Networks_LH_VisCent_ExStr_2,0.16 -camcan,binary_classification,md,region_group_lasso,mean_std,9,17Networks_LH_SomMotA_2,0.16 -camcan,binary_classification,md,region_group_lasso,mean_std,10,17Networks_LH_SomMotB_Aud_1,0.16 -camcan,binary_classification,md,region_group_lasso,pca,22,17Networks_LH_SalVentAttnA_Ins_1,0.4 -camcan,binary_classification,md,region_group_lasso,pca,24,17Networks_LH_SalVentAttnA_ParMed_1,0.4 -camcan,binary_classification,md,region_group_lasso,pca,31,17Networks_LH_ContA_IPS_1,0.4 -camcan,binary_classification,md,region_group_lasso,pca,1,17Networks_LH_VisCent_ExStr_1,0.37777777777777777 -camcan,binary_classification,md,region_group_lasso,pca,86,17Networks_RH_ContB_PFClv_1,0.37777777777777777 -camcan,binary_classification,md,region_group_lasso,pca,14,17Networks_LH_DorsAttnA_TempOcc_1,0.35555555555555557 -camcan,binary_classification,md,region_group_lasso,pca,52,17Networks_RH_VisCent_ExStr_2,0.35555555555555557 -camcan,binary_classification,md,region_group_lasso,pca,93,17Networks_RH_DefaultB_PFCd_1,0.3111111111111111 -camcan,binary_classification,md,region_group_lasso,pca,95,17Networks_RH_DefaultB_PFCv_2,0.3111111111111111 -camcan,binary_classification,md,region_group_lasso,pca,35,17Networks_LH_ContC_pCun_1,0.28888888888888886 -camcan,binary_classification,md,region_group_lasso,percentiles,3,17Networks_LH_VisCent_Striate_1,0.68 -camcan,binary_classification,md,region_group_lasso,percentiles,28,17Networks_LH_LimbicB_OFC_1,0.68 -camcan,binary_classification,md,region_group_lasso,percentiles,59,17Networks_RH_SomMotA_3,0.48 -camcan,binary_classification,md,region_group_lasso,percentiles,4,17Networks_LH_VisCent_ExStr_3,0.4 -camcan,binary_classification,md,region_group_lasso,percentiles,87,17Networks_RH_ContC_Cingp_1,0.24 -camcan,binary_classification,md,region_group_lasso,percentiles,37,17Networks_LH_ContC_Cingp_1,0.16 -camcan,binary_classification,md,region_group_lasso,percentiles,53,17Networks_RH_VisCent_ExStr_3,0.16 -camcan,binary_classification,md,region_group_lasso,percentiles,99,17Networks_RH_TempPar_2,0.16 -camcan,binary_classification,md,region_group_lasso,percentiles,2,17Networks_LH_VisCent_ExStr_2,0.08 -camcan,binary_classification,md,region_group_lasso,percentiles,14,17Networks_LH_DorsAttnA_TempOcc_1,0.08 -camcan,binary_classification,md,region_group_lasso,summary_stats,3,17Networks_LH_VisCent_Striate_1,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,43,17Networks_LH_DefaultB_IPL_1,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,59,17Networks_RH_SomMotA_3,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,86,17Networks_RH_ContB_PFClv_1,0.2 -camcan,binary_classification,md,region_group_lasso,summary_stats,87,17Networks_RH_ContC_Cingp_1,0.175 -camcan,binary_classification,md,region_group_lasso,summary_stats,100,17Networks_RH_TempPar_3,0.175 -camcan,binary_classification,md,region_group_lasso,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.15 -camcan,binary_classification,md,region_group_lasso,summary_stats,28,17Networks_LH_LimbicB_OFC_1,0.15 -camcan,binary_classification,md,region_group_lasso,summary_stats,34,17Networks_LH_ContB_PFClv_1,0.15 -camcan,binary_classification,md,region_group_lasso,summary_stats,35,17Networks_LH_ContC_pCun_1,0.15 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification.csv deleted file mode 100644 index 408c4308..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.2337472607742878,0.20821114369501467,0.19707828004410147,0.09808148307824963 -mean_std,0.23374726077428784,1.0,0.5717344753747323,0.20562335856635253,0.20411233701103312 -percentiles,0.20821114369501464,0.5717344753747323,1.0,0.29852135249715644,0.17585848074921956 -pca,0.19707828004410147,0.20562335856635253,0.29852135249715644,1.0,0.07557149260421335 -flatten,0.09808148307824963,0.2041123370110331,0.17585848074921956,0.07557149260421335,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_full_regions.csv deleted file mode 100644 index 76be106b..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.22091283202394318,0.3669724770642202,0.2841132147153803,0.251688518077076 -mean_std,0.22091283202394318,1.0,0.47104018912529555,0.18822610563311531,0.18280265071925003 -percentiles,0.3669724770642202,0.47104018912529555,1.0,0.31173328637670955,0.27379447354162906 -pca,0.2841132147153803,0.18822610563311531,0.31173328637670955,1.0,0.17285597045547804 -flatten,0.251688518077076,0.18280265071925003,0.27379447354162906,0.17285597045547804,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks.csv deleted file mode 100644 index 1996a861..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.36741243800390205,0.3376892654419986,0.35463713817383485,0.08915581560056395 -mean_std,0.36741243800390205,1.0,0.8989637590016749,0.38256219970563166,0.25198466877365394 -percentiles,0.3376892654419986,0.8989637590016749,1.0,0.43196142906212587,0.2407538090273365 -pca,0.35463713817383485,0.3825621997056316,0.4319614290621258,1.0,0.09560318440015363 -flatten,0.08915581560056395,0.25198466877365394,0.2407538090273365,0.09560318440015363,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index 5f31d4e7..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.37744121403728387,0.6483365730962265,0.6257187839697607,0.5184858107110973 -mean_std,0.37744121403728387,1.0,0.5224202129435845,0.3003393881967093,0.30450586688883924 -percentiles,0.6483365730962265,0.5224202129435845,1.0,0.5744616182938325,0.545568479121997 -pca,0.6257187839697607,0.3003393881967093,0.5744616182938325,1.0,0.4512675551686466 -flatten,0.5184858107110973,0.30450586688883924,0.545568479121997,0.4512675551686466,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index 3f56242e..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -hcp,binary_classification,md,region_elasticnet,flatten,DefaultC,0.9779355468750001 -hcp,binary_classification,md,region_elasticnet,flatten,VisPeri,0.8225541015625 -hcp,binary_classification,md,region_elasticnet,flatten,LimbicB,0.8125 -hcp,binary_classification,md,region_elasticnet,flatten,SomMotA,0.7578691284179687 -hcp,binary_classification,md,region_elasticnet,flatten,DorsAttnB,0.7052326965332032 -hcp,binary_classification,md,region_elasticnet,mean_std,DefaultC,0.9811840000000001 -hcp,binary_classification,md,region_elasticnet,mean_std,DefaultB,0.958638592 -hcp,binary_classification,md,region_elasticnet,mean_std,ContB,0.90976 -hcp,binary_classification,md,region_elasticnet,mean_std,DefaultA,0.80448 -hcp,binary_classification,md,region_elasticnet,mean_std,SomMotA,0.72352 -hcp,binary_classification,md,region_elasticnet,pca,DefaultB,0.9987331088232355 -hcp,binary_classification,md,region_elasticnet,pca,SomMotA,0.9911984402456365 -hcp,binary_classification,md,region_elasticnet,pca,SalVentAttnA,0.9267468069120962 -hcp,binary_classification,md,region_elasticnet,pca,DefaultA,0.8816679188580016 -hcp,binary_classification,md,region_elasticnet,pca,ContC,0.8106686701728024 -hcp,binary_classification,md,region_elasticnet,percentiles,DefaultC,0.9992296543107039 -hcp,binary_classification,md,region_elasticnet,percentiles,DefaultB,0.9974620079651859 -hcp,binary_classification,md,region_elasticnet,percentiles,ContB,0.9835366121258999 -hcp,binary_classification,md,region_elasticnet,percentiles,SomMotA,0.9801584104582275 -hcp,binary_classification,md,region_elasticnet,percentiles,DefaultA,0.909200713036235 -hcp,binary_classification,md,region_elasticnet,summary_stats,DefaultB,0.8073766795879112 -hcp,binary_classification,md,region_elasticnet,summary_stats,DefaultA,0.6453642661913221 -hcp,binary_classification,md,region_elasticnet,summary_stats,SalVentAttnA,0.6088704185297618 -hcp,binary_classification,md,region_elasticnet,summary_stats,SomMotB,0.6032847992889816 -hcp,binary_classification,md,region_elasticnet,summary_stats,DefaultC,0.6009982507288629 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_top_regions.csv deleted file mode 100644 index 70982c4b..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_elasticnet_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -hcp,binary_classification,md,region_elasticnet,flatten,49,17Networks_LH_DefaultC_PHC_1,0.8625 -hcp,binary_classification,md,region_elasticnet,flatten,97,17Networks_RH_DefaultC_PHC_1,0.8375 -hcp,binary_classification,md,region_elasticnet,flatten,78,17Networks_RH_LimbicB_OFC_1,0.625 -hcp,binary_classification,md,region_elasticnet,flatten,6,17Networks_LH_VisPeri_StriCal_1,0.6 -hcp,binary_classification,md,region_elasticnet,flatten,58,17Networks_RH_SomMotA_2,0.5125 -hcp,binary_classification,md,region_elasticnet,flatten,28,17Networks_LH_LimbicB_OFC_1,0.5 -hcp,binary_classification,md,region_elasticnet,flatten,79,17Networks_RH_LimbicA_TempPole_1,0.4875 -hcp,binary_classification,md,region_elasticnet,flatten,87,17Networks_RH_ContC_Cingp_1,0.45 -hcp,binary_classification,md,region_elasticnet,flatten,55,17Networks_RH_VisPeri_ExStrInf_1,0.4375 -hcp,binary_classification,md,region_elasticnet,flatten,40,17Networks_LH_DefaultA_PFCm_1,0.4125 -hcp,binary_classification,md,region_elasticnet,mean_std,49,17Networks_LH_DefaultC_PHC_1,0.92 -hcp,binary_classification,md,region_elasticnet,mean_std,34,17Networks_LH_ContB_PFClv_1,0.9 -hcp,binary_classification,md,region_elasticnet,mean_std,97,17Networks_RH_DefaultC_PHC_1,0.76 -hcp,binary_classification,md,region_elasticnet,mean_std,40,17Networks_LH_DefaultA_PFCm_1,0.74 -hcp,binary_classification,md,region_elasticnet,mean_std,59,17Networks_RH_SomMotA_3,0.68 -hcp,binary_classification,md,region_elasticnet,mean_std,94,17Networks_RH_DefaultB_PFCv_1,0.68 -hcp,binary_classification,md,region_elasticnet,mean_std,47,17Networks_LH_DefaultB_PFCv_2,0.66 -hcp,binary_classification,md,region_elasticnet,mean_std,45,17Networks_LH_DefaultB_PFCl_1,0.4 -hcp,binary_classification,md,region_elasticnet,mean_std,43,17Networks_LH_DefaultB_IPL_1,0.34 -hcp,binary_classification,md,region_elasticnet,mean_std,38,17Networks_LH_DefaultA_PFCd_1,0.2 -hcp,binary_classification,md,region_elasticnet,pca,40,17Networks_LH_DefaultA_PFCm_1,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,47,17Networks_LH_DefaultB_PFCv_2,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,59,17Networks_RH_SomMotA_3,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,60,17Networks_RH_SomMotA_4,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,72,17Networks_RH_SalVentAttnA_Ins_1,0.8636363636363636 -hcp,binary_classification,md,region_elasticnet,pca,43,17Networks_LH_DefaultB_IPL_1,0.8181818181818182 -hcp,binary_classification,md,region_elasticnet,pca,93,17Networks_RH_DefaultB_PFCd_1,0.7727272727272727 -hcp,binary_classification,md,region_elasticnet,pca,35,17Networks_LH_ContC_pCun_1,0.7272727272727273 -hcp,binary_classification,md,region_elasticnet,pca,100,17Networks_RH_TempPar_3,0.7272727272727273 -hcp,binary_classification,md,region_elasticnet,pca,78,17Networks_RH_LimbicB_OFC_1,0.5454545454545454 -hcp,binary_classification,md,region_elasticnet,percentiles,34,17Networks_LH_ContB_PFClv_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,49,17Networks_LH_DefaultC_PHC_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,59,17Networks_RH_SomMotA_3,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,94,17Networks_RH_DefaultB_PFCv_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,97,17Networks_RH_DefaultC_PHC_1,0.9714285714285714 -hcp,binary_classification,md,region_elasticnet,percentiles,40,17Networks_LH_DefaultA_PFCm_1,0.8 -hcp,binary_classification,md,region_elasticnet,percentiles,47,17Networks_LH_DefaultB_PFCv_2,0.8 -hcp,binary_classification,md,region_elasticnet,percentiles,35,17Networks_LH_ContC_pCun_1,0.6857142857142857 -hcp,binary_classification,md,region_elasticnet,percentiles,68,17Networks_RH_DorsAttnB_PostC_1,0.6571428571428571 -hcp,binary_classification,md,region_elasticnet,percentiles,72,17Networks_RH_SalVentAttnA_Ins_1,0.6 -hcp,binary_classification,md,region_elasticnet,summary_stats,35,17Networks_LH_ContC_pCun_1,0.42857142857142855 -hcp,binary_classification,md,region_elasticnet,summary_stats,40,17Networks_LH_DefaultA_PFCm_1,0.42857142857142855 -hcp,binary_classification,md,region_elasticnet,summary_stats,47,17Networks_LH_DefaultB_PFCv_2,0.4 -hcp,binary_classification,md,region_elasticnet,summary_stats,49,17Networks_LH_DefaultC_PHC_1,0.4 -hcp,binary_classification,md,region_elasticnet,summary_stats,59,17Networks_RH_SomMotA_3,0.37142857142857144 -hcp,binary_classification,md,region_elasticnet,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.3142857142857143 -hcp,binary_classification,md,region_elasticnet,summary_stats,16,17Networks_LH_DorsAttnA_SPL_1,0.2857142857142857 -hcp,binary_classification,md,region_elasticnet,summary_stats,10,17Networks_LH_SomMotB_Aud_1,0.2571428571428571 -hcp,binary_classification,md,region_elasticnet,summary_stats,50,17Networks_LH_TempPar_1,0.2571428571428571 -hcp,binary_classification,md,region_elasticnet,summary_stats,43,17Networks_LH_DefaultB_IPL_1,0.22857142857142856 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification.csv deleted file mode 100644 index 29e7efc9..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.22260488415779586,0.2703252032520326,0.17486338797814208,0.07828282828282827 -mean_std,0.22260488415779583,1.0,0.6738922537456169,0.22743055555555558,0.09183673469387754 -percentiles,0.27032520325203246,0.6738922537456169,1.0,0.18891170431211504,0.11359867330016585 -pca,0.17486338797814208,0.22743055555555558,0.18891170431211504,1.0,0.2501918649270913 -flatten,0.07828282828282829,0.09183673469387754,0.11359867330016583,0.2501918649270914,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_full_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_full_regions.csv deleted file mode 100644 index 4fc6dbcd..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_full_regions.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.26259946949602125,0.38533627342888643,0.2562628336755647,0.21345407503234157 -mean_std,0.26259946949602125,1.0,0.5347474747474747,0.23411764705882354,0.14483714483714483 -percentiles,0.38533627342888643,0.5347474747474747,1.0,0.2665046577561766,0.18287037037037038 -pca,0.2562628336755647,0.23411764705882354,0.2665046577561766,1.0,0.285646836638338 -flatten,0.21345407503234157,0.14483714483714483,0.18287037037037038,0.285646836638338,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks.csv deleted file mode 100644 index 80323ef7..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.24203802152416362,0.2358478624986414,0.41590322661113743,0.230280062614838 -mean_std,0.24203802152416362,1.0,0.9644529320125995,0.42126676706580674,0.23150058838754597 -percentiles,0.2358478624986414,0.9644529320125995,1.0,0.41997025715831426,0.2314432684240553 -pca,0.41590322661113743,0.42126676706580674,0.41997025715831415,1.0,0.4105106930536257 -flatten,0.23028006261483802,0.23150058838754597,0.2314432684240553,0.41051069305362564,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks_full_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks_full_networks.csv deleted file mode 100644 index 4e742f05..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks_full_networks.csv +++ /dev/null @@ -1,6 +0,0 @@ -,summary_stats,mean_std,percentiles,pca,flatten -summary_stats,1.0,0.4270985762652948,0.6541837731089499,0.6084094011990865,0.4827103891745554 -mean_std,0.4270985762652948,1.0,0.6532431282756102,0.37727538482074024,0.3904127545144029 -percentiles,0.6541837731089499,0.6532431282756102,1.0,0.5666929455731092,0.48795536753037894 -pca,0.6084094011990865,0.37727538482074024,0.5666929455731092,1.0,0.4925618764169172 -flatten,0.4827103891745554,0.3904127545144029,0.48795536753037894,0.4925618764169172,1.0 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks_top_networks.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks_top_networks.csv deleted file mode 100644 index 78f13a31..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_networks_top_networks.csv +++ /dev/null @@ -1,26 +0,0 @@ -dataset,task,microstructure,model,region_representation,network_name,selection_proportion -hcp,binary_classification,md,region_group_lasso,flatten,SomMotA,0.9895643481882549 -hcp,binary_classification,md,region_group_lasso,flatten,LimbicA,0.9836734693877551 -hcp,binary_classification,md,region_group_lasso,flatten,LimbicB,0.9804081632653061 -hcp,binary_classification,md,region_group_lasso,flatten,SalVentAttnA,0.8960932944606413 -hcp,binary_classification,md,region_group_lasso,flatten,DefaultA,0.8096793002915452 -hcp,binary_classification,md,region_group_lasso,mean_std,ContB,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,DefaultC,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,DefaultB,0.999415266733278 -hcp,binary_classification,md,region_group_lasso,mean_std,SomMotA,0.9811150739216583 -hcp,binary_classification,md,region_group_lasso,mean_std,DefaultA,0.8864386445155719 -hcp,binary_classification,md,region_group_lasso,pca,DefaultB,0.9984513580246913 -hcp,binary_classification,md,region_group_lasso,pca,SomMotA,0.9883851851851851 -hcp,binary_classification,md,region_group_lasso,pca,SalVentAttnA,0.935288888888889 -hcp,binary_classification,md,region_group_lasso,pca,TempPar,0.8497777777777777 -hcp,binary_classification,md,region_group_lasso,pca,DefaultA,0.8257777777777778 -hcp,binary_classification,md,region_group_lasso,percentiles,DefaultC,0.9994359375 -hcp,binary_classification,md,region_group_lasso,percentiles,DefaultB,0.990295170171814 -hcp,binary_classification,md,region_group_lasso,percentiles,SomMotA,0.981673609375 -hcp,binary_classification,md,region_group_lasso,percentiles,ContB,0.94720375 -hcp,binary_classification,md,region_group_lasso,percentiles,DefaultA,0.7764512573242188 -hcp,binary_classification,md,region_group_lasso,summary_stats,DefaultB,0.8956097091043941 -hcp,binary_classification,md,region_group_lasso,summary_stats,DefaultA,0.845285035996906 -hcp,binary_classification,md,region_group_lasso,summary_stats,SalVentAttnA,0.8236256309071751 -hcp,binary_classification,md,region_group_lasso,summary_stats,DorsAttnA,0.7838092794668887 -hcp,binary_classification,md,region_group_lasso,summary_stats,SomMotB,0.7182459787955213 diff --git a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_top_regions.csv b/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_top_regions.csv deleted file mode 100644 index 151db37d..00000000 --- a/scripts/interpretability/focus/outputs/csv/jaccard_hcp_region_group_lasso_md_binary_classification_top_regions.csv +++ /dev/null @@ -1,51 +0,0 @@ -dataset,task,microstructure,model,region_representation,region_id,region_name,selection_proportion -hcp,binary_classification,md,region_group_lasso,flatten,79,17Networks_RH_LimbicA_TempPole_1,0.9428571428571428 -hcp,binary_classification,md,region_group_lasso,flatten,28,17Networks_LH_LimbicB_OFC_1,0.8857142857142857 -hcp,binary_classification,md,region_group_lasso,flatten,9,17Networks_LH_SomMotA_2,0.8571428571428571 -hcp,binary_classification,md,region_group_lasso,flatten,72,17Networks_RH_SalVentAttnA_Ins_1,0.8571428571428571 -hcp,binary_classification,md,region_group_lasso,flatten,60,17Networks_RH_SomMotA_4,0.8285714285714286 -hcp,binary_classification,md,region_group_lasso,flatten,78,17Networks_RH_LimbicB_OFC_1,0.8285714285714286 -hcp,binary_classification,md,region_group_lasso,flatten,40,17Networks_LH_DefaultA_PFCm_1,0.7714285714285715 -hcp,binary_classification,md,region_group_lasso,flatten,29,17Networks_LH_LimbicA_TempPole_1,0.7142857142857143 -hcp,binary_classification,md,region_group_lasso,flatten,97,17Networks_RH_DefaultC_PHC_1,0.5428571428571428 -hcp,binary_classification,md,region_group_lasso,flatten,8,17Networks_LH_SomMotA_1,0.4857142857142857 -hcp,binary_classification,md,region_group_lasso,mean_std,34,17Networks_LH_ContB_PFClv_1,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,49,17Networks_LH_DefaultC_PHC_1,1.0 -hcp,binary_classification,md,region_group_lasso,mean_std,59,17Networks_RH_SomMotA_3,0.9777777777777777 -hcp,binary_classification,md,region_group_lasso,mean_std,47,17Networks_LH_DefaultB_PFCv_2,0.9555555555555556 -hcp,binary_classification,md,region_group_lasso,mean_std,94,17Networks_RH_DefaultB_PFCv_1,0.9333333333333333 -hcp,binary_classification,md,region_group_lasso,mean_std,97,17Networks_RH_DefaultC_PHC_1,0.9333333333333333 -hcp,binary_classification,md,region_group_lasso,mean_std,40,17Networks_LH_DefaultA_PFCm_1,0.8666666666666667 -hcp,binary_classification,md,region_group_lasso,mean_std,45,17Networks_LH_DefaultB_PFCl_1,0.5777777777777777 -hcp,binary_classification,md,region_group_lasso,mean_std,43,17Networks_LH_DefaultB_IPL_1,0.5111111111111111 -hcp,binary_classification,md,region_group_lasso,mean_std,68,17Networks_RH_DorsAttnB_PostC_1,0.15555555555555556 -hcp,binary_classification,md,region_group_lasso,pca,40,17Networks_LH_DefaultA_PFCm_1,0.8 -hcp,binary_classification,md,region_group_lasso,pca,47,17Networks_LH_DefaultB_PFCv_2,0.8 -hcp,binary_classification,md,region_group_lasso,pca,59,17Networks_RH_SomMotA_3,0.8 -hcp,binary_classification,md,region_group_lasso,pca,60,17Networks_RH_SomMotA_4,0.8 -hcp,binary_classification,md,region_group_lasso,pca,72,17Networks_RH_SalVentAttnA_Ins_1,0.8 -hcp,binary_classification,md,region_group_lasso,pca,93,17Networks_RH_DefaultB_PFCd_1,0.8 -hcp,binary_classification,md,region_group_lasso,pca,100,17Networks_RH_TempPar_3,0.8 -hcp,binary_classification,md,region_group_lasso,pca,35,17Networks_LH_ContC_pCun_1,0.7333333333333333 -hcp,binary_classification,md,region_group_lasso,pca,43,17Networks_LH_DefaultB_IPL_1,0.7333333333333333 -hcp,binary_classification,md,region_group_lasso,pca,78,17Networks_RH_LimbicB_OFC_1,0.7333333333333333 -hcp,binary_classification,md,region_group_lasso,percentiles,49,17Networks_LH_DefaultC_PHC_1,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,59,17Networks_RH_SomMotA_3,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,94,17Networks_RH_DefaultB_PFCv_1,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,97,17Networks_RH_DefaultC_PHC_1,0.975 -hcp,binary_classification,md,region_group_lasso,percentiles,34,17Networks_LH_ContB_PFClv_1,0.925 -hcp,binary_classification,md,region_group_lasso,percentiles,40,17Networks_LH_DefaultA_PFCm_1,0.65 -hcp,binary_classification,md,region_group_lasso,percentiles,68,17Networks_RH_DorsAttnB_PostC_1,0.35 -hcp,binary_classification,md,region_group_lasso,percentiles,47,17Networks_LH_DefaultB_PFCv_2,0.325 -hcp,binary_classification,md,region_group_lasso,percentiles,72,17Networks_RH_SalVentAttnA_Ins_1,0.275 -hcp,binary_classification,md,region_group_lasso,percentiles,35,17Networks_LH_ContC_pCun_1,0.25 -hcp,binary_classification,md,region_group_lasso,summary_stats,4,17Networks_LH_VisCent_ExStr_3,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,10,17Networks_LH_SomMotB_Aud_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,16,17Networks_LH_DorsAttnA_SPL_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,35,17Networks_LH_ContC_pCun_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,40,17Networks_LH_DefaultA_PFCm_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,47,17Networks_LH_DefaultB_PFCv_2,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,49,17Networks_LH_DefaultC_PHC_1,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,59,17Networks_RH_SomMotA_3,0.45714285714285713 -hcp,binary_classification,md,region_group_lasso,summary_stats,97,17Networks_RH_DefaultC_PHC_1,0.42857142857142855 -hcp,binary_classification,md,region_group_lasso,summary_stats,14,17Networks_LH_DorsAttnA_TempOcc_1,0.4 diff --git a/scripts/interpretability/focus/outputs/csv/top10_networks_region_elasticnet_heatmap.csv b/scripts/interpretability/focus/outputs/csv/top10_networks_region_elasticnet_heatmap.csv deleted file mode 100644 index f3807c4a..00000000 --- a/scripts/interpretability/focus/outputs/csv/top10_networks_region_elasticnet_heatmap.csv +++ /dev/null @@ -1,11 +0,0 @@ -network_name,summary_stats,mean_std,percentiles,pca,flatten -SomMotA,0.523028112980136,0.94624,0.9760104919548828,0.9870910456936002,0.7040479858398437 -DefaultB,0.7194360229171914,0.9997247488,0.9897064219155595,0.975868739490201,0.10878125000000005 -DefaultA,0.6130998603798467,0.950368,0.6407988100196346,0.8422238918106687,0.42578125 -DefaultC,0.45566014160766355,0.990592,0.9992296543107039,0.0,0.9675976562499999 -SalVentAttnA,0.5957029252115311,0.1705279999999999,0.4881988702962017,0.8037190082644627,0.5045465835952758 -ContB,0.4010248872493606,0.9293440000000001,0.9790465972511454,0.0,0.13593749999999993 -DorsAttnB,0.499305701668037,0.43600000000000005,0.39974304545117856,0.13636363636363635,0.6797411651611327 -ContC,0.48528874873564587,0.23560000000000003,0.39758967097042897,0.5289256198347108,0.4249625488281249 -VisPeri,0.3794236738773811,0.0,0.10948038317367759,0.5284389727477632,0.7973766430664062 -DorsAttnA,0.4545048080306675,0.040000000000000036,0.15964026363165007,0.3890250603845987,0.4260156249999999 diff --git a/scripts/interpretability/focus/outputs/csv/top10_networks_region_group_lasso_heatmap.csv b/scripts/interpretability/focus/outputs/csv/top10_networks_region_group_lasso_heatmap.csv deleted file mode 100644 index 583b38fe..00000000 --- a/scripts/interpretability/focus/outputs/csv/top10_networks_region_group_lasso_heatmap.csv +++ /dev/null @@ -1,11 +0,0 @@ -network_name,summary_stats,mean_std,percentiles,pca,flatten -SomMotA,0.6837746666779998,1.0,0.9434936289062501,0.9706666666666667,0.9604164931278634 -DefaultB,0.8295381214795098,0.999787369721192,0.9869152434436035,0.9884958024691358,0.5756935943356934 -DefaultA,0.7096557849195488,0.9473740059950211,0.5787849179687501,0.8133333333333334,0.686530612244898 -DefaultC,0.7557551020408163,1.0,0.9994359375,0.0,0.47918367346938784 -SalVentAttnA,0.5962761459320036,0.203818065383907,0.45957741485583503,0.8631111111111112,0.8437551020408164 -ContB,0.3489478431605878,1.0,0.9406042187500001,0.06666666666666665,0.0 -ContC,0.6510431129886356,0.2139149519890261,0.2669443750000001,0.6888888888888889,0.0 -LimbicB,0.13795918367346938,0.022222222222222254,0.09750000000000003,0.4666666666666667,0.9836734693877551 -DorsAttnA,0.6677699720354615,0.08596957780826098,0.18442167871093773,0.24503703703703705,0.45338775510204077 -SomMotB,0.538978101274129,0.0651961591220851,0.30268053529785177,0.1869629629629629,0.48613411078717206 diff --git a/scripts/interpretability/focus/outputs/csv/top10_regions_region_elasticnet_heatmap.csv b/scripts/interpretability/focus/outputs/csv/top10_regions_region_elasticnet_heatmap.csv deleted file mode 100644 index 75e875cd..00000000 --- a/scripts/interpretability/focus/outputs/csv/top10_regions_region_elasticnet_heatmap.csv +++ /dev/null @@ -1,11 +0,0 @@ -region_name,summary_stats,mean_std,percentiles,pca,flatten -17Networks_LH_DefaultC_PHC_1,0.2857142857142857,0.92,0.9714285714285714,0.0,0.825 -17Networks_RH_SomMotA_3,0.22857142857142856,0.92,0.9714285714285714,0.8636363636363636,0.0125 -17Networks_LH_DefaultA_PFCm_1,0.3142857142857143,0.92,0.5428571428571428,0.8181818181818182,0.3875 -17Networks_RH_DefaultC_PHC_1,0.11428571428571428,0.88,0.9714285714285714,0.0,0.8125 -17Networks_LH_DefaultB_PFCv_2,0.2857142857142857,0.92,0.4857142857142857,0.8181818181818182,0.05 -17Networks_RH_DefaultB_PFCv_1,0.11428571428571428,0.92,0.9714285714285714,0.18181818181818182,0.05 -17Networks_LH_ContB_PFClv_1,0.11428571428571428,0.92,0.9714285714285714,0.0,0.125 -17Networks_RH_SalVentAttnA_Ins_1,0.11428571428571428,0.08,0.3142857142857143,0.7727272727272727,0.325 -17Networks_RH_SomMotA_4,0.11428571428571428,0.3,0.02857142857142857,0.8636363636363636,0.1875 -17Networks_LH_DefaultB_IPL_1,0.11428571428571428,0.72,0.08571428571428572,0.5454545454545454,0.0125 diff --git a/scripts/interpretability/focus/outputs/csv/top10_regions_region_group_lasso_heatmap.csv b/scripts/interpretability/focus/outputs/csv/top10_regions_region_group_lasso_heatmap.csv deleted file mode 100644 index 3c3fadd7..00000000 --- a/scripts/interpretability/focus/outputs/csv/top10_regions_region_group_lasso_heatmap.csv +++ /dev/null @@ -1,11 +0,0 @@ -region_name,summary_stats,mean_std,percentiles,pca,flatten -17Networks_LH_DefaultA_PFCm_1,0.5714285714285714,0.9333333333333333,0.425,0.8,0.6571428571428571 -17Networks_RH_SomMotA_3,0.5714285714285714,1.0,0.925,0.8,0.0 -17Networks_LH_DefaultC_PHC_1,0.6,1.0,0.975,0.0,0.17142857142857143 -17Networks_RH_DefaultC_PHC_1,0.37142857142857144,0.9555555555555556,0.975,0.0,0.37142857142857144 -17Networks_LH_DefaultB_PFCv_2,0.6,0.9555555555555556,0.25,0.8,0.02857142857142857 -17Networks_RH_DefaultB_PFCv_1,0.14285714285714285,0.9555555555555556,0.975,0.2,0.0 -17Networks_LH_DefaultB_IPL_1,0.37142857142857144,0.5777777777777777,0.075,0.7333333333333333,0.4 -17Networks_LH_ContB_PFClv_1,0.17142857142857143,1.0,0.925,0.0,0.0 -17Networks_RH_SalVentAttnA_Ins_1,0.11428571428571428,0.08888888888888889,0.225,0.8,0.8 -17Networks_RH_SomMotA_4,0.17142857142857143,0.17777777777777778,0.05,0.8,0.7428571428571429 diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_average_score_histogram.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_average_score_histogram.pdf deleted file mode 100644 index 3a504440..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_average_score_histogram.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_average_score_histogram.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_average_score_histogram.pdf deleted file mode 100644 index 578e2ba7..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_average_score_histogram.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_network_barplot.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_network_barplot.pdf deleted file mode 100644 index c0cac507..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_network_barplot.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_network_cosine_similarity_heatmaps.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_network_cosine_similarity_heatmaps.pdf deleted file mode 100644 index a055b760..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_network_cosine_similarity_heatmaps.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_average_score_histogram.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_average_score_histogram.pdf deleted file mode 100644 index 08103b69..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_average_score_histogram.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_kendall_table.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_kendall_table.pdf deleted file mode 100644 index cff9b8db..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_kendall_table.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20.pdf deleted file mode 100644 index f2b31114..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_flatten.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_flatten.pdf deleted file mode 100644 index 959ae43b..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_flatten.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_mean_std.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_mean_std.pdf deleted file mode 100644 index c26f69af..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_mean_std.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_pca.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_pca.pdf deleted file mode 100644 index d0bfb310..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_pca.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_percentiles.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_percentiles.pdf deleted file mode 100644 index 1bfaeffc..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_percentiles.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_summary_stats.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_summary_stats.pdf deleted file mode 100644 index 2e826dd1..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_networks_top20_summary_stats.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_flatten.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_flatten.pdf deleted file mode 100644 index 204129ca..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_flatten.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_main.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_main.pdf deleted file mode 100644 index 2d6f1620..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_main.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_mean_std.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_mean_std.pdf deleted file mode 100644 index a74498cb..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_mean_std.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_pca.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_pca.pdf deleted file mode 100644 index 27fde63c..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_pca.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_percentiles.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_percentiles.pdf deleted file mode 100644 index 5df32069..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_percentiles.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_summary_stats.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_summary_stats.pdf deleted file mode 100644 index 65b30410..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_main_top20_parcels_summary_stats.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_network_barplot.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_network_barplot.pdf deleted file mode 100644 index 746c6f75..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_network_barplot.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_network_cosine_similarity_heatmaps.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_network_cosine_similarity_heatmaps.pdf deleted file mode 100644 index 28f597eb..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_network_cosine_similarity_heatmaps.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_average_score_histogram.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_average_score_histogram.pdf deleted file mode 100644 index 8d732d14..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_average_score_histogram.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_kendall_table.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_kendall_table.pdf deleted file mode 100644 index 97676389..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_kendall_table.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20.pdf deleted file mode 100644 index e8bb7484..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_flatten.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_flatten.pdf deleted file mode 100644 index d91500b2..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_flatten.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_mean_std.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_mean_std.pdf deleted file mode 100644 index 569c9ce1..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_mean_std.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_pca.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_pca.pdf deleted file mode 100644 index fbd3c38e..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_pca.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_percentiles.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_percentiles.pdf deleted file mode 100644 index 17839fcd..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_percentiles.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_summary_stats.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_summary_stats.pdf deleted file mode 100644 index 802633ac..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_networks_top20_summary_stats.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels.pdf deleted file mode 100644 index f4720a5d..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_flatten.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_flatten.pdf deleted file mode 100644 index 892989d3..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_flatten.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_mean_std.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_mean_std.pdf deleted file mode 100644 index e2a2886c..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_mean_std.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_pca.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_pca.pdf deleted file mode 100644 index 5aa392cc..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_pca.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_percentiles.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_percentiles.pdf deleted file mode 100644 index 6b03678a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_percentiles.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_summary_stats.pdf b/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_summary_stats.pdf deleted file mode 100644 index 2c84d4d2..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/consensus2_top20_parcels_summary_stats.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_camcan_md_binary_classification_2x2_grid.pdf b/scripts/interpretability/focus/outputs/plots/cosine_camcan_md_binary_classification_2x2_grid.pdf deleted file mode 100644 index 3696e1b3..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_camcan_md_binary_classification_2x2_grid.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification.pdf deleted file mode 100644 index 334f5422..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification_combined.pdf deleted file mode 100644 index 752a8ad5..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification_networks.pdf deleted file mode 100644 index 5eb60946..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_elasticnet_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification.pdf deleted file mode 100644 index c1623dff..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification_combined.pdf deleted file mode 100644 index 85edf65a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification_networks.pdf deleted file mode 100644 index 1f2aed7a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_camcan_region_group_lasso_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_hcp_md_binary_classification_2x2_grid.pdf b/scripts/interpretability/focus/outputs/plots/cosine_hcp_md_binary_classification_2x2_grid.pdf deleted file mode 100644 index 912f2f6a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_hcp_md_binary_classification_2x2_grid.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification.pdf deleted file mode 100644 index b834b406..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification_combined.pdf deleted file mode 100644 index 2cf01c63..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification_networks.pdf deleted file mode 100644 index f4f0243b..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_elasticnet_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification.pdf deleted file mode 100644 index 08aefbc6..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification_combined.pdf deleted file mode 100644 index 79f3fb86..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification_networks.pdf deleted file mode 100644 index aa8203ae..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/cosine_hcp_region_group_lasso_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_md_binary_classification_2x2_grid.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_camcan_md_binary_classification_2x2_grid.pdf deleted file mode 100644 index a126263e..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_md_binary_classification_2x2_grid.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification.pdf deleted file mode 100644 index daa5d172..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification_combined.pdf deleted file mode 100644 index 97b1b15a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification_networks.pdf deleted file mode 100644 index 14d40c9f..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_elasticnet_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification.pdf deleted file mode 100644 index e8907d5a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification_combined.pdf deleted file mode 100644 index f239e244..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification_networks.pdf deleted file mode 100644 index cb76701a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_camcan_region_group_lasso_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_md_binary_classification_2x2_grid.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_hcp_md_binary_classification_2x2_grid.pdf deleted file mode 100644 index 88ac6d0a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_md_binary_classification_2x2_grid.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification.pdf deleted file mode 100644 index 25e64297..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification_combined.pdf deleted file mode 100644 index 93b3827f..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification_networks.pdf deleted file mode 100644 index 4d5e33e5..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_elasticnet_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification.pdf deleted file mode 100644 index 02f023db..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification_combined.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification_combined.pdf deleted file mode 100644 index 6c5cfa00..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification_combined.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification_networks.pdf b/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification_networks.pdf deleted file mode 100644 index f8b3d68f..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/jaccard_hcp_region_group_lasso_md_binary_classification_networks.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/top10_networks_region_elasticnet_heatmap.pdf b/scripts/interpretability/focus/outputs/plots/top10_networks_region_elasticnet_heatmap.pdf deleted file mode 100644 index d74b7792..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/top10_networks_region_elasticnet_heatmap.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/top10_networks_region_group_lasso_heatmap.pdf b/scripts/interpretability/focus/outputs/plots/top10_networks_region_group_lasso_heatmap.pdf deleted file mode 100644 index a74f00b0..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/top10_networks_region_group_lasso_heatmap.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/top10_regions_region_elasticnet_heatmap.pdf b/scripts/interpretability/focus/outputs/plots/top10_regions_region_elasticnet_heatmap.pdf deleted file mode 100644 index fe1c5d9a..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/top10_regions_region_elasticnet_heatmap.pdf and /dev/null differ diff --git a/scripts/interpretability/focus/outputs/plots/top10_regions_region_group_lasso_heatmap.pdf b/scripts/interpretability/focus/outputs/plots/top10_regions_region_group_lasso_heatmap.pdf deleted file mode 100644 index 649a798e..00000000 Binary files a/scripts/interpretability/focus/outputs/plots/top10_regions_region_group_lasso_heatmap.pdf and /dev/null differ diff --git a/scripts/main.py b/scripts/main.py deleted file mode 100644 index 1c0beda6..00000000 --- a/scripts/main.py +++ /dev/null @@ -1,390 +0,0 @@ -import argparse -import copy -import logging -from pathlib import Path - -import numpy as np -import pandas as pd - -from diff_benchmark.analysis.save_results import ( - is_cached, - save_model_results, -) -from diff_benchmark.analysis.true_vs_pred import plot_true_vs_pred -from diff_benchmark.data.prepare_data import DatasetPreparation -from diff_benchmark.models.model_configurations import get_model, make_run_id -from diff_benchmark.preprocessing.datasets_dataclasses import DatasetConfig -from diff_benchmark.utils.config_loader import load_configs -from diff_benchmark.utils.job_manager import run_jobs -from diff_benchmark.utils.logger import configure_logging, setup_logger -from diff_benchmark.utils.parquet_helper import ParquetSaver, metrics_to_rows -from diff_benchmark.utils.scores import compute_metrics -from diff_benchmark.utils.summary_saver import compute_summary_stats, update_summary - -parser = argparse.ArgumentParser() -parser.add_argument( - "--methods", nargs="+", type=str, default=["2dcnn_torch"], help="Method to use" -) -parser.add_argument("--cluster", default="margaret", type=str, help="Cluster to use") -args = parser.parse_args() - -general_config, model_config = load_configs(args) - - -def run_single_model(model_name, model_config, general_config, results_path): - logger = setup_logger("Job.run_single_model") - metrics_rows = [] - - config = general_config - - local_config = copy.deepcopy(model_config) - local_config["model_name"] = model_name - run_id = make_run_id(model_name, local_config) - local_config["run_id"] = run_id - local_config["backbone"]["prediction_task"] = config["prediction_task"] - local_config["backend"]["prediction_task"] = config["prediction_task"] - - datasets_by_name = { - d["name"]: d for d in general_config["datasets"]["datasets_list"] - } - dataset_selected = datasets_by_name[local_config["dataset"]] - dataset_selected = DatasetConfig( - **dataset_selected, - metric_to_compute=general_config["datasets"]["metric_to_compute"], - scale=general_config["datasets"]["scale"], - region=general_config["data_preparation"]["region"], - ) - torch_dataset_preparator = DatasetPreparation( - model_name=model_name, - model_config=local_config, - general_config=general_config, - source_dataset=dataset_selected, - ) - - dataset, preprocessed = torch_dataset_preparator.pipeline() - - targets_path = Path(results_path) / "parquet" / "data" / "targets.parquet" - targets_path.parent.mkdir(parents=True, exist_ok=True) - - target_name = config["target_columns"][0] - rows = [ - { - "dataset": dataset_selected.name, - "sample_id": sid, - "target": target_name, - "value": float(v), - } - for sid, v in zip(dataset.subject_ids, dataset.targets.numpy()) - ] - saver = ParquetSaver( - path=targets_path, - key_columns=["dataset", "sample_id", "target"], - columns=["dataset", "sample_id", "target", "value"], - ) - saver.add_rows(rows) - saver.save() - - specs = preprocessed.get_specs() - logger.debug(f"Dataset specs: {specs}") - - indices = preprocessed.get_fold_indices() - - if is_cached(run_id, Path(results_path) / "analysis_results"): - logger.info(f"Skipping {model_name} (run_id={run_id}) - already cached.") - return model_name, run_id - logger.info(f"Running model: {model_name} with run_id: {run_id}") - - train_scores, test_scores = [], [] - train_preds, test_preds = [], [] - train_targets, test_targets = [], [] - - summary = { - "model_name": model_name, - # "preprocessing": { - # "data_type": config.get("data_type", "images"), - # "csv_file": str(config.get("csv_file", "")), - # "target_columns": config.get("target_columns", []) - # }, - "pipeline": { - "run_id": run_id, - "comment": local_config.get("comment", ""), - }, - "results": { - "train_average_score": None, # will fill after loop - "train_std_score": None, # will fill after loop - "test_average_score": None, # will fill after loop - "test_std_score": None, # will fill after loop - "number_folds": len(indices), - "folds": {}, # will fill inside loop - }, - } - exclude_keys = {"comment", "name", "model_name"} - for key, value in local_config.items(): - if key not in exclude_keys: - summary["pipeline"][key] = value - - save_model_results( - summary, Path(results_path) / "analysis_results" / f"{run_id}_partial.json" - ) - - predictions_path = Path(results_path) / "parquet" / "data" / "predictions.parquet" - key_cols = ["run_id", "model", "dataset", "fold", "split", "sample_id", "target"] - pred_saver = ParquetSaver( - predictions_path, - key_columns=key_cols, - columns=[ - "run_id", - "model", - "dataset", - "fold", - "split", - "sample_id", - "target", - "prediction", - ], - ) - - for fold_idx, (train_idx, test_idx) in enumerate(indices): - try: - logger.info(f"Run ID: {run_id} - Fold {fold_idx+1}/{len(indices)}") - local_config["fold_idx"] = fold_idx - train_loader, test_loader = preprocessed.get_dataloader_fold( - dataset, - fold_idx, - indices, - num_workers=local_config["data"]["num_workers"], - batch_size=local_config["data"]["batch_size"], - ) - train_idx, test_idx = indices[fold_idx] - targets = dataset.targets.numpy() - y_train = np.array(targets[train_idx]).squeeze() - y_test = np.array(targets[test_idx]).squeeze() - - local_config["backbone"]["prediction_task"] = config.get( - "prediction_task", "regression" - ) - local_config["backend"]["run_id"] = run_id - model = get_model(model_name, local_config) - - model.fit(train_loader) - train_pred = model.predict(train_loader) - - plot_true_vs_pred( - y_train, train_pred, fold_idx=fold_idx, run_id=run_id, type="train" - ) - train_score = compute_metrics( - y_train, - train_pred, - prediction_task=local_config["backbone"]["prediction_task"], - ) - - train_scores.append(train_score) - train_preds.append(train_pred.tolist()) - train_targets.append(y_train.tolist()) - - train_subject_ids = np.asarray(dataset.subject_ids)[train_idx] - train_rows = [ - { - "run_id": run_id, - "model": model_name, - "dataset": dataset_selected.name, - "fold": fold_idx, - "split": "train", - "sample_id": sid, - "target": target_name, - "prediction": float(pred), - } - for sid, pred in zip(train_subject_ids, train_pred) - ] - pred_saver.add_rows(train_rows) - - test_pred = model.predict(test_loader) - plot_true_vs_pred( - y_test, test_pred, fold_idx=fold_idx, run_id=run_id, type="test" - ) - test_score = compute_metrics( - y_test, - test_pred, - prediction_task=local_config["backbone"]["prediction_task"], - ) - logger.debug( - f"Fold {fold_idx} - Train score: {train_score}, Test score: {test_score}" - ) - - test_scores.append(test_score) - test_preds.append(test_pred.tolist()) - test_targets.append(y_test.tolist()) - - test_subject_ids = np.asarray(dataset.subject_ids)[test_idx] - test_rows = [ - { - "run_id": run_id, - "model": model_name, - "dataset": dataset_selected.name, - "fold": fold_idx, - "split": "test", - "sample_id": sid, - "target": target_name, - "prediction": float(pred), - } - for sid, pred in zip(test_subject_ids, test_pred) - ] - pred_saver.add_rows(test_rows) - pred_saver.save() - - primary_metric = {"binary_classification": "accuracy", "regression": "mse"}[ - local_config["backbone"]["prediction_task"] - ] - summary = update_summary( - summary, - fold_idx, - train_score, - test_score, - y_train, - train_pred, - y_test, - test_pred, - primary_metric, - ) - - metrics_rows.extend( - metrics_to_rows( - train_score, - run_id=run_id, - model_name=model_name, - dataset=dataset_selected.name, - prediction_task=local_config["backbone"]["prediction_task"], - fold=fold_idx, - split="train", - ) - ) - - metrics_rows.extend( - metrics_to_rows( - test_score, - run_id=run_id, - model_name=model_name, - dataset=dataset_selected.name, - prediction_task=local_config["backbone"]["prediction_task"], - fold=fold_idx, - split="test", - ) - ) - - save_model_results( - summary, - Path(results_path) / "analysis_results" / f"{run_id}_partial.json", - ) - except Exception as e: - logger.info(f"Crash in fold {fold_idx} of {run_id}: {e}") - save_model_results( - summary, - Path(results_path) / "analysis_results" / f"{run_id}_crashed.json", - ) - raise - - metrics_path = ( - Path(results_path) - / "parquet" - / "analysis_results" - / f"metrics_{run_id}.parquet" - ) - metrics_path.parent.mkdir(parents=True, exist_ok=True) - - df = pd.DataFrame(metrics_rows) - df.to_parquet(metrics_path, index=False) - - summary["results"]["train_average_score"], summary["results"]["train_std_score"] = ( - compute_summary_stats(train_scores, primary_metric) - ) - summary["results"]["test_average_score"], summary["results"]["test_std_score"] = ( - compute_summary_stats(test_scores, primary_metric) - ) - - save_model_results(summary, Path(results_path) / "analysis_results") - return model_name, run_id - - -models_to_run = model_config["models"] -# logging.getLogger().setLevel(logging.DEBUG) -configure_logging(logging.DEBUG) -logger = setup_logger(__name__) -logger.info("Starting diff_benchmark") -# parallel_type = "slurm" # None, "joblib" - -# if parallel_type == "slurm": -# logging.getLogger().setLevel(logging.INFO) -# else: -# logging.getLogger().setLevel(logging.DEBUG) -# else: -# level = logging.WARNING - -# run_single_model( -# model_name=models_to_run[0]["name"], -# model_config=models_to_run[0]["params"], -# general_config=general_config, -# results_path="./data/results", -# ) - - -# 1. Group the models by backend (deep learning vs sklearn) -# 2. Get from the slurm config yaml the required ressources for each backend -# 3. Start the jobs in parallel by backend groups, setting the slurm config accordingly + get submitit jobs -# 4. Await the jobs and collect the results -slurm_cfg = general_config["slurm_cfg"][args.cluster] - -results = run_jobs( - run_fn=run_single_model, - fn_kwargs_list=[ - { - "model_name": model["name"], - "model_config": model["params"], - "general_config": general_config, - "results_path": "./data/results", - } - for model in models_to_run - ], - parallel_type="slurm", # None, # - slurm_cfg=slurm_cfg, - # slurm_cfg={ - # "slurm_partition": "parietal,normal,gpu", - # "tasks_per_node": 1, # == --ntasks=1 (on 1 node) - # "slurm_gpus_per_task": 1, # == --gpus-per-task=1 (recommended here) - # "slurm_cpus_per_gpu": 10, - # "timeout_min": 900, - # }, - n_jobs=50, -) - -import warnings - -for result in results: - if not result.ok: - warnings.warn(f"Job failed:\n{result.traceback}") - - -metrics_dir = Path("./data/results/parquet/analysis_results") -global_path = metrics_dir / "metrics.parquet" - -if global_path.exists(): - df_global = pd.read_parquet(global_path) - existing_run_ids = set(df_global["run_id"].unique()) -else: - df_global = None - existing_run_ids = set() - -new_dfs = [] - -for p in metrics_dir.glob("metrics_*.parquet"): - run_id = p.stem.replace("metrics_", "") - if run_id not in existing_run_ids: - new_dfs.append(pd.read_parquet(p)) - -if new_dfs: - df_new = pd.concat(new_dfs, ignore_index=True) - if df_global is not None: - df_out = pd.concat([df_global, df_new], ignore_index=True) - else: - df_out = df_new - - df_out.to_parquet(global_path, index=False) diff --git a/scripts/optimize_training.py b/scripts/optimize_training.py deleted file mode 100644 index 322a129a..00000000 --- a/scripts/optimize_training.py +++ /dev/null @@ -1,167 +0,0 @@ -import os -import time - -import torch -import torch.nn as nn -from main import GoogleViTBackbone, GoogleViTClassifier -from torch.utils.data import DataLoader, Dataset, TensorDataset - -# Constants -NUM_SAMPLES = 20 # Reduced for fast testing -BATCH_SIZE = 1 # Often 1 for the heavy 3D backbone due to VRAM -HEAD_BATCH_SIZE = 32 # Can be large for the lightweight head training -EPOCHS = 50 -DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") -CACHE_PATH = "cached_features.pt" - - -class CachedFeatureDataset(Dataset): - """ - On init: - 1. Checks if 'cache_path' exists. - 2. IF YES: Loads features from disk (Fast I/O). - 3. IF NO: Runs backbone on 'source_dataloader', saves features to disk. - """ - - def __init__(self, cache_path, backbone=None, source_dataloader=None, device=None): - self.cache_path = cache_path - - if os.path.exists(cache_path): - print(f"\n--- Loading Features from Cache: {cache_path} ---") - print("Skipping backbone computation...") - start = time.time() - data = torch.load(cache_path) - self.features = data["features"] - self.labels = data["labels"] - print( - f"Loaded {len(self.features)} samples in {time.time() - start:.4f} seconds." - ) - print(f"File size: {os.path.getsize(cache_path) / 1024**2:.2f} MB") - - else: - if backbone is None or source_dataloader is None: - raise ValueError( - "Cache not found. backbone and source_dataloader are required to generate it." - ) - - print(f"\n--- Cache miss. Computing Features (The Slow Part) ---") - self.features, self.labels = self._precompute( - backbone, source_dataloader, device - ) - - print(f"Saving features to {cache_path}...") - torch.save({"features": self.features, "labels": self.labels}, cache_path) - print(f"Saved. Future runs will be instant.") - - def _precompute(self, backbone, dataloader, device): - backbone.eval() - all_features = [] - all_labels = [] - - start_time = time.time() - - with torch.no_grad(): - with torch.autocast(device_type=device.type): - for i, (x, y) in enumerate(dataloader): - if i % 10 == 0: - print(f"Processing sample {i}/{len(dataloader)}...", end="\r") - - x = x.to(device) - # Squeeze channel dim if present (N, 1, D, H, W) -> (N, D, H, W) - if x.ndim == 5 and x.shape[1] == 1: - x = x.squeeze(1) - - features = backbone(x) - - all_features.append(features.cpu()) - all_labels.append(y) - - print( - f"\nFeature extraction finished in {time.time() - start_time:.2f} seconds." - ) - return torch.cat(all_features), torch.cat(all_labels) - - def __len__(self): - return len(self.features) - - def __getitem__(self, idx): - return self.features[idx], self.labels[idx] - - -def generate_dummy_data(): - """Simulating your dataset of 800 volumes.""" - print(f"Generating {NUM_SAMPLES} dummy samples...") - # Using random data (0-1) to simulate images - data = torch.rand(NUM_SAMPLES, 1, 192, 256, 256) # (N, C, D, H, W) - labels = torch.randint(0, 10, (NUM_SAMPLES,)) # Dummy classification labels - return TensorDataset(data, labels) - - -def train_head_only(head_model, cached_dataset, device): - print("\n--- Phase 2: Training Head on Cached Features (The Fast Part) ---") - - # We can use a much larger batch size now because input is just a vector, not a 3D volume - train_loader = DataLoader(cached_dataset, batch_size=HEAD_BATCH_SIZE, shuffle=True) - - optimizer = torch.optim.Adam(head_model.parameters(), lr=1e-3) - criterion = nn.CrossEntropyLoss() - - start_time = time.time() - head_model.train() - - for epoch in range(EPOCHS): - epoch_loss = 0.0 - for features, targets in train_loader: - features, targets = features.to(device), targets.to(device) - - optimizer.zero_grad() - outputs = head_model.head( - features - ) # Access the 'head' part of the classifier directly - loss = criterion(outputs, targets) - loss.backward() - optimizer.step() - - epoch_loss += loss.item() - - if (epoch + 1) % 10 == 0: - print( - f"Epoch {epoch+1}/{EPOCHS}, Loss: {epoch_loss / len(train_loader):.4f}" - ) - - print(f"Training finished in {time.time() - start_time:.2f} seconds.") - - -if __name__ == "__main__": - # 1. Setup Data - full_dataset = generate_dummy_data() - - # 2. Setup Frozen Backbone - print("Loading Backbone...") - backbone = GoogleViTBackbone(freeze_backbone=True, backbone_grad=False).to(DEVICE) - - # 3. Smart Dataset (Handles Caching Automatically) - # We pass the backbone/loader ONLY if needed for generation. - # Otherwise, it loads from disk and backbone remains unused/idle. - backbone_loader = DataLoader(full_dataset, batch_size=BATCH_SIZE, shuffle=False) - - cached_dataset = CachedFeatureDataset( - cache_path=CACHE_PATH, - backbone=backbone, - source_dataloader=backbone_loader, - device=DEVICE, - ) - - # 4. Free up memory - # (In a real script, if cache was loaded, we never even needed to load the backbone to GPU!) - del backbone - torch.cuda.empty_cache() - - # 5. Setup Classifier Head - print("Initializing Head...") - # Using dummy backbone just to init the config - dummy_backbone = GoogleViTBackbone(freeze_backbone=True) - full_model = GoogleViTClassifier(dummy_backbone).to(DEVICE) - - # 6. Train Head - train_head_only(full_model, cached_dataset, DEVICE) diff --git a/scripts/prepare_data_wrapped.py b/scripts/prepare_data_wrapped.py deleted file mode 100644 index bc0c10f7..00000000 --- a/scripts/prepare_data_wrapped.py +++ /dev/null @@ -1,32 +0,0 @@ -import argparse - -from diff_benchmark.data.prepare_data import DatasetPreparation -from diff_benchmark.preprocessing.datasets_dataclasses import DatasetConfig -from diff_benchmark.utils.config_loader import load_configs - -parser = argparse.ArgumentParser() -parser.add_argument( - "--methods", nargs="+", type=str, default=["2dcnn_torch"], help="Method to use" -) -args = parser.parse_args() - -general_config, model_config = load_configs(args) - -models_to_run = model_config["models"] -for dataset2prepare in general_config["datasets"]["datasets_list"]: - if dataset2prepare["name"] == "abide": - dataset = DatasetConfig( - **dataset2prepare, - metric_to_compute=general_config["datasets"]["metric_to_compute"], - scale=general_config["datasets"]["scale"], - ) - dataset2work = dataset - -torch_dataset_preparator = DatasetPreparation( - model_name=models_to_run[0]["name"], - model_config=models_to_run[0], - general_config=general_config, - source_dataset=dataset2work, -) -# breakpoint() -torch_dataset, preprocessed = torch_dataset_preparator.pipeline() diff --git a/scripts/rename_gray_matter_files.py b/scripts/rename_gray_matter_files.py deleted file mode 100644 index 130ddd44..00000000 --- a/scripts/rename_gray_matter_files.py +++ /dev/null @@ -1,189 +0,0 @@ -""" -Rename existing gray matter diffusion metric files to include tissue type. - -Usage: - python rename_gray_matter_files.py --base-dir /path/to/benchmark --datasets hcp camcan --dry-run - python rename_gray_matter_files.py --base-dir /path/to/benchmark --datasets hcp camcan # Actually rename -""" - -import argparse -import shutil -from pathlib import Path -from typing import List - - -def rename_files(base_dir: Path, datasets: List[str], dry_run: bool = True): - """ - Rename gray matter files to include tissue type. - - Args: - base_dir: Base benchmark directory - datasets: List of dataset names to process - dry_run: If True, only print what would be renamed without actually renaming - """ - total_renamed = 0 - total_errors = 0 - - for dataset in datasets: - dataset_dir = base_dir / dataset / "default" / "derivatives" - - if not dataset_dir.exists(): - print(f"⚠️ Dataset directory not found: {dataset_dir}") - continue - - print(f"\n{'='*80}") - print(f"Processing dataset: {dataset}") - print(f"{'='*80}") - - # Find all subject directories - subject_dirs = sorted( - [ - d - for d in dataset_dir.iterdir() - if d.is_dir() and d.name.startswith("sub-") - ] - ) - print(f"Found {len(subject_dirs)} subjects\n") - - for subject_dir in subject_dirs: - subject_id = subject_dir.name - dwi_dir = subject_dir / "dwi" - - if not dwi_dir.exists(): - continue - - renamed_count = 0 - - # Pattern 1: Hemisphere scalar files - # From: sub-{id}_hemi-{L/R}_param-{metric}.scalar.gii - # To: sub-{id}_hemi-{L/R}_param-{metric}_tissue-gray.scalar.gii - for scalar_file in dwi_dir.glob("sub-*_hemi-*_param-*.scalar.gii"): - # Skip if already has tissue type - if "_tissue-" in scalar_file.name: - continue - - # Parse filename - parts = scalar_file.stem.replace(".scalar", "").split("_") - - # Reconstruct with tissue type before .scalar.gii - new_name = scalar_file.name.replace( - ".scalar.gii", "_tissue-gray.scalar.gii" - ) - new_path = scalar_file.parent / new_name - - if dry_run: - print(f" [DRY RUN] {scalar_file.name}") - print(f" -> {new_name}") - else: - try: - scalar_file.rename(new_path) - print(f" ✓ Renamed: {new_name}") - renamed_count += 1 - total_renamed += 1 - except Exception as e: - print(f" ✗ Error renaming {scalar_file.name}: {e}") - total_errors += 1 - - # Pattern 2: DWI map files - # From: sub-{id}_param-{metric}_dwimap.nii.gz - # To: sub-{id}_param-{metric}_tissue-gray_dwimap.nii.gz - for dwimap_file in dwi_dir.glob("sub-*_param-*_dwimap.nii.gz"): - # Skip if already has tissue type - if "_tissue-" in dwimap_file.name: - continue - - # Insert tissue type before _dwimap.nii.gz - new_name = dwimap_file.name.replace( - "_dwimap.nii.gz", "_tissue-gray_dwimap.nii.gz" - ) - new_path = dwimap_file.parent / new_name - - if dry_run: - print(f" [DRY RUN] {dwimap_file.name}") - print(f" -> {new_name}") - else: - try: - dwimap_file.rename(new_path) - print(f" ✓ Renamed: {new_name}") - renamed_count += 1 - total_renamed += 1 - except Exception as e: - print(f" ✗ Error renaming {dwimap_file.name}: {e}") - total_errors += 1 - - if renamed_count > 0 or dry_run: - if dry_run: - files_to_rename = len( - list(dwi_dir.glob("sub-*_hemi-*_param-*.scalar.gii")) - ) + len(list(dwi_dir.glob("sub-*_param-*_dwimap.nii.gz"))) - files_to_rename = sum( - 1 - for f in dwi_dir.glob("sub-*_hemi-*_param-*.scalar.gii") - if "_tissue-" not in f.name - ) - files_to_rename += sum( - 1 - for f in dwi_dir.glob("sub-*_param-*_dwimap.nii.gz") - if "_tissue-" not in f.name - ) - if files_to_rename > 0: - print(f" [{subject_id}] Would rename {files_to_rename} files") - - print(f"\n{'='*80}") - print(f"Summary:") - print(f"{'='*80}") - if dry_run: - print(f"DRY RUN MODE - No files were actually renamed") - print(f"Run without --dry-run to perform actual renaming") - else: - print(f"✓ Successfully renamed: {total_renamed} files") - if total_errors > 0: - print(f"✗ Errors: {total_errors} files") - - -def main(): - parser = argparse.ArgumentParser( - description="Rename gray matter diffusion files to include tissue type" - ) - parser.add_argument( - "--base-dir", - type=Path, - required=True, - help="Base benchmark directory (e.g., /data/parietal/store3/work/ggomezji/benchmark)", - ) - parser.add_argument( - "--datasets", - nargs="+", - required=True, - help="List of dataset names (e.g., hcp camcan wand)", - ) - parser.add_argument( - "--dry-run", - action="store_true", - help="Preview changes without actually renaming files", - ) - - args = parser.parse_args() - - if not args.base_dir.exists(): - print(f"Error: Base directory does not exist: {args.base_dir}") - return - - print(f"Base directory: {args.base_dir}") - print(f"Datasets: {', '.join(args.datasets)}") - print( - f"Mode: {'DRY RUN (preview only)' if args.dry_run else 'LIVE (will rename files)'}" - ) - print() - - if not args.dry_run: - response = input("⚠️ This will rename files. Continue? [y/N]: ") - if response.lower() != "y": - print("Aborted.") - return - - rename_files(args.base_dir, args.datasets, args.dry_run) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/all_plots.py b/scripts/visualization_backup/all_plots.py deleted file mode 100644 index 65de8918..00000000 --- a/scripts/visualization_backup/all_plots.py +++ /dev/null @@ -1,84 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path - -from combined_plot import plot_combined -from delta_to_linear_plot import plot_delta_to_linear -from feature_benefit_heatmap import plot_feature_benefit_heatmap -from feature_plots import plot_feature_heatmap -from feature_vs_b0_plot import plot_feature_vs_b0 -from prep_sensitivity_plot import plot_prep_sensitivity -from show_spread import plot_model_family_spread -from strip_plots import generate_strip_plots -from white_vs_gray_plots import plot_white_vs_gray_tscore - -DEFAULT_INPUT = "exp_outputs/summary/comprehensive_results.parquet" -DEFAULT_OUTDIR = "exp_outputs/summary/plots" - - -def generate_all_plots( - parquet_path: str = DEFAULT_INPUT, - out_dir: str = DEFAULT_OUTDIR, - best_run: bool = True, -) -> Path: - out_path = Path(out_dir) - folds_dir = out_path / "folds" - features_dir = out_path / "features" - - generate_strip_plots(parquet_path, str(folds_dir), best_run=best_run) - print(f"[1/8] Strip plots generated in {folds_dir}") - - plot_white_vs_gray_tscore(parquet_path, str(folds_dir)) - print(f"[2/8] White-vs-gray plots generated in {folds_dir}") - - plot_feature_heatmap(parquet_path, str(features_dir)) - print(f"[3/8] Feature heatmap generated in {features_dir}") - - plot_model_family_spread(parquet_path, str(folds_dir)) - print(f"[4/8] Spread plot generated in {folds_dir}") - - plot_delta_to_linear(parquet_path, str(folds_dir)) - print(f"[5/8] Delta-to-linear plot generated in {folds_dir}") - - plot_feature_vs_b0(parquet_path, str(folds_dir)) - print(f"[6/8] Feature-vs-b0 deltas plot generated in {folds_dir}") - - plot_prep_sensitivity(parquet_path, str(folds_dir)) - print(f"[7/8] Prep-sensitivity plot generated in {folds_dir}") - - plot_combined(parquet_path, str(folds_dir)) - print(f"[8/8] Combined plot generated in {folds_dir}") - - plot_feature_benefit_heatmap(parquet_path, str(features_dir)) - print(f"[9/9] Feature benefit heatmap generated in {features_dir}") - - return out_path - - -def main() -> None: - parser = argparse.ArgumentParser(description="Generate all visualization plots") - parser.add_argument( - "--input", - default=DEFAULT_INPUT, - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default=DEFAULT_OUTDIR, - help="Base output directory for generated plots", - ) - parser.add_argument( - "--no-best-run", - action="store_false", - dest="best_run", - help="Disable best-run filtering in strip plots", - ) - args = parser.parse_args() - - out_path = generate_all_plots(args.input, args.outdir, best_run=args.best_run) - print("Saved all plots to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/combined_plot.py b/scripts/visualization_backup/combined_plot.py deleted file mode 100644 index 7ec0eeee..00000000 --- a/scripts/visualization_backup/combined_plot.py +++ /dev/null @@ -1,470 +0,0 @@ -""" -combined_plot.py ----------------- -Single publication-quality figure combining: - - Left panel (2/3): model-family comparison vs linear baseline - - Right panel (1/3): preprocessing sensitivity (range & IQR across feature × tissue) - -Both panels share the same y-axis (normalized score, dummy=0 / perfect=1) -and the same dataset-task x-order. -""" - -from __future__ import annotations - -import argparse -import warnings -from pathlib import Path - -import matplotlib -import matplotlib.gridspec as gridspec -import numpy as np -import pandas as pd -import seaborn as sns -from matplotlib.lines import Line2D - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from utils import ( - MODEL_DISPLAY_ORDER, - MODEL_FAMILY_ORDER, - add_score_raw_from_prefix, - aggregate_run_scores, - choose_spread_metric, - clean_target, - filter_combos, - format_label, - make_dataset_task_label, - map_model_display_group, - map_model_family, - normalize_score, - ordered_dataset_task_labels_from_combos, -) - -from config import MICCAI_DOUBLE_COLUMN_FIGSIZE, apply_miccai_style - -# ── Shared scope ────────────────────────────────────────────────────────────── -COMBOS = [ - ("hcp", "Sex", "binary_classification"), - ("camcan", "Sex", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] -FEATURES = {"md", "mk", "sh", "b0"} -TISSUES = {"white", "gray"} - -# ── Shared visual constants ─────────────────────────────────────────────────── -GROUP_SPACING_LEFT = 1.6 # wider: 5 model families per group -GROUP_SPACING_RIGHT = 1.2 # narrower: one bar stack per group - -FAMILY_COLORS = { - "Linear": "#4C78A8", - "RandomForest": "#59A14F", - "medicalnet": "#E15759", - "dinov2": "#F28E2B", - "curia": "#B07AA1", -} -FAMILY_LABELS = { - "Linear": "Linear", - "RandomForest": "Random\nForest", - "medicalnet": "MedicalNet", - "dinov2": "DINOv2", - "curia": "Curia", -} -FAMILY_OFFSETS = { - "Linear": -0.40, - "RandomForest": -0.20, - "medicalnet": 0.0, - "dinov2": 0.20, - "curia": 0.40, -} - -RANGE_LINE_COLOR = "#333333" -IQR_COLOR = "#111111" -ANNOT_COLOR = "#555555" -DOT_COLOR = "#444444" - -Y_LABEL = "Score (min-max,\ndummy = 0 to perfect = 1)" - - -# ── Data pipelines ──────────────────────────────────────────────────────────── - - -def _base_df(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, COMBOS) - df = df[df["primary_metric"].isin(FEATURES)] - df = df[df["tissue_type"].isin(TISSUES)] - df["model_family"] = df["model_name"].map(map_model_family) - df = df[df["model_family"].notna()].copy() - if df.empty: - raise RuntimeError("No rows left after scope filtering") - return df - - -def _normalise(df: pd.DataFrame) -> pd.DataFrame: - parts = [] - for (_, _, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"], dropna=False - ): - fold_prefix, _ = choose_spread_metric(group, task) - part = add_score_raw_from_prefix(group, fold_prefix) - part = part[part["score_raw"].notna()].copy() - if not part.empty: - parts.append(part) - if not parts: - raise RuntimeError("No valid metrics found") - score_df = pd.concat(parts, ignore_index=True) - score_df["score_norm"] = score_df.apply(normalize_score, axis=1) - score_df["dataset_task"] = score_df.apply( - lambda r: make_dataset_task_label(r["dataset"], r["target_clean"]), axis=1 - ) - # return score_df[score_df["score_norm"].notna()].copy() - return score_df[ - score_df["score_norm"].notna() & (score_df["score_norm"] != 0) - ].copy() - - -def _load_left_data(parquet_path: str) -> pd.DataFrame: - """Per-run normalized scores, with linear reference attached.""" - df = _base_df(parquet_path) - breakpoint() - score_df = _normalise(df) - - run_df = aggregate_run_scores(score_df, score_col="score_norm") - run_df["dataset_task"] = run_df.apply( - lambda r: make_dataset_task_label(r["dataset"], r["target_clean"]), axis=1 - ) - run_df = run_df[run_df["model_family"].isin(MODEL_FAMILY_ORDER)].copy() - run_df["model_display"] = run_df["model_name"].map(map_model_display_group) - run_df = run_df[run_df["model_display"].isin(MODEL_DISPLAY_ORDER)].copy() - - linear_ref = ( - run_df[run_df["model_family"] == "Linear"] - .groupby("dataset_task", dropna=False)["score_norm_run"] - .median() - ) - missing = [l for l in run_df["dataset_task"].unique() if l not in linear_ref.index] - if missing: - warnings.warn( - f"Dropping dataset-task without Linear rows: {', '.join(sorted(missing))}" - ) - run_df = run_df[run_df["dataset_task"].isin(linear_ref.index)].copy() - run_df["linear_ref"] = run_df["dataset_task"].map(linear_ref) - return run_df - - -def _load_right_data(parquet_path: str) -> tuple[pd.DataFrame, pd.DataFrame]: - """Prep-level median scores + per-dataset-task stats.""" - df = _base_df(parquet_path) - score_df = _normalise(df) - - prep_df = ( - score_df.groupby( - ["dataset_task", "primary_metric", "tissue_type"], dropna=False - )["score_norm"] - .median() - .reset_index() - .rename(columns={"score_norm": "prep_score"}) - ) - prep_df = prep_df[prep_df["prep_score"].notna()].copy() - - stats_rows = [] - for label, grp in prep_df.groupby("dataset_task", dropna=False): - s = grp["prep_score"].dropna() - mn, mx = float(s.min()), float(s.max()) - stats_rows.append( - { - "dataset_task": label, - "prep_min": mn, - "prep_max": mx, - "prep_q1": float(s.quantile(0.25)), - "prep_q3": float(s.quantile(0.75)), - "prep_range": mx - mn, - "n_preps": len(s), - } - ) - stats_df = pd.DataFrame(stats_rows) - return prep_df, stats_df - - -# ── Panel drawers ───────────────────────────────────────────────────────────── - - -def _draw_left(ax: plt.Axes, run_df: pd.DataFrame, order: list[str]) -> None: - """Delta-to-linear panel: violins + scatter per model family.""" - task_to_x = {label: idx * GROUP_SPACING_LEFT for idx, label in enumerate(order)} - pretty_labels = [format_label(label) for label in order] - - rng = np.random.default_rng(7) - - # Scatter (individual runs) - for family in MODEL_DISPLAY_ORDER: - sub = run_df[run_df["model_display"] == family] - if sub.empty: - continue - x_base = sub["dataset_task"].map(task_to_x).astype(float).to_numpy() - jitter = rng.normal(0.0, 0.04, size=sub.shape[0]) - alpha = 0.25 if family == "Linear" else 0.8 - ax.scatter( - x_base + FAMILY_OFFSETS[family] + jitter, - sub["score_norm_run"].to_numpy(dtype=float), - s=22, - c=FAMILY_COLORS[family], - alpha=alpha, - edgecolors="white", - linewidths=0.35, - zorder=3, - ) - - # Violin + median diamond - for family in MODEL_DISPLAY_ORDER: - sub = run_df[run_df["model_display"] == family] - if sub.empty: - continue - color = FAMILY_COLORS[family] - for task_label, x_center in task_to_x.items(): - vals = ( - sub.loc[sub["dataset_task"] == task_label, "score_norm_run"] - .dropna() - .to_numpy(dtype=float) - ) - if len(vals) == 0: - continue - x_pos = x_center + FAMILY_OFFSETS[family] - if len(vals) >= 3: - parts = ax.violinplot( - vals, - positions=[x_pos], - widths=0.22, - showmeans=False, - showmedians=False, - showextrema=False, - ) - for pc in parts["bodies"]: - pc.set_facecolor(color) - pc.set_edgecolor("white") - pc.set_alpha(0.55) - pc.set_linewidth(0.5) - pc.set_zorder(4) - ax.scatter( - [x_pos], - [float(np.median(vals))], - marker="D", - s=16, - color=color, - edgecolors="black", - linewidths=0.35, - zorder=5, - ) - - # Linear reference hline - for task_label, x_center in task_to_x.items(): - ref_vals = run_df.loc[run_df["dataset_task"] == task_label, "linear_ref"] - if ref_vals.empty: - continue - ax.hlines( - y=float(ref_vals.iloc[0]), - xmin=x_center - 0.53, - xmax=x_center + 0.53, - colors="#1f1f1f", - linewidth=1.15, - alpha=0.9, - zorder=2, - ) - - ax.set_xlim(-0.65, (len(order) - 1) * GROUP_SPACING_LEFT + 0.65) - ax.set_xticks([i * GROUP_SPACING_LEFT for i in range(len(order))]) - ax.set_xticklabels(pretty_labels, rotation=24, ha="right") - ax.set_title("Model families vs baseline") - - legend_handles = [ - Line2D( - [0], - [0], - marker="o", - linestyle="", - markerfacecolor=FAMILY_COLORS[f], - markeredgecolor="white", - markeredgewidth=0.4, - markersize=6, - alpha=0.35 if f == "Linear" else 0.9, - label=FAMILY_LABELS[f], - ) - for f in MODEL_DISPLAY_ORDER - if f in run_df["model_display"].unique() - ] - ax.legend( - handles=legend_handles, - loc="upper right", - bbox_to_anchor=(1.0, 1.0), - ncol=1, - frameon=True, - framealpha=0.85, - edgecolor="none", - borderaxespad=0.4, - ) - - -def _draw_right( - ax: plt.Axes, - prep_df: pd.DataFrame, - stats_df: pd.DataFrame, - order: list[str], -) -> None: - """Prep-sensitivity panel: range + IQR bars + jittered dots.""" - task_to_x = {label: idx * GROUP_SPACING_RIGHT for idx, label in enumerate(order)} - pretty_labels = [format_label(label) for label in order] - rng = np.random.default_rng(42) - - for task_label, x_center in task_to_x.items(): - row = stats_df[stats_df["dataset_task"] == task_label] - if row.empty: - continue - row = row.iloc[0] - - # IQR bar - ax.vlines( - x_center, - row["prep_q1"], - row["prep_q3"], - colors=IQR_COLOR, - linewidth=5.0, - alpha=0.30, - zorder=3, - ) - - # Median marker - med = prep_df.loc[prep_df["dataset_task"] == task_label, "prep_score"].median() - ax.scatter( - [x_center], - [med], - marker="D", - s=18, - color=IQR_COLOR, - alpha=0.85, - edgecolors="white", - linewidths=0.4, - zorder=4, - ) - - # Dots - x_base = prep_df["dataset_task"].map(task_to_x).astype(float).to_numpy() - jitter = rng.normal(0.0, 0.045, size=len(prep_df)) - ax.scatter( - x_base + jitter, - prep_df["prep_score"].to_numpy(dtype=float), - s=24, - c=DOT_COLOR, - alpha=0.55, - edgecolors="white", - linewidths=0.3, - zorder=5, - ) - - ax.set_xlim(-0.55, (len(order) - 1) * GROUP_SPACING_RIGHT + 0.55) - ax.set_xticks([i * GROUP_SPACING_RIGHT for i in range(len(order))]) - ax.set_xticklabels(pretty_labels, rotation=24, ha="right") - ax.set_title("Data Preparation\nsensitivity") - - iqr_h = Line2D([0], [0], color=IQR_COLOR, linewidth=4, alpha=0.30, label="IQR") - med_h = Line2D( - [0], - [0], - marker="D", - linestyle="", - markerfacecolor=IQR_COLOR, - markeredgecolor="white", - markeredgewidth=0.4, - markersize=5, - alpha=0.85, - label="Median", - ) - ax.legend( - handles=[iqr_h, med_h], - loc="upper right", - ncol=1, - frameon=True, - framealpha=0.85, - edgecolor="none", - borderaxespad=0.4, - ) - - -# ── Combined figure ─────────────────────────────────────────────────────────── - - -def plot_combined( - parquet_path: str, - # out_dir: str = "exp_outputs/summary/plots/folds", - out_dir: str = "exp_outputs/summary_backup/visualization_plots/folds", -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - run_df = _load_left_data(parquet_path) - prep_df, stats_df = _load_right_data(parquet_path) - - # Determine shared x-order from the union of present dataset-tasks - all_labels = set(run_df["dataset_task"].unique()) | set( - prep_df["dataset_task"].unique() - ) - order = ordered_dataset_task_labels_from_combos(list(all_labels), COMBOS) - if not order: - raise RuntimeError("No dataset-task labels for combined plot") - - # Figure: two panels, 2:1 width ratio, shared y-axis - fig = plt.figure(figsize=MICCAI_DOUBLE_COLUMN_FIGSIZE) - gs = gridspec.GridSpec(1, 2, width_ratios=[2, 1], wspace=0.08) - ax_left = fig.add_subplot(gs[0]) - ax_right = fig.add_subplot(gs[1], sharey=ax_left) - - _draw_left(ax_left, run_df, order) - _draw_right(ax_right, prep_df, stats_df, order) - - # Shared y-axis: label + ticks on left; ticks visible on right, no label - ax_left.set_ylim(0.0, 1.08) - ax_left.set_ylabel(Y_LABEL) - ax_right.yaxis.set_tick_params( - which="both", labelleft=True, labelright=False, length=0, pad=2 - ) - ax_right.yaxis.tick_left() - ax_right.set_ylabel("") - - for ax in (ax_left, ax_right): - ax.set_xlabel("") - ax.grid(axis="y", linestyle="--", alpha=0.3) - ax.grid(axis="x", visible=False) - sns.despine(ax=ax_left, top=True, right=True) - sns.despine(ax=ax_right, top=True, right=True, left=False) - - fig.savefig(out_path / "combined_model_vs_prep.pdf", dpi=300, bbox_inches="tight") - plt.close(fig) - return out_path - - -# ── CLI ─────────────────────────────────────────────────────────────────────── - - -def main() -> None: - parser = argparse.ArgumentParser( - description="Combined model-family vs preprocessing-sensitivity figure" - ) - parser.add_argument( - "--input", - default="exp_outputs/summary_backup/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary_backup/visualization_plots/folds", - help="Output directory", - ) - args = parser.parse_args() - out_path = plot_combined(args.input, args.outdir) - print("Saved combined plot to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/config.py b/scripts/visualization_backup/config.py deleted file mode 100644 index a52683d2..00000000 --- a/scripts/visualization_backup/config.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import annotations - -import matplotlib as mpl -import seaborn as sns - -# Approximate useful figure widths for MICCAI/LNCS papers. -MICCAI_SINGLE_COLUMN_FIGSIZE = (3.4, 2.4) -MICCAI_DOUBLE_COLUMN_FIGSIZE = (7.5, 2.5) - -MICCAI_MPL_PARAMS = { - "figure.dpi": 120, - "figure.figsize": MICCAI_DOUBLE_COLUMN_FIGSIZE, - "savefig.dpi": 300, - "savefig.bbox": "tight", - "savefig.pad_inches": 0.03, - "font.family": "serif", - "font.serif": ["Times New Roman", "Times", "Nimbus Roman", "DejaVu Serif"], - "font.size": 9, - "axes.titlesize": 10, - "axes.labelsize": 9, - "figure.titlesize": 10, - "figure.labelsize": 9, - "axes.linewidth": 0.8, - "axes.grid": True, - "grid.alpha": 0.25, - "grid.linewidth": 0.6, - "legend.fontsize": 8, - "legend.frameon": False, - "xtick.labelsize": 8, - "ytick.labelsize": 8, - "xtick.major.size": 3, - "ytick.major.size": 3, - "lines.linewidth": 1.2, - "lines.markersize": 4, - "mathtext.fontset": "stix", - "pdf.fonttype": 42, - "ps.fonttype": 42, -} - - -def apply_miccai_style() -> None: - """Apply a publication-oriented style for MICCAI figures.""" - sns.set_theme(style="whitegrid", context="paper") - mpl.rcParams.update(MICCAI_MPL_PARAMS) diff --git a/scripts/visualization_backup/delta_to_linear_plot.py b/scripts/visualization_backup/delta_to_linear_plot.py deleted file mode 100644 index 9fb942ae..00000000 --- a/scripts/visualization_backup/delta_to_linear_plot.py +++ /dev/null @@ -1,323 +0,0 @@ -from __future__ import annotations - -import argparse -import warnings -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd -import seaborn as sns -from matplotlib.lines import Line2D - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from utils import ( - MODEL_DISPLAY_ORDER, - MODEL_FAMILY_ORDER, - add_score_raw_from_prefix, - aggregate_run_scores, - choose_spread_metric, - clean_target, - filter_combos, - format_label, - make_dataset_task_label, - map_model_display_group, - map_model_family, - normalize_score, - ordered_dataset_task_labels_from_combos, -) - -from config import MICCAI_DOUBLE_COLUMN_FIGSIZE, apply_miccai_style - -DELTA_COMBOS = [ - ("hcp", "Gender", "binary_classification"), - ("camcan", "Gender", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] -DELTA_FEATURES = {"md", "mk", "sh", "b0"} -DELTA_TISSUES = {"white", "gray"} - -PLOT_TITLE = "Deep features vs linear baseline (score by dataset-task)" -PLOT_SUBTITLE = "Diamond = median per model group · Black segment = median(Linear) within each dataset-task" - -FAMILY_COLORS = { - "Linear": "#4C78A8", - "RandomForest": "#59A14F", - "medicalnet": "#E15759", - "dinov2": "#F28E2B", - "curia": "#B07AA1", -} -FAMILY_LABELS = { - "Linear": "Linear", - "RandomForest": "Random forest", - "medicalnet": "medicalnet", - "dinov2": "dinov2", - "curia": "curia", -} - - -def _load_scope(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, DELTA_COMBOS) - df = df[df["primary_metric"].isin(DELTA_FEATURES)] - df = df[df["tissue_type"].isin(DELTA_TISSUES)] - df["model_family"] = df["model_name"].map(map_model_family) - df = df[df["model_family"].notna()].copy() - if df.empty: - raise RuntimeError("No rows left after applying delta-to-linear scope filters") - return df - - -def _compute_normalized_run_scores(df: pd.DataFrame) -> pd.DataFrame: - parts: list[pd.DataFrame] = [] - for (_, _, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"], dropna=False - ): - fold_prefix, _metric_label = choose_spread_metric(group, task) - part = add_score_raw_from_prefix(group, fold_prefix) - part = part[part["score_raw"].notna()].copy() - if not part.empty: - parts.append(part) - if not parts: - raise RuntimeError("No valid task metrics found for delta-to-linear plot") - - score_df = pd.concat(parts, ignore_index=True) - score_df["score_norm"] = score_df.apply(normalize_score, axis=1) - score_df = score_df[score_df["score_norm"].notna()].copy() - if score_df.empty: - raise RuntimeError("No normalized scores available for delta-to-linear plot") - - run_df = aggregate_run_scores(score_df, score_col="score_norm") - run_df["dataset_task"] = run_df.apply( - lambda r: make_dataset_task_label(r["dataset"], r["target_clean"]), - axis=1, - ) - run_df = run_df[run_df["model_family"].isin(MODEL_FAMILY_ORDER)].copy() - run_df["model_display"] = run_df["model_name"].map(map_model_display_group) - run_df = run_df[run_df["model_display"].isin(MODEL_DISPLAY_ORDER)].copy() - if run_df.empty: - raise RuntimeError("No per-run scores available after run-level aggregation") - return run_df - - -def _attach_linear_reference(run_df: pd.DataFrame) -> pd.DataFrame: - linear_ref = ( - run_df[run_df["model_family"] == "Linear"] - .groupby("dataset_task", dropna=False)["score_norm_run"] - .median() - ) - missing = [ - label - for label in run_df["dataset_task"].unique().tolist() - if label not in linear_ref.index - ] - if missing: - missing_fmt = ", ".join(sorted(missing)) - warnings.warn( - f"Dropping dataset-task without Linear rows: {missing_fmt}", - stacklevel=2, - ) - - kept_labels = set(linear_ref.index.tolist()) - run_df = run_df[run_df["dataset_task"].isin(kept_labels)].copy() - if run_df.empty: - raise RuntimeError( - "No dataset-task left after dropping groups without Linear runs" - ) - - run_df["linear_ref"] = run_df["dataset_task"].map(linear_ref) - return run_df - - -def _plot_delta_to_linear(run_df: pd.DataFrame, output_file: Path) -> None: - order = ordered_dataset_task_labels_from_combos( - run_df["dataset_task"].unique().tolist(), DELTA_COMBOS - ) - if not order: - raise RuntimeError("No dataset-task labels available for plotting") - - GROUP_SPACING = 1.6 - task_to_x = {label: idx * GROUP_SPACING for idx, label in enumerate(order)} - pretty_labels = [format_label(label) for label in order] - family_offsets = { - "Linear": -0.40, - "RandomForest": -0.20, - "medicalnet": 0.0, - "dinov2": 0.20, - "curia": 0.40, - } - - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - fig_w = max(base_w, 1.55 * len(order) * GROUP_SPACING + 0.6) - fig_h = max(base_h, 3.1) - fig, ax = plt.subplots(figsize=(fig_w, fig_h)) - - rng = np.random.default_rng(7) - for family in MODEL_DISPLAY_ORDER: - sub = run_df[run_df["model_display"] == family] - if sub.empty: - continue - x_base = sub["dataset_task"].map(task_to_x).astype(float).to_numpy() - jitter = rng.normal(loc=0.0, scale=0.04, size=sub.shape[0]) - x = x_base + family_offsets[family] + jitter - alpha = 0.25 if family == "Linear" else 0.8 - ax.scatter( - x, - sub["score_norm_run"].to_numpy(dtype=float), - s=22, - c=FAMILY_COLORS[family], - alpha=alpha, - edgecolors="white", - linewidths=0.35, - zorder=3, - ) - - for family in MODEL_DISPLAY_ORDER: - sub = run_df[run_df["model_display"] == family] - if sub.empty: - continue - color = FAMILY_COLORS[family] - for task_label, x_center in task_to_x.items(): - vals = ( - sub.loc[sub["dataset_task"] == task_label, "score_norm_run"] - .dropna() - .to_numpy(dtype=float) - ) - if len(vals) == 0: - continue - x_pos = x_center + family_offsets[family] - if len(vals) >= 3: - parts = ax.violinplot( - vals, - positions=[x_pos], - widths=0.22, - showmeans=False, - showmedians=False, - showextrema=False, - ) - for pc in parts["bodies"]: - pc.set_facecolor(color) - pc.set_edgecolor("white") - pc.set_alpha(0.55) - pc.set_linewidth(0.5) - pc.set_zorder(4) - median_val = float(np.median(vals)) - ax.scatter( - [x_pos], - [median_val], - marker="D", - s=16, - color=color, - edgecolors="black", - linewidths=0.35, - zorder=5, - ) - - for task_label, x_center in task_to_x.items(): - ref_vals = run_df.loc[run_df["dataset_task"] == task_label, "linear_ref"] - if ref_vals.empty: - continue - y_ref = float(ref_vals.iloc[0]) - ax.hlines( - y=y_ref, - xmin=x_center - 0.53, - xmax=x_center + 0.53, - colors="#1f1f1f", - linewidth=1.15, - alpha=0.9, - zorder=2, - ) - - ax.set_ylim(0.0, 1.0) - ax.set_xlim(-0.65, (len(order) - 1) * GROUP_SPACING + 0.65) - ax.set_xticks([i * GROUP_SPACING for i in range(len(order))]) - ax.set_xticklabels(pretty_labels, rotation=24, ha="right") - ax.set_xlabel("") - ax.set_ylabel(r"Score (min-max, dummy$\,{=}\,0$ to perfect$\,{=}\,1$)") - ax.set_title(PLOT_TITLE, pad=18) - ax.text( - 0.01, - 1.02, - PLOT_SUBTITLE, - transform=ax.transAxes, - fontsize=8, - ha="left", - va="bottom", - color="#444444", - ) - - legend_handles = [ - Line2D( - [0], - [0], - marker="o", - linestyle="", - markerfacecolor=FAMILY_COLORS[family], - markeredgecolor="white", - markeredgewidth=0.4, - markersize=6, - alpha=0.35 if family == "Linear" else 0.9, - label=FAMILY_LABELS[family], - ) - for family in MODEL_DISPLAY_ORDER - if family in run_df["model_display"].unique() - ] - ax.legend( - handles=legend_handles, - loc="upper center", - bbox_to_anchor=(0.5, 0.99), - ncol=len(legend_handles), - frameon=False, - borderaxespad=0.2, - ) - - ax.grid(axis="y", linestyle="--", alpha=0.3) - ax.grid(axis="x", visible=False) - sns.despine(ax=ax, top=True, right=True) - - fig.tight_layout(rect=(0.0, 0.0, 1.0, 1.0)) - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def plot_delta_to_linear( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_scope(parquet_path) - run_df = _compute_normalized_run_scores(df) - run_df = _attach_linear_reference(run_df) - - _plot_delta_to_linear(run_df, out_path / "deep_vs_linear_delta.pdf") - return out_path - - -def main() -> None: - parser = argparse.ArgumentParser( - description="Plot delta-to-linear effect sizes by dataset-task" - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/folds", - help="Output directory", - ) - args = parser.parse_args() - - out_path = plot_delta_to_linear(args.input, args.outdir) - print("Saved delta-to-linear plot to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/feature_benefit_heatmap.py b/scripts/visualization_backup/feature_benefit_heatmap.py deleted file mode 100644 index 6a34a052..00000000 --- a/scripts/visualization_backup/feature_benefit_heatmap.py +++ /dev/null @@ -1,604 +0,0 @@ -""" -feature_benefit_heatmap.py -========================== - -Heatmap answering: "For each dataset-task and feature, how many models exhibit -a consistent improvement vs b0?" - -Two side-by-side panels: - Left — p-value method (one-sample t-test on cluster means, p < 0.05 & mean > 0) - Right — robustness rule (median Δ ≥ epsilon AND frac_positive ≥ tau) - -See docstring of `plot_feature_benefit_heatmap` for full pipeline description. -""" - -from __future__ import annotations - -import argparse -import warnings -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd -from scipy.stats import false_discovery_control, ttest_1samp - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -import seaborn as sns -from utils import ( - choose_spread_metric, - clean_target, - filter_combos, - fold_columns, - map_model_family, - normalize_score, -) - -from config import MICCAI_DOUBLE_COLUMN_FIGSIZE, apply_miccai_style - -# --------------------------------------------------------------------------- -# Constants -# --------------------------------------------------------------------------- - -FEATURE_DELTA_COMBOS = [ - ("hcp", "Gender", "binary_classification"), - ("camcan", "Gender", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] -FEATURE_DELTA_TISSUES = {"white", "gray"} -FEATURE_PREFERRED_ORDER = ["md", "mk", "sh"] -FEATURE_EXCLUDE = {"rtop"} - -# Robustness-rule thresholds -EPSILON: float = 0.03 # minimum median delta to count as benefit -TAU: float = 0.80 # minimum fraction of positive-delta folds - -PVALUE_THRESHOLD: float = 0.05 - -HEATMAP_CMAP = "Blues" - -TITLE_MAIN = ( - "Proportion of models consistently improving over b0, per feature and dataset-task" -) -TITLE_LEFT = "Statistical criterion\n(t-test, p<0.05 & mean\u0394>0)" -TITLE_RIGHT = "Practical criterion\n(med.\u0394\u2265{EPSILON}, \u2265{TAU:.0%} folds positive)".format( - EPSILON=EPSILON, TAU=TAU -) - - -# --------------------------------------------------------------------------- -# Step 0: data loading (individual models, no family grouping) -# --------------------------------------------------------------------------- - - -def _load_scope(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, FEATURE_DELTA_COMBOS) - df = df[df["tissue_type"].isin(FEATURE_DELTA_TISSUES)].copy() - df["model_family"] = df["model_name"].map(map_model_family) - df = df[df["model_family"].notna()].copy() # drop dummies - if df.empty: - raise RuntimeError("No rows after scope filters") - return df - - -# --------------------------------------------------------------------------- -# Step 1: fold-level paired deltas -# --------------------------------------------------------------------------- - - -def _extract_fold_scores(df: pd.DataFrame) -> pd.DataFrame: - parts: list[pd.DataFrame] = [] - for (dataset, target, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"], dropna=False - ): - try: - fold_prefix, _ = choose_spread_metric(group, task) - except (RuntimeError, ValueError): - continue - f_cols = fold_columns(group, fold_prefix) - if not f_cols: - continue - for col in f_cols: - fold_idx = int(col.replace(fold_prefix, "")) - part = group[ - [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "primary_metric", - ] - ].copy() - part["fold_index"] = fold_idx - part["score_raw"] = pd.to_numeric(group[col], errors="coerce") - parts.append(part) - - if not parts: - raise RuntimeError("No fold-level rows found") - - fold_df = pd.concat(parts, ignore_index=True) - fold_df = fold_df[fold_df["score_raw"].notna()].copy() - fold_df["score_norm"] = fold_df.apply(normalize_score, axis=1) - return fold_df[fold_df["score_norm"].notna()].copy() - - -def _build_delta_df(fold_df: pd.DataFrame) -> pd.DataFrame: - key_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "fold_index", - "primary_metric", - ] - dedup = fold_df.groupby(key_cols, dropna=False, as_index=False).agg( - score_norm=("score_norm", "mean") - ) - - base_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "fold_index", - ] - wide = ( - dedup.pivot_table( - index=base_cols, - columns="primary_metric", - values="score_norm", - aggfunc="mean", - ) - .reset_index() - .copy() - ) - if "b0" not in wide.columns: - raise RuntimeError( - "Feature 'b0' missing after pivot — cannot build paired deltas" - ) - - wide = wide[wide["b0"].notna()].copy() - feature_cols = [ - c - for c in wide.columns - if c not in set(base_cols + ["b0"]) and c not in FEATURE_EXCLUDE - ] - feature_cols = _ordered_features(feature_cols) - if not feature_cols: - raise RuntimeError("No non-b0 features available after filtering") - - delta_df = wide.melt( - id_vars=base_cols + ["b0"], - value_vars=feature_cols, - var_name="feature", - value_name="feature_score", - ) - delta_df = delta_df[delta_df["feature_score"].notna()].copy() - delta_df["delta"] = delta_df["feature_score"] - delta_df["b0"] - return delta_df[base_cols + ["feature", "delta"]].copy() - - -def _ordered_features(features: list[str]) -> list[str]: - seen = set(features) - ordered = [f for f in FEATURE_PREFERRED_ORDER if f in seen] - ordered.extend(sorted(f for f in features if f not in ordered)) - return ordered - - -# --------------------------------------------------------------------------- -# Step 2: benefit flags per (dataset-task, tissue, model, feature) -# --------------------------------------------------------------------------- - - -def _benefit_flags(delta_df: pd.DataFrame) -> pd.DataFrame: - """Return one row per (dataset, target_clean, prediction_task, tissue_type, - model_name, feature) with columns benefit_pvalue and benefit_robust.""" - rows: list[dict] = [] - - group_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "feature", - ] - for keys, grp in delta_df.groupby(group_cols, dropna=False): - deltas = grp["delta"].to_numpy(dtype=float) - deltas = deltas[np.isfinite(deltas)] - if deltas.size == 0: - continue - - # --- raw p-value (thresholding deferred until after FDR correction) --- - raw_pvalue = float("nan") - if deltas.size >= 2: - res = ttest_1samp(deltas, popmean=0.0, nan_policy="omit") - if np.isfinite(res.pvalue): - raw_pvalue = float(res.pvalue) - - # --- robustness rule (no correction needed) --- - median_delta = float(np.median(deltas)) - frac_positive = float(np.mean(deltas > 0)) - benefit_robust = int(median_delta >= EPSILON and frac_positive >= TAU) - - row = dict(zip(group_cols, keys)) - row["n_folds"] = int(deltas.size) - row["mean_delta"] = float(deltas.mean()) - row["median_delta"] = median_delta - row["frac_positive"] = frac_positive - row["raw_pvalue"] = raw_pvalue # BH correction applied in _collapse_across_models - row["benefit_pvalue"] = 0 # filled after FDR correction - row["benefit_robust"] = benefit_robust - rows.append(row) - - if not rows: - return pd.DataFrame(rows) - - return pd.DataFrame(rows) - - -# --------------------------------------------------------------------------- -# Step 3: collapse across models -# --------------------------------------------------------------------------- - - -def _collapse_across_models(flags_df: pd.DataFrame) -> pd.DataFrame: - """Aggregate benefit flags across models for each (dataset-task, feature). - - Tissue types are collapsed first (most significant p across tissues per model), - then BH FDR correction is applied across the ~(n_dataset_tasks × n_models × n_features) - per-model cells that directly feed into the heatmap — a much smaller correction - pool than the raw ~360 (tissue × model × feature × dataset) tests. - A model is then counted as benefiting if its BH-adjusted p < threshold and mean Δ > 0. - """ - # Per model: take most significant p-value and max robust benefit across tissues - per_model = flags_df.groupby( - ["dataset", "target_clean", "prediction_task", "model_name", "feature"], - dropna=False, - as_index=False, - ).agg( - mean_delta=("mean_delta", "mean"), - raw_pvalue=("raw_pvalue", "min"), # most significant p across tissues - benefit_robust=("benefit_robust", "max"), - ) - - # --- Apply BH across the per-model × feature × dataset-task cells --- - finite_mask = per_model["raw_pvalue"].notna() & np.isfinite(per_model["raw_pvalue"]) - per_model["adjusted_pvalue"] = float("nan") - if finite_mask.any(): - adjusted = false_discovery_control( - per_model.loc[finite_mask, "raw_pvalue"].to_numpy(dtype=float), - method="bh", - ) - per_model.loc[finite_mask, "adjusted_pvalue"] = adjusted - - per_model["benefit_pvalue"] = ( - (per_model["adjusted_pvalue"] < PVALUE_THRESHOLD) & (per_model["mean_delta"] > 0) - ).astype(int) - - per_model = per_model.drop(columns=["raw_pvalue", "adjusted_pvalue", "mean_delta"]) - - agg = per_model.groupby( - ["dataset", "target_clean", "prediction_task", "feature"], - dropna=False, - as_index=False, - ).agg( - n_models_total=("model_name", "nunique"), - n_models_pvalue=("benefit_pvalue", "sum"), - n_models_robust=("benefit_robust", "sum"), - ) - - agg["prop_pvalue"] = agg["n_models_pvalue"] / agg["n_models_total"] - agg["prop_robust"] = agg["n_models_robust"] / agg["n_models_total"] - agg["row_label"] = agg["dataset"].str.upper() + " – " + agg["target_clean"] - return agg - - -def _merge_gender_rows(agg: pd.DataFrame) -> pd.DataFrame: - """Pool HCP–Gender and CamCAN–Gender into a single combined row. - - Raw counts (n_models_pvalue, n_models_robust, n_models_total) are summed - across the two datasets so the annotation fractions reflect the full - combined model pool. Proportions are then recomputed from the pooled counts. - """ - gender_mask = agg["target_clean"] == "Gender" - gender_rows = agg[gender_mask].copy() - other_rows = agg[~gender_mask].copy() - - if gender_rows.empty: - return agg - - pooled = gender_rows.groupby("feature", dropna=False, as_index=False).agg( - n_models_total=("n_models_total", "sum"), - n_models_pvalue=("n_models_pvalue", "sum"), - n_models_robust=("n_models_robust", "sum"), - ) - pooled["prop_pvalue"] = pooled["n_models_pvalue"] / pooled["n_models_total"] - pooled["prop_robust"] = pooled["n_models_robust"] / pooled["n_models_total"] - pooled["row_label"] = "Gender (HCP+CamCAN)" - pooled["target_clean"] = "Gender" - pooled["dataset"] = "hcp+camcan" - pooled["prediction_task"] = "binary_classification" - - return pd.concat([other_rows, pooled], ignore_index=True) - - -# --------------------------------------------------------------------------- -# Step 4: sort rows and columns -# --------------------------------------------------------------------------- - - -def _sort_heatmap(agg: pd.DataFrame) -> tuple[list[str], list[str]]: - # Row order: descending total robust signal - row_strength = ( - agg.groupby("row_label")["prop_robust"].sum().sort_values(ascending=True) - ) - row_order = row_strength.index.tolist() # weakest first → bottom = strongest - - # Column order: descending total robust signal - col_strength = ( - agg.groupby("feature")["prop_robust"].sum().sort_values(ascending=False) - ) - col_order = _ordered_features(col_strength.index.tolist()) - - return row_order, col_order - - -# --------------------------------------------------------------------------- -# Step 5: visualisation -# --------------------------------------------------------------------------- - - -def _pivot_for_heatmap( - agg: pd.DataFrame, value_col: str, row_order: list[str], col_order: list[str] -) -> pd.DataFrame: - pivot = agg.pivot_table( - index="row_label", columns="feature", values=value_col, aggfunc="mean" - ) - pivot = pivot.reindex(index=row_order, columns=col_order) - return pivot - - -def _annot_fraction( - agg: pd.DataFrame, row_order: list[str], col_order: list[str] -) -> pd.DataFrame: - """Build annotation matrix showing the percentage of models benefiting (p-value criterion).""" - num = agg.pivot_table( - index="row_label", columns="feature", values="n_models_pvalue", aggfunc="sum" - ) - den = agg.pivot_table( - index="row_label", columns="feature", values="n_models_total", aggfunc="max" - ) - num = num.reindex(index=row_order, columns=col_order) - den = den.reindex(index=row_order, columns=col_order) - pct = (num / den * 100).round(0).astype("Int64") - annot = pct.astype(str) + "%" - annot = annot.where(num.notna(), other="") - return annot - - -def _annot_fraction_robust( - agg: pd.DataFrame, row_order: list[str], col_order: list[str] -) -> pd.DataFrame: - """Build annotation matrix showing the percentage of models benefiting (robustness criterion).""" - num = agg.pivot_table( - index="row_label", columns="feature", values="n_models_robust", aggfunc="sum" - ) - den = agg.pivot_table( - index="row_label", columns="feature", values="n_models_total", aggfunc="max" - ) - num = num.reindex(index=row_order, columns=col_order) - den = den.reindex(index=row_order, columns=col_order) - pct = (num / den * 100).round(0).astype("Int64") - annot = pct.astype(str) + "%" - annot = annot.where(num.notna(), other="") - return annot - - -def _draw_heatmap( - ax: plt.Axes, - data: pd.DataFrame, - annot: pd.DataFrame, - title: str, - show_yticklabels: bool, - show_cbar: bool, -) -> None: - import matplotlib as mpl - - fs_base = mpl.rcParams["font.size"] # 9 - fs_title = mpl.rcParams["axes.titlesize"] # 10 - fs_label = mpl.rcParams["axes.labelsize"] # 9 - fs_tick = mpl.rcParams["xtick.labelsize"] # 8 - - # Gray for missing cells; "N/A" annotation - cmap = plt.get_cmap(HEATMAP_CMAP).copy() - cmap.set_bad(color="#b0b0b0") - annot_values = annot.copy() - annot_values[data.isna()] = "N/A" - - sns.heatmap( - data, - ax=ax, - vmin=0.0, - vmax=1.0, - cmap=cmap, - annot=annot_values.values, - fmt="", - square=False, - linewidths=0.5, - linecolor="#cccccc", - cbar=show_cbar, - cbar_kws=( - {"shrink": 0.75, "label": "Prop. models benefiting", "format": "%.1f"} - if show_cbar - else {} - ), - annot_kws={"size": fs_base}, - ) - ax.set_title(title, pad=2, fontsize=fs_title) - ax.set_xlabel("", labelpad=4) - ax.set_ylabel("", labelpad=4) - ax.tick_params(axis="x", rotation=30, labelsize=fs_tick) - if show_yticklabels: - ax.tick_params(axis="y", rotation=0, labelsize=fs_tick) - else: - ax.set_yticklabels([]) - ax.tick_params(axis="y", left=False) - if show_cbar and ax.collections: - cbar = ax.collections[0].colorbar - if cbar is not None: - cbar.ax.tick_params(labelsize=fs_tick) - cbar.set_label("Prop. models benefiting", fontsize=fs_label) - - -def _plot_heatmaps(agg: pd.DataFrame, out_file: Path, n_models_total: int) -> None: - import matplotlib as mpl - - fs_title = mpl.rcParams["figure.titlesize"] # 10 - - row_order, col_order = _sort_heatmap(agg) - - pivot_pvalue = _pivot_for_heatmap(agg, "prop_pvalue", row_order, col_order) - pivot_robust = _pivot_for_heatmap(agg, "prop_robust", row_order, col_order) - - annot_pvalue = _annot_fraction(agg, row_order, col_order) - annot_robust = _annot_fraction_robust(agg, row_order, col_order) - - # Enforce publication target size from config (double-column layout). - fig, axes = plt.subplots(1, 2, figsize=MICCAI_DOUBLE_COLUMN_FIGSIZE) - - _draw_heatmap( - axes[0], - pivot_pvalue, - annot_pvalue, - title=TITLE_LEFT, - show_yticklabels=True, - show_cbar=False, - ) - _draw_heatmap( - axes[1], - pivot_robust, - annot_robust, - title=TITLE_RIGHT, - show_yticklabels=False, - show_cbar=True, - ) - - fig.suptitle(TITLE_MAIN, y=1.01, fontsize=fs_title, fontweight="bold") - - fig.tight_layout() - fig.savefig(out_file, dpi=300, bbox_inches="tight") - plt.close(fig) - - -# --------------------------------------------------------------------------- -# Public entry point -# --------------------------------------------------------------------------- - - -def plot_feature_benefit_heatmap( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/features", - merge_gender: bool = True, -) -> Path: - """Full pipeline: load → deltas → benefit flags → aggregate → plot.""" - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_scope(parquet_path) - fold_df = _extract_fold_scores(df) - delta_df = _build_delta_df(fold_df) - - flags_df = _benefit_flags(delta_df) - if flags_df.empty: - raise RuntimeError("No benefit flags computed — check delta pipeline") - - agg = _collapse_across_models(flags_df) - - if merge_gender: - agg = _merge_gender_rows(agg) - - n_models_total = int(agg["n_models_total"].max()) - - # Sanity: warn if n_models_total varies - model_count_range = agg["n_models_total"].agg(["min", "max"]) - if model_count_range["max"] - model_count_range["min"] > 2: - warnings.warn( - f"n_models_total varies: {model_count_range['min']}–{model_count_range['max']}. " - "Some model/feature combinations may be missing.", - stacklevel=2, - ) - - out_file = out_path / "feature_benefit_heatmap.pdf" - _plot_heatmaps(agg, out_file, n_models_total) - return out_path - - -# --------------------------------------------------------------------------- -# CLI -# --------------------------------------------------------------------------- - - -def main() -> None: - parser = argparse.ArgumentParser( - description=( - "Heatmap: for each dataset-task × feature, proportion of models " - "that consistently improve over b0." - ) - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/features", - help="Output directory", - ) - parser.add_argument( - "--epsilon", - type=float, - default=EPSILON, - help=f"Minimum median delta for robustness rule (default {EPSILON})", - ) - parser.add_argument( - "--tau", - type=float, - default=TAU, - help=f"Minimum fraction of positive-delta folds (default {TAU})", - ) - parser.add_argument( - "--no-merge-gender", - action="store_true", - help=( - "Keep HCP–Gender and CamCAN–Gender as separate rows " - "(by default they are merged into 'Gender (HCP+CamCAN)')." - ), - ) - args = parser.parse_args() - - # Allow CLI overrides of thresholds - import feature_benefit_heatmap as _self - - _self.EPSILON = args.epsilon - _self.TAU = args.tau - - out_path = plot_feature_benefit_heatmap( - args.input, - args.outdir, - merge_gender=not args.no_merge_gender, - ) - print("Saved feature benefit heatmap to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/feature_benefit_heatmap_all_tissues_folds.py b/scripts/visualization_backup/feature_benefit_heatmap_all_tissues_folds.py deleted file mode 100644 index 073f6f24..00000000 --- a/scripts/visualization_backup/feature_benefit_heatmap_all_tissues_folds.py +++ /dev/null @@ -1,557 +0,0 @@ -""" -feature_benefit_heatmap_all_tissues_folds.py -============================================ - -Heatmap answering: "For each dataset-task and feature, how many models improve -over b0 under a robustness criterion, shown separately for gray and white matter?" - -Two side-by-side panels: - Left — gray matter robustness - Right — white matter robustness -""" - -from __future__ import annotations - -import argparse -import warnings -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -import seaborn as sns - -from config import MICCAI_DOUBLE_COLUMN_FIGSIZE, MICCAI_MPL_PARAMS, apply_miccai_style -from utils import ( - choose_spread_metric, - clean_target, - filter_combos, - fold_columns, - map_model_family, - normalize_score, -) - -# --------------------------------------------------------------------------- -# Constants -# --------------------------------------------------------------------------- - -FEATURE_DELTA_COMBOS = [ - ("hcp", "Sex", "binary_classification"), - ("camcan", "Sex", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] -FEATURE_DELTA_TISSUES = {"white", "gray"} -FEATURE_PREFERRED_ORDER = ["md", "mk", "sh"] -FEATURE_EXCLUDE = {"rtop"} - -EPSILON: float = 0.05 -TAU: float = 0.80 - -HEATMAP_CMAP = "Blues" - -TITLE_MAIN = "Model benefit over b0 per feature and dataset-task by tissue" - - -# --------------------------------------------------------------------------- -# Step 0: data loading -# --------------------------------------------------------------------------- - - -def _load_scope(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, FEATURE_DELTA_COMBOS) - df = df[df["tissue_type"].isin(FEATURE_DELTA_TISSUES)].copy() - df["model_family"] = df["model_name"].map(map_model_family) - df = df[df["model_family"].notna()].copy() - if df.empty: - raise RuntimeError("No rows after scope filters") - return df - - -# --------------------------------------------------------------------------- -# Step 1: fold-level paired deltas -# --------------------------------------------------------------------------- - - -def _extract_fold_scores(df: pd.DataFrame) -> pd.DataFrame: - parts: list[pd.DataFrame] = [] - for (dataset, target, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"], dropna=False - ): - try: - fold_prefix, _ = choose_spread_metric(group, task) - except (RuntimeError, ValueError): - continue - f_cols = fold_columns(group, fold_prefix) - if not f_cols: - continue - for col in f_cols: - fold_idx = int(col.replace(fold_prefix, "")) - part = group[ - [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "primary_metric", - ] - ].copy() - part["fold_index"] = fold_idx - part["score_raw"] = pd.to_numeric(group[col], errors="coerce") - parts.append(part) - - if not parts: - raise RuntimeError("No fold-level rows found") - - fold_df = pd.concat(parts, ignore_index=True) - fold_df = fold_df[fold_df["score_raw"].notna()].copy() - fold_df["score_norm"] = fold_df.apply(normalize_score, axis=1) - return fold_df[fold_df["score_norm"].notna()].copy() - - -def _ordered_features(features: list[str]) -> list[str]: - seen = set(features) - ordered = [f for f in FEATURE_PREFERRED_ORDER if f in seen] - ordered.extend(sorted(f for f in features if f not in ordered)) - return ordered - - -def _build_delta_df(fold_df: pd.DataFrame) -> pd.DataFrame: - key_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "fold_index", - "primary_metric", - ] - dedup = fold_df.groupby(key_cols, dropna=False, as_index=False).agg( - score_norm=("score_norm", "mean") - ) - - base_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "fold_index", - ] - wide = ( - dedup.pivot_table( - index=base_cols, - columns="primary_metric", - values="score_norm", - aggfunc="mean", - ) - .reset_index() - .copy() - ) - if "b0" not in wide.columns: - raise RuntimeError("Feature 'b0' missing after pivot") - - wide = wide[wide["b0"].notna()].copy() - feature_cols = [ - c - for c in wide.columns - if c not in set(base_cols + ["b0"]) and c not in FEATURE_EXCLUDE - ] - feature_cols = _ordered_features(feature_cols) - if not feature_cols: - raise RuntimeError("No non-b0 features available after filtering") - - delta_df = wide.melt( - id_vars=base_cols + ["b0"], - value_vars=feature_cols, - var_name="feature", - value_name="feature_score", - ) - delta_df = delta_df[delta_df["feature_score"].notna()].copy() - delta_df["delta"] = delta_df["feature_score"] - delta_df["b0"] - return delta_df[ - [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "fold_index", - "feature", - "delta", - ] - ].copy() - - -# --------------------------------------------------------------------------- -# Step 2: per-model robustness flags within each tissue (across folds) -# --------------------------------------------------------------------------- - - -def _per_model_robust_stats(delta_df: pd.DataFrame) -> pd.DataFrame: - rows: list[dict] = [] - group_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "feature", - ] - for keys, grp in delta_df.groupby(group_cols, dropna=False): - deltas = grp["delta"].to_numpy(dtype=float) - deltas = deltas[np.isfinite(deltas)] - if deltas.size == 0: - continue - - median_delta = float(np.median(deltas)) - frac_positive = float(np.mean(deltas > 0)) - - row = dict(zip(group_cols, keys)) - row["n_obs"] = int(deltas.size) - row["median_delta"] = median_delta - row["frac_positive"] = frac_positive - row["benefit_robust"] = int(median_delta >= EPSILON and frac_positive >= TAU) - rows.append(row) - - if not rows: - return pd.DataFrame() - - return pd.DataFrame(rows) - - -# --------------------------------------------------------------------------- -# Step 3: collapse across models -# --------------------------------------------------------------------------- - -def _format_dataset_task_label(dataset: str, target: str) -> str: - """ - Returns canonical label: - dataset::target - dataset1|dataset2::target - Always lowercase. - """ - if dataset is None or target is None: - return "" - - dataset = str(dataset).lower().replace("+", "|") - target = str(target).lower() - - return f"{dataset}::{target}" - -def _collapse_across_models(per_model: pd.DataFrame) -> pd.DataFrame: - agg = per_model.groupby( - ["dataset", "target_clean", "prediction_task", "tissue_type", "feature"], - dropna=False, - as_index=False, - ).agg( - n_models_total=("model_name", "nunique"), - n_models_robust=("benefit_robust", "sum"), - ) - - agg["prop_robust"] = agg["n_models_robust"] / agg["n_models_total"] - # agg["row_label"] = agg["dataset"].str.upper() + " – " + agg["target_clean"] - agg["row_label"] = agg.apply( - lambda r: _format_dataset_task_label(r["dataset"], r["target_clean"]), - axis=1, - ) - return agg - - -def _merge_gender_rows(agg: pd.DataFrame) -> pd.DataFrame: - gender_mask = agg["target_clean"].str.lower() == "sex" - gender_rows = agg[gender_mask].copy() - other_rows = agg[~gender_mask].copy() - if gender_rows.empty: - return agg - - pooled = gender_rows.groupby( - ["tissue_type", "feature"], dropna=False, as_index=False - ).agg( - n_models_total=("n_models_total", "sum"), - n_models_robust=("n_models_robust", "sum"), - ) - pooled["prop_robust"] = pooled["n_models_robust"] / pooled["n_models_total"] - pooled["target_clean"] = "sex" - pooled["dataset"] = "hcp|camcan" - pooled["prediction_task"] = "binary_classification" - - pooled["row_label"] = pooled.apply( - lambda r: _format_dataset_task_label(r["dataset"], r["target_clean"]), - axis=1, - ) - pooled["prediction_task"] = "binary_classification" - return pd.concat([other_rows, pooled], ignore_index=True) - - -# --------------------------------------------------------------------------- -# Step 4: ordering and annotations -# --------------------------------------------------------------------------- - - -def _sort_heatmap(agg: pd.DataFrame) -> tuple[list[str], list[str]]: - row_strength = ( - agg.groupby("row_label")["prop_robust"].sum().sort_values(ascending=True) - ) - row_order = row_strength.index.tolist() - - col_strength = ( - agg.groupby("feature")["prop_robust"].sum().sort_values(ascending=False) - ) - col_order = _ordered_features(col_strength.index.tolist()) - return row_order, col_order - - -def _pivot_for_heatmap( - agg: pd.DataFrame, row_order: list[str], col_order: list[str] -) -> pd.DataFrame: - pivot = agg.pivot_table( - index="row_label", columns="feature", values="prop_robust", aggfunc="mean" - ) - return pivot.reindex(index=row_order, columns=col_order) - - -def _annot_fraction( - agg: pd.DataFrame, - row_order: list[str], - col_order: list[str], -) -> pd.DataFrame: - num = agg.pivot_table( - index="row_label", columns="feature", values="n_models_robust", aggfunc="sum" - ) - den = agg.pivot_table( - index="row_label", columns="feature", values="n_models_total", aggfunc="max" - ) - num = num.reindex(index=row_order, columns=col_order) - den = den.reindex(index=row_order, columns=col_order) - pct = (num / den * 100).round(0).astype("Int64") - annot = pct.astype(str) + "%" - return annot.where(num.notna(), other="") - - -# --------------------------------------------------------------------------- -# Step 5: plotting -# --------------------------------------------------------------------------- - - -def _draw_heatmap( - ax: plt.Axes, - data: pd.DataFrame, - annot: pd.DataFrame, - title: str, - show_yticklabels: bool, - show_cbar: bool, -) -> None: - cmap = plt.get_cmap(HEATMAP_CMAP).copy() - cmap.set_bad(color="#b0b0b0") - annot_values = annot.copy() - annot_values[data.isna()] = "N/A" - - sns.heatmap( - data, - ax=ax, - vmin=0.0, - vmax=1.0, - cmap=cmap, - annot=annot_values.values, - fmt="", - square=False, - linewidths=0.5, - linecolor="#cccccc", - cbar=show_cbar, - cbar_kws=( - {"shrink": 0.75, "label": "Prop. models benefiting", "format": "%.1f"} - if show_cbar - else {} - ), - annot_kws={"size": MICCAI_MPL_PARAMS["font.size"]}, - ) - ax.set_title(title, pad=2, fontsize=MICCAI_MPL_PARAMS["axes.titlesize"]) - ax.set_xlabel("") - ax.set_ylabel("") - ax.tick_params(axis="x", rotation=30, labelsize=MICCAI_MPL_PARAMS["xtick.labelsize"]) - if show_yticklabels: - ax.tick_params(axis="y", rotation=0, labelsize=MICCAI_MPL_PARAMS["ytick.labelsize"]) - else: - ax.set_yticklabels([]) - ax.tick_params(axis="y", left=False) - if show_cbar and ax.collections: - cbar = ax.collections[0].colorbar - if cbar is not None: - cbar.set_label("Prop. models benefiting", fontsize=MICCAI_MPL_PARAMS["axes.labelsize"]) - cbar.ax.tick_params(labelsize=MICCAI_MPL_PARAMS["xtick.labelsize"]) - - -def _robust_panel_title(tissue: str) -> str: - tissue_name = "Gray matter" if tissue == "gray" else "White matter" - return ( - f"{tissue_name} robustness\n" - f"(med.\u0394\u2265{EPSILON:g}, \u2265{TAU:.0%} positive)" - ) - - -def _plot_heatmaps(agg: pd.DataFrame, out_file: Path) -> None: - row_order, col_order = _sort_heatmap(agg) - - gray = agg[agg["tissue_type"] == "gray"].copy() - white = agg[agg["tissue_type"] == "white"].copy() - - pivot_gray = _pivot_for_heatmap(gray, row_order, col_order) - pivot_white = _pivot_for_heatmap(white, row_order, col_order) - annot_gray = _annot_fraction(gray, row_order, col_order) - annot_white = _annot_fraction(white, row_order, col_order) - - fig = plt.figure(figsize=MICCAI_DOUBLE_COLUMN_FIGSIZE) - gs = fig.add_gridspec(1, 3, width_ratios=[1.0, 1.0, 0.06], wspace=0.22) - ax_gray = fig.add_subplot(gs[0, 0]) - ax_white = fig.add_subplot(gs[0, 1]) - cax = fig.add_subplot(gs[0, 2]) - - _draw_heatmap( - ax_gray, - pivot_gray, - annot_gray, - title=_robust_panel_title("gray"), - show_yticklabels=True, - show_cbar=False, - ) - _draw_heatmap( - ax_white, - pivot_white, - annot_white, - title=_robust_panel_title("white"), - show_yticklabels=False, - show_cbar=False, - ) - - if ax_white.collections: - mappable = ax_white.collections[0] - cbar = fig.colorbar(mappable, cax=cax, format="%.1f") - cbar.set_label("Prop. models benefiting", fontsize=MICCAI_MPL_PARAMS["axes.labelsize"]) - cbar.ax.tick_params(labelsize=MICCAI_MPL_PARAMS["xtick.labelsize"]) - else: - cax.axis("off") - - # fig.subplots_adjust(left=0.09, right=0.97, bottom=0.16, top=0.76, wspace=0.22) - fig.suptitle(TITLE_MAIN, y=0.99, fontsize=MICCAI_MPL_PARAMS["figure.titlesize"] + 1, fontweight="bold") - - # fig.tight_layout(rect=[0, 0, 1, 0.9]) - - # Manually adjust margins to ensure content fits within figsize without bbox_inches='tight' - # Adjust top to leave space for title (previously 0.76 might be too low) - # Adjust bottom to leave space for rotated x-tick labels - fig.subplots_adjust(left=0.08, right=0.95, bottom=0.25, top=0.80, wspace=0.3) - - # Save with specific DPI and no bbox_inches to enforce exact figsize - fig.savefig(out_file, dpi=MICCAI_MPL_PARAMS["savefig.dpi"], bbox_inches=None) - plt.close(fig) - - -# --------------------------------------------------------------------------- -# Public entry point + CLI -# --------------------------------------------------------------------------- - - -def plot_feature_benefit_heatmap_robust_by_tissue( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/features", - merge_gender: bool = True, -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_scope(parquet_path) - fold_df = _extract_fold_scores(df) - delta_df = _build_delta_df(fold_df) - - per_model = _per_model_robust_stats(delta_df) - if per_model.empty: - raise RuntimeError("No per-model statistics computed") - - agg = _collapse_across_models(per_model) - if merge_gender: - agg = _merge_gender_rows(agg) - - model_count_range = agg["n_models_total"].agg(["min", "max"]) - if model_count_range["max"] - model_count_range["min"] > 2: - warnings.warn( - f"n_models_total varies: {model_count_range['min']}–{model_count_range['max']}. " - "Some model/feature combinations may be missing.", - stacklevel=2, - ) - - out_file = out_path / "feature_benefit_heatmap_robust_by_tissue.pdf" - _plot_heatmaps(agg, out_file) - return out_file - - -def plot_feature_benefit_heatmap_all_tissues_folds( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/features", - merge_gender: bool = True, -) -> Path: - return plot_feature_benefit_heatmap_robust_by_tissue( - parquet_path=parquet_path, - out_dir=out_dir, - merge_gender=merge_gender, - ) - - -def main() -> None: - parser = argparse.ArgumentParser( - description=( - "Two-panel robustness heatmap by tissue type " - "(gray matter left, white matter right)." - ) - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/features", - help="Output directory", - ) - parser.add_argument( - "--epsilon", - type=float, - default=EPSILON, - help=f"Minimum median delta for robustness rule (default {EPSILON})", - ) - parser.add_argument( - "--tau", - type=float, - default=TAU, - help=f"Minimum fraction of positive deltas for robustness rule (default {TAU})", - ) - parser.add_argument( - "--no-merge-gender", - action="store_true", - help="Keep HCP–Gender and CamCAN–Gender as separate rows.", - ) - args = parser.parse_args() - - import feature_benefit_heatmap_all_tissues_folds as _self - - _self.EPSILON = args.epsilon - _self.TAU = args.tau - - out_file = plot_feature_benefit_heatmap_robust_by_tissue( - parquet_path=args.input, - out_dir=args.outdir, - merge_gender=not args.no_merge_gender, - ) - print("Saved feature benefit heatmap to", out_file) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/feature_plots.py b/scripts/visualization_backup/feature_plots.py deleted file mode 100644 index 491542c1..00000000 --- a/scripts/visualization_backup/feature_plots.py +++ /dev/null @@ -1,244 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path -from typing import List - -import matplotlib -import numpy as np -import pandas as pd -import seaborn as sns -from matplotlib.colors import ListedColormap - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from utils import ( - DEFAULT_COMBOS, - calculate_paired_stats, - calculate_paired_ttest, - choose_fold_metric, - clean_target, - filter_combos, - fold_columns, - format_label, - get_display_label, - is_dummy_model, - select_best_runs, -) - -from config import apply_miccai_style - - -def _collect_feature_stats(df: pd.DataFrame) -> pd.DataFrame: - rows = [] - - # Iterate over Dataset/Target/Task - for (dataset, target, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"] - ): - fold_prefix, metric_label, higher_is_better = choose_fold_metric(group, task) - - # 1. Select Best Run for every (Model, Tissue, Feature) - best = select_best_runs(group, fold_prefix, higher_is_better) - if best.empty or "_fold_mean" not in best.columns: - continue - - # 2. Filter out dummies - best = best[~best["model_name"].apply(is_dummy_model)] - if best.empty: - continue - - f_cols = fold_columns(best, fold_prefix) - if not f_cols: - continue - - for tissue, sub in best.groupby("tissue_type"): - - # Determine Winner Feature Logic: - # 1. Gather all features and their mean scores - feature_scores = [] - - sub_feats = [] - for feature, sub_f in sub.groupby("primary_metric"): - # "primary_metric" column holds the feature name (e.g. rtop, spheres) in this parquet - - if higher_is_better: - best_m = sub_f.loc[sub_f["_fold_mean"].idxmax()] - else: - best_m = sub_f.loc[sub_f["_fold_mean"].idxmin()] - - vals = best_m[f_cols].values.astype(float) - mean_v = np.mean(vals) - sub_feats.append( - {"feature": feature, "vals": vals, "mean": mean_v, "model": best_m} - ) - - if not sub_feats: - continue - - # Sort by performance - sub_feats.sort(key=lambda x: x["mean"], reverse=higher_is_better) - - # Best Feature - best_feat = sub_feats[0] - - # Statistical Test vs Second Best (if exists) - is_clear_winner = False - if len(sub_feats) > 1: - second_feat = sub_feats[1] - # Compare Best vs Second - p_val = calculate_paired_ttest(best_feat["vals"], second_feat["vals"]) - if p_val < 0.05: - is_clear_winner = True - - # Create rows for all features - for item in sub_feats: - # Status: - # 2 = Best & Clear Winner - # 1 = Best but NOT Clear Winner (Tie with 2nd) - # 0 = Not Best - - status = 0 - if item["feature"] == best_feat["feature"]: - if is_clear_winner: - status = 2 # Win - else: - status = 1 # Tie/Best - - rows.append( - { - "dataset": dataset, - "target": target, - "task": task, - "tissue": tissue, - "feature": item["feature"], - "metric_label": metric_label, - "mean_score": item["mean"], - "std_score": np.std(item["vals"], ddof=1), - "status": status, - } - ) - - return pd.DataFrame(rows) - - -def plot_feature_heatmap( - parquet_path: str, - out_dir: str = "analysis_results/visualization_demo/plots/features", -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, DEFAULT_COMBOS) - - if df.empty: - raise RuntimeError("No rows left after filtering combos") - - stats = _collect_feature_stats(df) - if stats.empty: - raise RuntimeError("No valid feature stats found") - - # Create composite column label - # "Dataset - Target (Metric)\n(tissue)" - stats["col_label"] = stats.apply( - lambda x: f"{get_display_label(x.dataset, x.target, x.task, x.metric_label)}\n({x.tissue})", - axis=1, - ) - - # Pivot for Status (Color) and Text (Annotation) - pivot_status = stats.pivot(index="feature", columns="col_label", values="status") - pivot_mean = stats.pivot(index="feature", columns="col_label", values="mean_score") - pivot_std = stats.pivot(index="feature", columns="col_label", values="std_score") - - # Sort columns - col_order = sorted(stats["col_label"].unique()) - pivot_status = pivot_status[col_order] - pivot_mean = pivot_mean[col_order] - pivot_std = pivot_std[col_order] - - # Annotations Matrix - annot_matrix = pivot_mean.copy().astype(object) - for c in pivot_mean.columns: - for i in pivot_mean.index: - m = pivot_mean.loc[i, c] - s = pivot_std.loc[i, c] - if pd.notna(m): - annot_matrix.loc[i, c] = f"{m:.3f}\n±{s:.3f}" - else: - annot_matrix.loc[i, c] = "" - - # User Request: "put best only when there's a clear statistical win" - # So map Status 1 (Best but not clear) to 0 (No Winner) - plot_data = pivot_status.copy() - plot_data = plot_data.replace({1: 0}) - # Now valid values are 0 and 2. - - # We want a discrete colormap. - # 0 = White/Gray - # 2 = Green/Gold - - # Map to 0 and 1 for heatmap plotting - plot_data = plot_data.replace({2: 1}) - - cmap = ListedColormap(["#F8F9FA", "#C8E6C9"]) # Very Light Gray, Light Green - - sns.set_theme(style="white") - # Size logic - w = max(10, 2.5 * len(pivot_mean.columns)) - h = max(4, 1.0 * len(pivot_mean.index)) - - fig, ax = plt.subplots(figsize=(w, h)) - - sns.heatmap( - plot_data, - annot=annot_matrix, - fmt="", - cmap=cmap, - cbar=True, - linewidths=0.5, - ax=ax, - annot_kws={"fontsize": 9}, - vmin=0, - vmax=1, - ) - - # Fix Colorbar labels - cbar = ax.collections[0].colorbar - cbar.set_ticks([0.25, 0.75]) - cbar.set_ticklabels(["No Winner (Tie/Non-Sig)", "Best (Stat. Sig.)"]) - - ax.set_title("Feature Impact (Mean ± Std)", pad=20) - ax.set_xlabel("") - ax.set_ylabel("Feature") - plt.xticks(rotation=45, ha="right") - plt.yticks(rotation=0) - - fig.tight_layout() - out_file = out_path / "feature_impact_heatmap.pdf" - fig.savefig(out_file, dpi=300) - plt.close(fig) - - return out_path - - -def main() -> None: - parser = argparse.ArgumentParser(description="Plot feature impact heatmap") - parser.add_argument( - "--input", default="comprehensive_results.parquet", help="Input parquet file" - ) - parser.add_argument( - "--outdir", - default="analysis_results/visualization_demo/plots/features", - help="Output directory", - ) - args = parser.parse_args() - - out_path = plot_feature_heatmap(args.input, args.outdir) - print("Saved feature comparison plot to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/feature_vs_b0_plot.py b/scripts/visualization_backup/feature_vs_b0_plot.py deleted file mode 100644 index 8460a571..00000000 --- a/scripts/visualization_backup/feature_vs_b0_plot.py +++ /dev/null @@ -1,547 +0,0 @@ -from __future__ import annotations - -import argparse -import warnings -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd -import seaborn as sns - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from utils import ( - choose_spread_metric, - clean_target, - filter_combos, - fold_columns, - map_model_family, - normalize_score, -) - -from config import MICCAI_DOUBLE_COLUMN_FIGSIZE, apply_miccai_style - -FEATURE_DELTA_COMBOS = [ - ("hcp", "Gender", "binary_classification"), - ("camcan", "Gender", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] -FEATURE_DELTA_TISSUES = {"white", "gray"} -FEATURE_PREFERRED_ORDER = ["md", "mk", "sh"] -FEATURE_EXCLUDE = {"rtop"} - -PLOT_TITLE = "Feature benefit vs b0 by model (paired Δ normalized score)" -PLOT_SUBTITLE = ( - "Each point: one dataset×task×tissue×fold. Δ = score(feature) − score(b0)." -) - -MODEL_DISPLAY_ORDER = ["Linear", "RandomForest", "Deep Learning"] - -FAMILY_COLORS = { - "Linear": "#4C78A8", - "RandomForest": "#59A14F", - "Deep Learning": "#E15759", -} - -FAMILY_LABELS = { - "Linear": "Linear", - "RandomForest": "Random forest", - "Deep Learning": "Deep learning", -} - -# Individual-model view -INDIVIDUAL_MODEL_ORDER = [ - "linear", - "pca_linear", - "lasso", - "svm", - "pca_svm", - "forest", - "pca_forest", - "medicalnet", - "dinov2", - "curia", -] - -INDIVIDUAL_MODEL_COLORS = { - "linear": "#4C78A8", - "pca_linear": "#6EA6D0", - "lasso": "#9DC6E8", - "svm": "#2C5F8A", - "pca_svm": "#1A3D5C", - "forest": "#59A14F", - "pca_forest": "#8CC97E", - "medicalnet": "#E15759", - "dinov2": "#F28E2B", - "curia": "#B07AA1", -} - -INDIVIDUAL_MODEL_LABELS = { - "linear": "Linear", - "pca_linear": "PCA+Linear", - "lasso": "Lasso", - "svm": "SVM", - "pca_svm": "PCA+SVM", - "forest": "Random forest", - "pca_forest": "PCA+RF", - "medicalnet": "MedicalNet", - "dinov2": "DINOv2", - "curia": "Curia", -} - - -def _map_model_group(model_name: str) -> str | None: - """Map a model name to one of three display groups.""" - family = map_model_family(model_name) - if family is None: - return None - if family == "DeepEmbedding+LinearHead": - return "Deep Learning" - return family # "Linear" or "RandomForest" - - -def _load_scope(parquet_path: str, group_by_family: bool = True) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, FEATURE_DELTA_COMBOS) - df = df[df["tissue_type"].isin(FEATURE_DELTA_TISSUES)].copy() - df["model_family"] = df["model_name"].map(map_model_family) - df = df[df["model_family"].notna()].copy() - if group_by_family: - df["model_plot"] = df["model_name"].map(_map_model_group) - df = df[df["model_plot"].isin(MODEL_DISPLAY_ORDER)].copy() - else: - df["model_plot"] = df["model_name"].str.strip().str.lower() - df = df[df["model_plot"].isin(INDIVIDUAL_MODEL_ORDER)].copy() - - if df.empty: - raise RuntimeError("No rows left after applying feature-vs-b0 scope filters") - return df - - -def _extract_fold_level_scores(df: pd.DataFrame) -> pd.DataFrame: - parts: list[pd.DataFrame] = [] - grouping = ["dataset", "target_clean", "prediction_task"] - - for _, group in df.groupby(grouping, dropna=False): - task = str(group["prediction_task"].iloc[0]) - fold_prefix, metric_label = choose_spread_metric(group, task) - f_cols = fold_columns(group, fold_prefix) - if not f_cols: - continue - - for col in f_cols: - fold_idx = int(col.replace(fold_prefix, "")) - part = group[ - [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "model_plot", - "primary_metric", - ] - ].copy() - part["fold_index"] = fold_idx - part["score_raw"] = pd.to_numeric(group[col], errors="coerce") - part["metric_label"] = metric_label - parts.append(part) - - if not parts: - raise RuntimeError("No fold-level rows available for feature-vs-b0 plotting") - - fold_df = pd.concat(parts, ignore_index=True) - fold_df = fold_df[fold_df["score_raw"].notna()].copy() - if fold_df.empty: - raise RuntimeError("All extracted fold-level values are missing") - - fold_df["score_norm"] = fold_df.apply(normalize_score, axis=1) - fold_df = fold_df[fold_df["score_norm"].notna()].copy() - if fold_df.empty: - raise RuntimeError("No normalized fold-level scores available") - return fold_df - - -def _build_paired_delta_df(fold_df: pd.DataFrame) -> pd.DataFrame: - key_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "model_plot", - "fold_index", - "primary_metric", - ] - dedup = ( - fold_df.groupby(key_cols, dropna=False, as_index=False) - .agg( - score_norm=("score_norm", "mean"), - metric_label=("metric_label", "first"), - ) - .copy() - ) - - duplicate_count = int(len(fold_df) - len(dedup)) - if duplicate_count > 0: - warnings.warn( - f"Collapsed {duplicate_count} duplicate fold rows by averaging score_norm " - "(same dataset/target/task/tissue/model/fold/feature).", - stacklevel=2, - ) - - base_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "model_plot", - "fold_index", - "metric_label", - ] - - wide = ( - dedup.pivot_table( - index=base_cols, - columns="primary_metric", - values="score_norm", - aggfunc="mean", - ) - .reset_index() - .copy() - ) - - if "b0" not in wide.columns: - raise RuntimeError( - "Feature 'b0' is missing after pivoting; cannot build paired deltas" - ) - - before = len(wide) - wide = wide[wide["b0"].notna()].copy() - dropped_missing_b0 = before - len(wide) - if dropped_missing_b0 > 0: - warnings.warn( - f"Dropped {dropped_missing_b0} cell rows without b0 (cannot form paired deltas).", - stacklevel=2, - ) - - feature_cols = [c for c in wide.columns if c not in set(base_cols + ["b0"])] - feature_cols = [c for c in feature_cols if c not in FEATURE_EXCLUDE] - feature_cols = _ordered_features(feature_cols) - if not feature_cols: - raise RuntimeError("No non-b0 features available after pairing") - - delta_df = wide.melt( - id_vars=base_cols + ["b0"], - value_vars=feature_cols, - var_name="feature", - value_name="feature_score", - ) - delta_df = delta_df[delta_df["feature_score"].notna()].copy() - delta_df["delta"] = delta_df["feature_score"] - delta_df["b0"] - delta_df["primary_metric"] = delta_df["feature"] - delta_df["cell_id"] = ( - delta_df[ - [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "fold_index", - ] - ] - .astype(str) - .agg("|".join, axis=1) - ) - - keep_cols = [ - "cell_id", - "feature", - "primary_metric", - "model_name", - "model_plot", - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "fold_index", - "delta", - "metric_label", - ] - delta_df = delta_df[keep_cols].copy() - - if delta_df.empty: - raise RuntimeError("No paired feature-vs-b0 deltas available for plotting") - return delta_df - - -def _aggregate_over_folds(delta_df: pd.DataFrame) -> pd.DataFrame: - group_cols = [ - "dataset", - "target_clean", - "prediction_task", - "tissue_type", - "model_name", - "model_plot", - "feature", - "primary_metric", - "metric_label", - ] - out = ( - delta_df.groupby(group_cols, dropna=False, as_index=False) - .agg( - delta=("delta", "mean"), - n_folds=("delta", "size"), - ) - .copy() - ) - out["cell_id"] = ( - out[["dataset", "target_clean", "prediction_task", "tissue_type", "model_name"]] - .astype(str) - .agg("|".join, axis=1) - ) - if out.empty: - raise RuntimeError("No rows left after averaging deltas over folds") - return out - - -def _ordered_features(features: list[str]) -> list[str]: - seen = set(features) - ordered = [f for f in FEATURE_PREFERRED_ORDER if f in seen] - ordered.extend(sorted([f for f in features if f not in ordered])) - return ordered - - -# (dataset, target_clean, prediction_task, row label); None = all data -ROW_DEFS = [ - (None, None, None, "All datasets & targets"), - ("hcp", "Gender", "binary_classification", "HCP – Gender"), - ("camcan", "Gender", "binary_classification", "CamCAN – Gender"), - ("camcan", "Age", "regression", "CamCAN – Age"), - ("abide", "DX_GROUP", "binary_classification", "ABIDE – DX Group"), -] - - -def _draw_delta_ax( - ax: plt.Axes, - row_df: pd.DataFrame, - hue_order: list[str], - feature_order: list[str], - palette: dict, - label_map: dict, - group_by_family: bool, - row_label: str, - show_legend: bool, - global_ylim: tuple[float, float], -) -> None: - """Draw violin + strip for one row on an existing Axes.""" - if row_df.empty: - ax.set_visible(False) - return - - sns.violinplot( - data=row_df, - x="feature", - y="delta", - hue="model_plot", - order=feature_order, - hue_order=hue_order, - palette=palette, - dodge=True, - inner=None, - width=0.8, - linewidth=0.8, - cut=0, - ax=ax, - ) - for collection in ax.collections: - collection.set_alpha(0.45) - - sns.stripplot( - data=row_df, - x="feature", - y="delta", - hue="model_plot", - order=feature_order, - hue_order=hue_order, - palette=palette, - dodge=True, - jitter=0.06, - alpha=0.55, - size=3.5, - edgecolor="white", - linewidth=0.3, - zorder=3, - ax=ax, - ) - - ax.axhline(0.0, color="#1f1f1f", linewidth=1.4, alpha=0.95, zorder=1) - ax.set_ylim(global_ylim) - ax.set_xlabel("Feature" if show_legend else "") - ax.set_ylabel("Δ norm. score vs b0", fontsize=8) - ax.set_title(row_label, pad=6, fontsize=9, loc="left") - ax.grid(axis="y", linestyle="--", alpha=0.3) - ax.grid(axis="x", visible=False) - sns.despine(ax=ax, top=True, right=True) - - if show_legend: - handles, labels = ax.get_legend_handles_labels() - label_to_handle: dict[str, object] = {} - for handle, label in zip(handles, labels): - if label in hue_order and label not in label_to_handle: - label_to_handle[label] = handle - legend_labels = [label_map.get(n, n) for n in hue_order if n in label_to_handle] - legend_handles = [label_to_handle[n] for n in hue_order if n in label_to_handle] - if group_by_family: - ax.legend( - legend_handles, - legend_labels, - title="Model", - loc="upper center", - bbox_to_anchor=(0.5, 1.18), - ncol=len(legend_handles), - frameon=False, - borderaxespad=0.3, - fontsize=8, - ) - else: - ax.legend( - legend_handles, - legend_labels, - title="Model", - loc="upper left", - bbox_to_anchor=(1.01, 1.0), - ncol=1, - frameon=True, - borderaxespad=0.3, - fontsize=8, - ) - else: - ax.legend_.remove() if ax.legend_ else None - - -def _plot_deltas( - delta_df: pd.DataFrame, out_file: Path, group_by_family: bool = True -) -> None: - feature_order = _ordered_features(sorted(delta_df["feature"].unique().tolist())) - if group_by_family: - display_order = MODEL_DISPLAY_ORDER - palette = FAMILY_COLORS - label_map = FAMILY_LABELS - else: - display_order = INDIVIDUAL_MODEL_ORDER - palette = INDIVIDUAL_MODEL_COLORS - label_map = INDIVIDUAL_MODEL_LABELS - hue_order = [ - m for m in display_order if m in delta_df["model_plot"].unique().tolist() - ] - - if not feature_order: - raise RuntimeError("No features available for plotting") - if not hue_order: - raise RuntimeError("No model groups available for plotting") - - # Global y limits across all rows - data_min = float(np.nanmin(delta_df["delta"].to_numpy(dtype=float))) - data_max = float(np.nanmax(delta_df["delta"].to_numpy(dtype=float))) - pad = 0.05 * (data_max - data_min) - global_ylim = (data_min - pad, data_max + pad) - - n_rows = len(ROW_DEFS) - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - if group_by_family: - fig_w = max(base_w, 1.15 * len(feature_order) + 2.4) - else: - fig_w = max(14.0, 2.0 * len(feature_order) * len(hue_order) / 5 + 4.0) - row_h = 3.0 - fig, axes = plt.subplots(n_rows, 1, figsize=(fig_w, row_h * n_rows), squeeze=False) - - for i, (dataset, target, task, row_label) in enumerate(ROW_DEFS): - if dataset is None: - row_df = delta_df - else: - row_df = delta_df[ - (delta_df["dataset"] == dataset) - & (delta_df["target_clean"] == target) - & (delta_df["prediction_task"] == task) - ].copy() - - _draw_delta_ax( - ax=axes[i, 0], - row_df=row_df, - hue_order=hue_order, - feature_order=feature_order, - palette=palette, - label_map=label_map, - group_by_family=group_by_family, - row_label=row_label, - show_legend=(i == 0), - global_ylim=global_ylim, - ) - - fig.suptitle(PLOT_TITLE, y=1.01, fontsize=10) - - if group_by_family: - fig.tight_layout(rect=(0.0, 0.0, 1.0, 1.0)) - else: - fig.tight_layout(rect=(0.0, 0.0, 0.85, 1.0)) - fig.savefig(out_file, dpi=300, bbox_inches="tight") - plt.close(fig) - - -def plot_feature_vs_b0( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", - group_by_family: bool = True, -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - scope_df = _load_scope(parquet_path, group_by_family=group_by_family) - fold_df = _extract_fold_level_scores(scope_df) - delta_df = _build_paired_delta_df(fold_df) - - suffix = "family" if group_by_family else "individual" - _plot_deltas( - delta_df, - out_path / f"feature_vs_b0_by_model_{suffix}_delta.pdf", - group_by_family=group_by_family, - ) - return out_path - - -def main() -> None: - parser = argparse.ArgumentParser( - description="Plot feature benefit vs b0 by model using paired fold-level deltas" - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/folds", - help="Output directory", - ) - parser.add_argument( - "--individual-models", - action="store_true", - help="Show each model individually instead of grouping by family", - ) - args = parser.parse_args() - - out_path = plot_feature_vs_b0( - args.input, args.outdir, group_by_family=not args.individual_models - ) - print("Saved feature-vs-b0 plot to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/prep_sensitivity_plot.py b/scripts/visualization_backup/prep_sensitivity_plot.py deleted file mode 100644 index 0085ac9a..00000000 --- a/scripts/visualization_backup/prep_sensitivity_plot.py +++ /dev/null @@ -1,340 +0,0 @@ -""" -prep_sensitivity_plot.py ------------------------- -Publication-quality figure showing how much normalized performance varies -across preprocessing choices (feature × tissue_type) within each dataset-task. - -Visual argument: - "Preprocessing choice can move a model's score by 0.10–0.30+, even on - identical data. Benchmark comparisons must account for this." -""" - -from __future__ import annotations - -import argparse -import warnings -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd -import seaborn as sns -from matplotlib.lines import Line2D - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from utils import ( - add_score_raw_from_prefix, - choose_spread_metric, - clean_target, - filter_combos, - format_label, - make_dataset_task_label, - map_model_family, - normalize_score, - ordered_dataset_task_labels_from_combos, -) - -from config import apply_miccai_style - -# ── Scope ──────────────────────────────────────────────────────────────────── -PREP_COMBOS = [ - ("hcp", "Gender", "binary_classification"), - ("camcan", "Gender", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] -PREP_FEATURES = {"md", "mk", "sh", "b0"} -PREP_TISSUES = {"white", "gray"} - -# ── Visual constants ────────────────────────────────────────────────────────── -RANGE_LINE_COLOR = "#333333" -IQR_COLOR = "#111111" -ANNOT_COLOR = "#444444" -DOT_COLOR = "#444444" - -PLOT_TITLE = "Sensitivity to preprocessing across dataset-task conditions" -PLOT_SUBTITLE = "Each dot = one preprocessing condition" -Y_LABEL = "Normalized score (0 = dummy, 1 = perfect)" - - -# ── Data loading & normalisation ───────────────────────────────────────────── - - -def _load_scope(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, PREP_COMBOS) - df = df[df["primary_metric"].isin(PREP_FEATURES)] - df = df[df["tissue_type"].isin(PREP_TISSUES)] - df["model_family"] = df["model_name"].map(map_model_family) - # exclude dummy models; keep all non-dummy model families - df = df[df["model_family"].notna()].copy() - if df.empty: - raise RuntimeError("No rows left after applying prep-sensitivity scope filters") - return df - - -def _compute_prep_scores(df: pd.DataFrame) -> pd.DataFrame: - """ - Returns one row per (dataset_task, primary_metric, tissue_type) with - `prep_score` = median of score_norm_run across all (model, run, fold) combos. - """ - parts: list[pd.DataFrame] = [] - for (ds, tgt, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"], dropna=False - ): - fold_prefix, _label = choose_spread_metric(group, task) - part = add_score_raw_from_prefix(group, fold_prefix) - part = part[part["score_raw"].notna()].copy() - if not part.empty: - parts.append(part) - if not parts: - raise RuntimeError("No valid metrics for prep-sensitivity plot") - - score_df = pd.concat(parts, ignore_index=True) - score_df["score_norm"] = score_df.apply(normalize_score, axis=1) - score_df = score_df[score_df["score_norm"].notna()].copy() - - score_df["dataset_task"] = score_df.apply( - lambda r: make_dataset_task_label(r["dataset"], r["target_clean"]), axis=1 - ) - - # Aggregate: median across all models/runs/folds for each prep_id - prep_df = ( - score_df.groupby( - ["dataset_task", "primary_metric", "tissue_type"], dropna=False - )["score_norm"] - .median() - .reset_index() - .rename(columns={"score_norm": "prep_score"}) - ) - prep_df = prep_df[prep_df["prep_score"].notna()].copy() - if prep_df.empty: - raise RuntimeError("No prep-level scores computed") - return prep_df - - -# ── Statistics per dataset-task ─────────────────────────────────────────────── - - -def _dataset_task_stats(prep_df: pd.DataFrame) -> pd.DataFrame: - rows = [] - for task_label, grp in prep_df.groupby("dataset_task", dropna=False): - s = grp["prep_score"].dropna() - q1, q3 = float(s.quantile(0.25)), float(s.quantile(0.75)) - mn, mx = float(s.min()), float(s.max()) - rows.append( - { - "dataset_task": task_label, - "prep_min": mn, - "prep_max": mx, - "prep_q1": q1, - "prep_q3": q3, - "prep_range": mx - mn, - "n_preps": len(s), - } - ) - return pd.DataFrame(rows) - - -# ── Plotting ────────────────────────────────────────────────────────────────── - - -def _plot_prep_sensitivity( - prep_df: pd.DataFrame, - stats_df: pd.DataFrame, - output_file: Path, -) -> None: - GROUP_SPACING = 1.6 - order = ordered_dataset_task_labels_from_combos( - prep_df["dataset_task"].unique().tolist(), PREP_COMBOS - ) - if not order: - raise RuntimeError("No dataset-task labels available for plotting") - - task_to_x: dict[str, float] = { - label: idx * GROUP_SPACING for idx, label in enumerate(order) - } - pretty_labels = [format_label(label) for label in order] - - fig, ax = plt.subplots() - - rng = np.random.default_rng(42) - - # ── Per-dataset-task visual elements ───────────────────────────────────── - for task_label, x_center in task_to_x.items(): - row = stats_df[stats_df["dataset_task"] == task_label] - if row.empty: - continue - row = row.iloc[0] - - # Full range: thin dark line - ax.vlines( - x_center, - row["prep_min"], - row["prep_max"], - colors=RANGE_LINE_COLOR, - linewidth=1.0, - alpha=0.55, - zorder=2, - ) - # Capped ends (whisker caps) - for y_cap in (row["prep_min"], row["prep_max"]): - ax.hlines( - y_cap, - x_center - 0.10, - x_center + 0.10, - colors=RANGE_LINE_COLOR, - linewidth=1.0, - alpha=0.55, - zorder=2, - ) - - # IQR: thick bar - ax.vlines( - x_center, - row["prep_q1"], - row["prep_q3"], - colors=IQR_COLOR, - linewidth=5.0, - alpha=0.30, - zorder=3, - ) - - # Annotation: range value + n - ax.text( - x_center, - min(row["prep_max"] + 0.045, 0.97), - f"Δ{row['prep_range']:.2f} (n={int(row['n_preps'])})", - ha="center", - va="bottom", - color=ANNOT_COLOR, - zorder=6, - ) - - # ── Individual prep dots (one per feature × tissue condition) ─────────── - x_base = prep_df["dataset_task"].map(task_to_x).astype(float).to_numpy() - jitter = rng.normal(loc=0.0, scale=0.055, size=len(prep_df)) - ax.scatter( - x_base + jitter, - prep_df["prep_score"].to_numpy(dtype=float), - s=24, - c=DOT_COLOR, - alpha=0.55, - edgecolors="white", - linewidths=0.3, - zorder=5, - ) - - # ── Axes decoration ─────────────────────────────────────────────────────── - ax.set_ylim(0.0, 1.08) - ax.set_xlim(-0.65, (len(order) - 1) * GROUP_SPACING + 0.65) - ax.set_xticks([i * GROUP_SPACING for i in range(len(order))]) - ax.set_xticklabels(pretty_labels, rotation=24, ha="right") - ax.set_xlabel("") - ax.set_ylabel(Y_LABEL) - ax.set_title(PLOT_TITLE, pad=18) - ax.text( - 0.01, - 1.02, - PLOT_SUBTITLE, - transform=ax.transAxes, - ha="left", - va="bottom", - color=ANNOT_COLOR, - ) - ax.axhline(y=0.0, color="#999999", linewidth=0.7, linestyle="--", zorder=1) - - # ── Legend ──────────────────────────────────────────────────────────────── - range_handle = Line2D( - [0], - [0], - color=RANGE_LINE_COLOR, - linewidth=1.0, - alpha=0.55, - label="Full range", - ) - iqr_handle = Line2D( - [0], - [0], - color=IQR_COLOR, - linewidth=5.0, - alpha=0.30, - label="IQR", - ) - dot_handle = Line2D( - [0], - [0], - marker="o", - linestyle="", - markerfacecolor=DOT_COLOR, - markeredgecolor="white", - markeredgewidth=0.3, - markersize=5, - alpha=0.55, - label="Preprocessing condition", - ) - ax.legend( - handles=[dot_handle, iqr_handle, range_handle], - loc="upper center", - bbox_to_anchor=(0.5, 0.99), - ncol=3, - frameon=False, - borderaxespad=0.2, - ) - - ax.grid(axis="y", linestyle="--", alpha=0.3) - ax.grid(axis="x", visible=False) - sns.despine(ax=ax, top=True, right=True) - - fig.tight_layout(rect=(0.02, 0.0, 1.0, 1.0)) - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -# ── Public entry point ──────────────────────────────────────────────────────── - - -def plot_prep_sensitivity( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_scope(parquet_path) - prep_df = _compute_prep_scores(df) - stats_df = _dataset_task_stats(prep_df) - - output_file = out_path / "prep_sensitivity.pdf" - _plot_prep_sensitivity(prep_df, stats_df, output_file) - return out_path - - -# ── CLI ─────────────────────────────────────────────────────────────────────── - - -def main() -> None: - parser = argparse.ArgumentParser( - description="Plot preprocessing sensitivity across dataset-task conditions" - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/folds", - help="Output directory", - ) - args = parser.parse_args() - - out_path = plot_prep_sensitivity(args.input, args.outdir) - print("Saved prep-sensitivity plot to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/show_spread.py b/scripts/visualization_backup/show_spread.py deleted file mode 100644 index 977ab6f1..00000000 --- a/scripts/visualization_backup/show_spread.py +++ /dev/null @@ -1,238 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path - -import matplotlib -import pandas as pd -import seaborn as sns -from matplotlib.patches import Patch - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from utils import ( - MODEL_DISPLAY_ORDER, - add_score_raw_from_prefix, - aggregate_run_scores, - choose_spread_metric, - clean_target, - filter_combos, - format_label, - map_model_display_group, - map_model_family, - minmax_normalize_with_baseline, -) - -from config import MICCAI_DOUBLE_COLUMN_FIGSIZE, apply_miccai_style - -SPREAD_COMBOS = [ - ("hcp", "Gender", "binary_classification"), - ("camcan", "Gender", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] -SPREAD_FEATURES = {"md", "mk", "sh", "b0"} -SPREAD_TISSUES = {"white", "gray"} -SPREAD_TITLE = "Performance Spread Across Dataset-Task Conditions" - -FAMILY_PALETTE = { - "Linear": "#4C78A8", - "RandomForest": "#59A14F", - "medicalnet": "#E15759", - "dinov2": "#F28E2B", - "curia": "#B07AA1", -} - - -def _load_spread_scope(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, SPREAD_COMBOS) - - df = df[df["primary_metric"].isin(SPREAD_FEATURES)] - df = df[df["tissue_type"].isin(SPREAD_TISSUES)] - df["model_family"] = df["model_name"].map(map_model_family) - df = df[df["model_family"].notna()].copy() - - if df.empty: - raise RuntimeError("No rows left after applying spread plot scope filters") - return df - - -def _compute_normalized_scores(df: pd.DataFrame) -> pd.DataFrame: - parts: list[pd.DataFrame] = [] - for (_, _, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"], dropna=False - ): - fold_prefix, metric_label = choose_spread_metric(group, task) - part = add_score_raw_from_prefix(group, fold_prefix) - part = part[part["score_raw"].notna()].copy() - if part.empty: - continue - part["metric_label"] = metric_label - parts.append(part) - - if not parts: - raise RuntimeError("No valid task metrics found to compute spread scores") - - score_df = pd.concat(parts, ignore_index=True) - score_df = minmax_normalize_with_baseline( - score_df, - score_col="score_raw", - group_cols=("dataset", "target_clean", "prediction_task"), - ) - score_df = score_df[score_df["score_norm"].notna()].copy() - - if score_df.empty: - raise RuntimeError("No normalized scores available for plotting") - return score_df - - -def _ordered_dataset_task_labels(df: pd.DataFrame) -> list[str]: - seen = set(df["dataset_task"].unique().tolist()) - ordered = [] - for dataset, target, _ in SPREAD_COMBOS: - label = f"{dataset}::{target}" - if label in seen: - ordered.append(label) - return ordered - - -def _plot_spread(run_df: pd.DataFrame, output_file: Path) -> None: - run_df = run_df.copy() - run_df["dataset_task"] = run_df.apply( - lambda r: f"{r['dataset']}::{r['target_clean']}", - axis=1, - ) - order = _ordered_dataset_task_labels(run_df) - if not order: - raise RuntimeError("No dataset-task labels available for plotting") - pretty_order = [format_label(label) for label in order] - run_df["dataset_task_label"] = run_df["dataset_task"].map(format_label) - - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - fig_w = max(base_w, 1.35 * len(order) + 1.6) - fig_h = max(base_h, 3.0) - fig, ax = plt.subplots(figsize=(fig_w, fig_h)) - - violin_start = len(ax.collections) - sns.violinplot( - data=run_df, - x="dataset_task_label", - y="score_norm_run", - order=pretty_order, - hue="model_display", - hue_order=MODEL_DISPLAY_ORDER, - palette=FAMILY_PALETTE, - dodge=True, - inner=None, - cut=0, - linewidth=0.85, - saturation=0.9, - ax=ax, - ) - for violin in ax.collections[violin_start:]: - violin.set_alpha(0.25) - violin.set_linewidth(0.85) - violin.set_edgecolor((0.2, 0.2, 0.2, 0.65)) - - sns.stripplot( - data=run_df, - x="dataset_task_label", - y="score_norm_run", - order=pretty_order, - hue="model_display", - hue_order=MODEL_DISPLAY_ORDER, - palette=FAMILY_PALETTE, - dodge=True, - jitter=0.16, - alpha=0.82, - size=3.2, - edgecolor="white", - linewidth=0.3, - zorder=3, - ax=ax, - ) - - ordered_labels = [ - name for name in MODEL_DISPLAY_ORDER if name in run_df["model_display"].unique() - ] - legend_handles = [ - Patch( - facecolor=FAMILY_PALETTE[name], - edgecolor="#333333", - linewidth=0.8, - alpha=0.55, - ) - for name in ordered_labels - ] - ax.legend( - legend_handles, - ordered_labels, - title="Model family\n(dummy-baseline min-max)", - ncol=1, - loc="center left", - bbox_to_anchor=(1.01, 0.5), - ) - - ax.set_title(SPREAD_TITLE) - ax.set_xlabel("") - ax.set_ylabel("Normalized score (0 = dummy, 1 = perfect)") - ax.set_ylim(0.0, 1.0) - ax.set_facecolor("#FBFBFD") - ax.tick_params(axis="x", rotation=25) - for tick in ax.get_xticklabels(): - tick.set_ha("right") - ax.grid(axis="y", linestyle="--", alpha=0.28) - ax.grid(axis="x", visible=False) - sns.despine(ax=ax, top=True, right=True) - - fig.tight_layout(rect=(0.0, 0.0, 0.86, 1.0)) - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def plot_model_family_spread( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", -) -> Path: - apply_miccai_style() - - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_spread_scope(parquet_path) - score_df = _compute_normalized_scores(df) - run_df = aggregate_run_scores(score_df, score_col="score_norm") - run_df["model_display"] = run_df["model_name"].map(map_model_display_group) - run_df = run_df[run_df["model_display"].isin(MODEL_DISPLAY_ORDER)].copy() - - if run_df.empty: - raise RuntimeError("No per-run scores available after run-level aggregation") - - _plot_spread(run_df, out_path / "model_family_spread.pdf") - return out_path - - -def main() -> None: - parser = argparse.ArgumentParser( - description="Plot performance spread by dataset-task and model family" - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/folds", - help="Output directory", - ) - args = parser.parse_args() - - out_path = plot_model_family_spread(args.input, args.outdir) - print("Saved spread plot to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/strip_plots.py b/scripts/visualization_backup/strip_plots.py deleted file mode 100644 index 3ea531e9..00000000 --- a/scripts/visualization_backup/strip_plots.py +++ /dev/null @@ -1,176 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from utils import ( - DEFAULT_COMBOS, - build_strip_data, - choose_fold_metric, - clean_target, - filter_combos, - format_label, -) - -from config import apply_miccai_style - - -DEFAULT_INPUT = "exp_outputs/summary/comprehensive_results.parquet" - - -def _parse_models_arg(models: str | None) -> list[str] | None: - if models is None: - return None - parsed = [m.strip() for m in models.split(",") if m.strip()] - return parsed or None - - -def generate_strip_plots( - parquet_path: str, - out_dir: str = "analysis_results/visualization_demo/plots/folds", - best_run: bool = True, - model_names: list[str] | None = None, - use_default_combos: bool = False, -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - - if model_names: - model_set = set(model_names) - df = df[df["model_name"].astype(str).isin(model_set)].copy() - - if use_default_combos: - df = filter_combos(df, DEFAULT_COMBOS) - - if df.empty: - raise RuntimeError("No rows left after filtering combos") - - for (dataset, target, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"] - ): - fold_prefix, metric_label, higher_is_better = choose_fold_metric(group, task) - strip_df = build_strip_data( - group, task, fold_prefix, higher_is_better, best_run - ) - if strip_df.empty: - continue - - labels = strip_df["label"].unique().tolist() - labels.sort() - - fig_w = max(9, 0.45 * len(labels)) - plt.figure(figsize=(fig_w, 5)) - rng = np.random.default_rng(7) - - for i, label in enumerate(labels): - vals = strip_df[strip_df["label"] == label]["value"].values - jitter = (rng.random(len(vals)) - 0.5) * 0.15 - plt.scatter(np.full(len(vals), i) + jitter, vals, s=14, alpha=0.7) - mean_val = float(np.mean(vals)) - std_val = float(np.std(vals, ddof=1)) if len(vals) > 1 else 0.0 - plt.errorbar( - i, - mean_val, - yerr=std_val, - fmt="o", - color="black", - ecolor="black", - elinewidth=1.2, - capsize=3, - markersize=4, - zorder=5, - ) - - pretty_labels = [format_label(l) for l in labels] - plt.xticks( - np.arange(len(labels)), pretty_labels, rotation=45, ha="right", fontsize=8 - ) - plt.ylabel(metric_label) - if metric_label == "R2": - plt.ylim(0, 1) - title = f"{dataset} | {target} | {task}" - plt.title(format_label(title)) - plt.grid(axis="y", linestyle="--", alpha=0.4) - plt.tight_layout() - - filename = f"strip_{dataset}_{target}_{task}.pdf" - plt.savefig(out_path / filename, dpi=300) - plt.close() - - # Box plot - plt.figure(figsize=(fig_w, 5)) - - data_vals = [ - strip_df[strip_df["label"] == label]["value"].values for label in labels - ] - plt.boxplot(data_vals, positions=np.arange(len(labels))) - - plt.xticks( - np.arange(len(labels)), pretty_labels, rotation=45, ha="right", fontsize=8 - ) - plt.ylabel(metric_label) - if metric_label == "R2": - plt.ylim(0, 1) - plt.title(format_label(title)) - plt.grid(axis="y", linestyle="--", alpha=0.4) - plt.tight_layout() - - filename_box = f"box_{dataset}_{target}_{task}.pdf" - plt.savefig(out_path / filename_box, dpi=300) - plt.close() - - return out_path - - -def main() -> None: - parser = argparse.ArgumentParser( - description="Generate strip plots per dataset/task combination" - ) - parser.add_argument( - "--input", default=DEFAULT_INPUT, help="Input parquet file" - ) - parser.add_argument( - "--outdir", - default="analysis_results/visualization_demo/plots/folds", - help="Output directory", - ) - parser.add_argument("--no-best-run", action="store_false", dest="best_run") - parser.add_argument( - "--models", - default=None, - help=( - "Comma-separated model names to include " - "(e.g. pointnet,region_elasticnet,region_group_lasso)" - ), - ) - parser.add_argument( - "--use-default-combos", - action="store_true", - help="Restrict to built-in dataset/target/task combos", - ) - args = parser.parse_args() - - model_names = _parse_models_arg(args.models) - - out_path = generate_strip_plots( - args.input, - args.outdir, - best_run=args.best_run, - model_names=model_names, - use_default_combos=args.use_default_combos, - ) - print("Saved strip plots to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/utils.py b/scripts/visualization_backup/utils.py deleted file mode 100644 index 7db0f6df..00000000 --- a/scripts/visualization_backup/utils.py +++ /dev/null @@ -1,524 +0,0 @@ -from __future__ import annotations - -import re -from typing import Iterable, List, Sequence, Tuple - -import numpy as np -import pandas as pd - -DEFAULT_COMBOS = [ - ("hcp", "Gender", "binary_classification"), - ("hcp", "Age", "regression"), - ("camcan", "Age", "regression"), - ("camcan", "Gender", "binary_classification"), - ("abide", "DX_GROUP", "binary_classification"), - ("abide", "fiq", "regression"), - ("abide", "viq", "regression"), - ("abide", "piq", "regression"), - ("abide", "srs_total_t", "regression"), - ("abide", "ados_g_total", "regression"), - ("abide", "ados_g_stereo_behav", "regression"), - ("abide", "ados_g_social", "regression"), - ("abide", "ados_g_comm", "regression"), -] - - -def clean_target(value: str | None) -> str | None: - if value is None: - return None - s = str(value).strip() - s = re.sub(r"[\[\]']", "", s).strip() - s = s.replace("Age_in_Yrs", "Age") - s = s.replace("dx_group", "DX_GROUP") - s = s.replace("DX_GROUP", "DX_GROUP") - s = s.replace("Gender", "Sex") - return s - - -def format_label(text: str) -> str: - s = text.replace("|", " - ") - s = s.replace("_", " ") - s = re.sub(r"\s+", " ", s).strip() - return s - - -def filter_combos( - df: pd.DataFrame, combos: Iterable[Tuple[str, str, str]] -) -> pd.DataFrame: - combos = list(combos) - if not combos: - return df - mask = pd.Series(False, index=df.index) - for dataset, target, task in combos: - mask |= ( - (df["dataset"] == dataset) - & (df["target_clean"] == target) - & (df["prediction_task"] == task) - ) - return df[mask].copy() - - -def choose_fold_metric( - group: pd.DataFrame, prediction_task: str -) -> Tuple[str, str, bool]: - if prediction_task == "binary_classification": - if any(col.startswith("accuracy_weighted_test_fold") for col in group.columns): - return "accuracy_weighted_test_fold", "Balanced Accuracy", True - return "accuracy_test_fold", "Accuracy", True - if any(col.startswith("r2_test_fold") for col in group.columns): - return "r2_test_fold", "R2", True - return "mae_test_fold", "MAE", False - - -def fold_columns(group: pd.DataFrame, prefix: str, max_folds: int = 5) -> List[str]: - cols = [f"{prefix}{i}" for i in range(max_folds) if f"{prefix}{i}" in group.columns] - return cols - - -def model_label(row: pd.Series) -> str: - name = str(row.get("model_name", "")) - if name.startswith("dummy"): - return "Dummy Baseline" - - variant = model_variant_label(row) - name_with_variant = f"{name} [{variant}]" if variant else name - - parts = [ - name_with_variant, - str(row.get("primary_metric", "")), - str(row.get("tissue_type", "")), - ] - return format_label("|".join(parts)) - - -def _clean_variant_value(value: object) -> str: - if pd.isna(value): - return "" - s = str(value).strip() - if not s or s.lower() in {"none", "nan", "null"}: - return "" - return s - - -def model_variant_label(row: pd.Series) -> str: - """Return a compact model-variant description based on backbone settings.""" - encoder_type = _clean_variant_value( - row.get("config.model.backbone.region_encoder.type", "") - ) - include_size = _clean_variant_value( - row.get("config.model.backbone.region_encoder.include_size", "") - ) - representation = _clean_variant_value( - row.get("config.model.backbone.region_representation", "") - ) - - chunks = [] - if encoder_type: - chunks.append(f"enc={encoder_type}") - if include_size: - chunks.append(f"size={include_size}") - if representation: - chunks.append(f"repr={representation}") - - return ",".join(chunks) - - -def is_dummy_model(name: str) -> bool: - return str(name).startswith("dummy") - - -def score_from_metric(value: float, higher_is_better: bool) -> float: - return float(value) if higher_is_better else -float(value) - - -def zscore(values: np.ndarray) -> np.ndarray: - mean = float(np.mean(values)) - std = float(np.std(values)) - if std == 0.0 or np.isnan(std): - return np.zeros_like(values, dtype=float) - return (values - mean) / std - - -def select_best_runs( - df: pd.DataFrame, - fold_prefix: str, - higher_is_better: bool, -) -> pd.DataFrame: - fold_cols = fold_columns(df, fold_prefix) - if not fold_cols: - return df.copy() - - df = df.copy() - df["_fold_mean"] = df[fold_cols].mean(axis=1, skipna=True) - df = df[~df["_fold_mean"].isna()].copy() - - group_cols = ["model_name", "primary_metric", "tissue_type", "_model_variant"] - - df["_model_variant"] = df.apply(model_variant_label, axis=1) - - best_rows = [] - for _, group in df.groupby(group_cols, dropna=False): - if group.empty: - continue - if higher_is_better: - idx = group["_fold_mean"].idxmax() - else: - idx = group["_fold_mean"].idxmin() - best_rows.append(group.loc[idx]) - - if not best_rows: - return df.copy() - - selected = pd.DataFrame(best_rows) - # We used to split dummy models here, but technically a dummy model is just a model. - # The caller can filter dummies if they want. - # However, existing logic (strip_plots) might rely on this, but it seems to just take 'selected' - # Actually the logic below "If not dummy.empty ... concat" seems to try to pick ONLY the best dummy? - # But groupby already does that per model_name. "dummy" is a model_name prefix. - # If we have "dummy_mean" and "dummy_median", they are different models. - # The previous code logic: - # dummy = selected... startswith("dummy") - # non_dummy = selected... - # if not dummy.empty: keep only ONE best dummy. - # This might be desired. I will keep it for compatibility. - - dummy = selected[selected["model_name"].astype(str).str.startswith("dummy")] - non_dummy = selected[~selected["model_name"].astype(str).str.startswith("dummy")] - - if not dummy.empty: - if higher_is_better: - best_dummy = dummy.loc[dummy["_fold_mean"].idxmax()] - else: - best_dummy = dummy.loc[dummy["_fold_mean"].idxmin()] - selected = pd.concat([non_dummy, pd.DataFrame([best_dummy])], ignore_index=True) - - if "_model_variant" in selected.columns: - selected = selected.drop(columns=["_model_variant"]) - - return selected - - -def get_display_label( - dataset: str, target: str, task: str, metric_label: str = None -) -> str: - # We want to format as "Dataset - Target" - # User Request: "reduce the dataset -task description: no need to display whether it's a binary classificaiton or a regression. For instance camcan- Age is enough" - # But later: "on the y axis replace the task name by the metric used (for regression show "R^2", for binary classification show "Acc")" - - # So we want: "Dataset - Target (Metric)" - - base = format_label(f"{dataset}|{target}") - - # Check metric - metric_short = "" - if metric_label: - if "Accuracy" in metric_label or "Acc" in metric_label: - metric_short = "Acc" - elif "R2" in metric_label: - metric_short = "R²" - elif "MAE" in metric_label: - metric_short = "MAE" - elif "RMSE" in metric_label: - metric_short = "RMSE" - - # Fallback if metric_label not provided but task is known? - if not metric_short and task: - if "classification" in task: - metric_short = "Acc" - elif "regression" in task: - metric_short = "R²" # Default assumption? Or MAE? - # In choose_fold_metric we see MAE is default for regression unless R2 exists. - # But user explicitly asked for "R^2" for regression in the prompt example. - - if metric_short: - return f"{base} ({metric_short})" - - return base - - -def calculate_paired_ttest( - vals_main: np.ndarray, - vals_other: np.ndarray, -) -> float: - from scipy.stats import ttest_rel - - # Ensure they are valid - if len(vals_main) != len(vals_other): - return 1.0 - - # ttest_rel - res = ttest_rel(vals_main, vals_other) - if np.isnan(res.pvalue): - return 1.0 - return float(res.pvalue) - - -def calculate_paired_stats( - vals_a: np.ndarray, - vals_b: np.ndarray, - higher_is_better: bool, -) -> Tuple[float, float, float, np.ndarray]: - """ - Calculates statistics for paired comparison (A vs B). - Returns (t_score, mean_diff, std_diff, normalized_diffs) - """ - # Ensure floats - vals_a = vals_a.astype(float) - vals_b = vals_b.astype(float) - - # Calculate difference - diffs = vals_a - vals_b - - # Adjust sign so positive always means A is better (if that is the intent) - # Actually, usually "Diff" means A - B. - # If Higher is Better: A=0.9, B=0.8 => A is better. Diff = 0.1 (Pos). Correct. - # If Lower is Better (MAE): A=2, B=5 => A is better. Diff = -3 (Neg). - # To make "Positive t-score" mean "A is better", we must invert diffs if lower is better. - if not higher_is_better: - diffs = -diffs - - mean_diff = float(np.mean(diffs)) - std_diff = float(np.std(diffs, ddof=1)) # Sample std dev - - if std_diff == 0: - # Avoid division by zero - if mean_diff == 0: - return 0.0, 0.0, 0.0, np.zeros_like(diffs) - # If mean != 0 but std == 0, it is a constant difference. - # T-score is infinite. Return a large number or 0? - # For visualization purposes, let's return 0 to avoid breaking plots, - # or handle it upstream. - return 0.0, mean_diff, 0.0, np.zeros_like(diffs) - - t_score = mean_diff / std_diff - normalized_diffs = diffs / std_diff - - return t_score, mean_diff, std_diff, normalized_diffs - - -def build_strip_data( - df: pd.DataFrame, - prediction_task: str, - fold_prefix: str, - higher_is_better: bool, - best_run: bool, -) -> pd.DataFrame: - group = df.copy() - if best_run: - group = select_best_runs(group, fold_prefix, higher_is_better) - - fold_cols = fold_columns(group, fold_prefix) - if not fold_cols: - return pd.DataFrame() - - rows = [] - for _, row in group.iterrows(): - label = model_label(row) - for fold_idx, col in enumerate(fold_cols): - val = row.get(col) - if pd.notna(val): - rows.append({"label": label, "fold": fold_idx, "value": float(val)}) - - return pd.DataFrame(rows) - - -MODEL_FAMILY_ORDER = ["Linear", "RandomForest", "DeepEmbedding+LinearHead"] -MODEL_DISPLAY_ORDER = ["Linear", "RandomForest", "medicalnet", "dinov2", "curia"] - -LINEAR_MODELS = {"linear", "pca_linear", "lasso", "svm", "pca_svm"} -RANDOM_FOREST_MODELS = {"forest", "pca_forest", "random_forest", "randomforest", "rf"} -DEEP_EMBED_MODELS = {"medicalnet", "dinov2", "curia"} - - -def map_model_family(model_name: str) -> str | None: - name = str(model_name).strip().lower() - if not name or name.startswith("dummy"): - return None - if name in LINEAR_MODELS: - return "Linear" - if name in RANDOM_FOREST_MODELS: - return "RandomForest" - if name in DEEP_EMBED_MODELS: - return "DeepEmbedding+LinearHead" - return None - - -def map_model_display_group(model_name: str) -> str | None: - name = str(model_name).strip().lower() - family = map_model_family(name) - if family is None: - return None - if family == "DeepEmbedding+LinearHead": - if name in DEEP_EMBED_MODELS: - return name - return None - return family - - -def _has_metric_values(df: pd.DataFrame, fold_prefix: str) -> bool: - fold_cols = fold_columns(df, fold_prefix) - if fold_cols and df[fold_cols].notna().any(axis=None): - return True - mean_col = fold_prefix.replace("_fold", "_mean") - return mean_col in df.columns and df[mean_col].notna().any() - - -def choose_spread_metric(group: pd.DataFrame, prediction_task: str) -> Tuple[str, str]: - if prediction_task == "binary_classification": - if _has_metric_values(group, "accuracy_weighted_test_fold"): - return "accuracy_weighted_test_fold", "Balanced Accuracy" - if _has_metric_values(group, "accuracy_test_fold"): - return "accuracy_test_fold", "Accuracy" - raise RuntimeError("Classification rows do not contain accuracy metrics") - if prediction_task == "regression": - if _has_metric_values(group, "r2_test_fold"): - return "r2_test_fold", "R2" - raise RuntimeError( - "Regression rows do not contain R2 metrics. " - "Provide an R2-like score on a 0-1 scale before normalization." - ) - raise ValueError(f"Unsupported prediction task: {prediction_task}") - - -def add_score_raw_from_prefix(df: pd.DataFrame, fold_prefix: str) -> pd.DataFrame: - out = df.copy() - fold_cols = fold_columns(out, fold_prefix) - if fold_cols: - out["score_raw"] = out[fold_cols].mean(axis=1, skipna=True) - return out - - mean_col = fold_prefix.replace("_fold", "_mean") - if mean_col not in out.columns: - raise RuntimeError(f"Missing metric columns for prefix '{fold_prefix}'") - out["score_raw"] = out[mean_col] - return out - - -def normalize_score(row: pd.Series) -> float: - score_raw = row.get("score_raw") - if pd.isna(score_raw): - return np.nan - - prediction_task = str(row.get("prediction_task", "")) - if prediction_task == "binary_classification": - n_classes = row.get("n_classes", np.nan) - if pd.notna(n_classes) and int(n_classes) != 2: - raise ValueError( - "Multiclass classification detected; provide a `dummy_score` column." - ) - dummy = float(row.get("dummy_score", 0.5)) - perfect = 1.0 - elif prediction_task == "regression": - dummy = 0.0 - perfect = 1.0 - else: - raise ValueError( - f"Unsupported prediction task for normalization: {prediction_task}" - ) - - score_norm = (float(score_raw) - dummy) / (perfect - dummy) - return float(np.clip(score_norm, 0.0, 1.0)) - - -def minmax_normalize_with_baseline( - df: pd.DataFrame, - score_col: str = "score_raw", - group_cols: Sequence[str] = ("dataset", "target_clean", "prediction_task"), -) -> pd.DataFrame: - out = df.copy() - if score_col not in out.columns: - raise ValueError( - f"Missing score column '{score_col}' for min-max normalization" - ) - - def _baseline(row: pd.Series) -> float: - task = str(row.get("prediction_task", "")) - if task == "binary_classification": - n_classes = row.get("n_classes", np.nan) - if pd.notna(n_classes) and int(n_classes) != 2: - raise ValueError( - "Multiclass classification detected; provide a `dummy_score` column." - ) - return 0.5 - if task == "regression": - # These spread plots use R2 for regression, where dummy baseline is 0. - return 0.0 - raise ValueError(f"Unsupported prediction task for normalization: {task}") - - out["_baseline"] = out.apply(_baseline, axis=1) - out["_group_max"] = out.groupby(list(group_cols), dropna=False)[ - score_col - ].transform("max") - denom = out["_group_max"] - out["_baseline"] - - out["score_norm"] = 0.0 - valid = denom > 0 - out.loc[valid, "score_norm"] = ( - out.loc[valid, score_col] - out.loc[valid, "_baseline"] - ) / denom.loc[valid] - out["score_norm"] = out["score_norm"].clip(0.0, 1.0) - out = out.drop(columns=["_baseline", "_group_max"]) - return out - - -def aggregate_run_scores( - df: pd.DataFrame, - score_col: str = "score_norm", -) -> pd.DataFrame: - if score_col not in df.columns: - raise ValueError(f"Missing score column '{score_col}' for run aggregation") - - base_cols = [ - "dataset", - "target_clean", - "prediction_task", - "model_family", - "model_name", - "primary_metric", - "tissue_type", - ] - base_cols = [col for col in base_cols if col in df.columns] - - identity_cols = [ - col - for col in [ - "run_id", - "config.runtime.run_id", - "seed", - "split", - "config.runtime.learning_curve_id", - ] - if col in df.columns - ] - has_fold_rows = "fold" in df.columns and df["fold"].notna().any() - - # If we have no fold/seed/split/run identifiers, every row is a run by default. - if not identity_cols and not has_fold_rows: - out = df.copy() - out["score_norm_run"] = out[score_col].astype(float) - return out - - group_cols = base_cols + identity_cols - run_df = ( - df.groupby(group_cols, dropna=False, as_index=False)[score_col] - .mean() - .rename(columns={score_col: "score_norm_run"}) - ) - return run_df - - -def make_dataset_task_label(dataset: str, target_clean: str) -> str: - return f"{dataset}::{target_clean}" - - -def ordered_dataset_task_labels_from_combos( - present_labels: Sequence[str], - combos: Sequence[Tuple[str, str, str]], -) -> List[str]: - seen = set(present_labels) - ordered: List[str] = [] - for dataset, target, _task in combos: - label = make_dataset_task_label(dataset, target) - if label in seen: - ordered.append(label) - return ordered diff --git a/scripts/visualization_backup/white_vs_gray_dataset_task_families_plot.py b/scripts/visualization_backup/white_vs_gray_dataset_task_families_plot.py deleted file mode 100644 index ce32f0f4..00000000 --- a/scripts/visualization_backup/white_vs_gray_dataset_task_families_plot.py +++ /dev/null @@ -1,447 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path - -import matplotlib -import numpy as np -import pandas as pd -import seaborn as sns - -matplotlib.use("Agg") -import matplotlib.pyplot as plt -from matplotlib.patches import Patch -from scipy.stats import false_discovery_control - -from config import MICCAI_DOUBLE_COLUMN_FIGSIZE, apply_miccai_style -from utils import ( - choose_spread_metric, - clean_target, - filter_combos, - fold_columns, - format_label, - is_dummy_model, - map_model_family, - select_best_runs, -) - -COMBOS = [ - ("hcp", "Sex", "binary_classification"), - ("hcp", "Age", "regression"), - ("camcan", "Sex", "binary_classification"), - ("camcan", "Age", "regression"), - ("abide", "DX_GROUP", "binary_classification"), -] - -MODEL_FAMILY_MAP = { - "Linear": "Linear", - "RandomForest": "Random Forest", - "DeepEmbedding+LinearHead": "Deep", -} -MODEL_FAMILY_ORDER = ["Linear", "Random Forest", "Deep"] - -PLOT_TITLE = "White vs Gray Matter Tissue Effect by Dataset-Target" -Y_AXIS_LABEL = "\u0394 Normalized score (white \u2212 gray)" -TOP_REGION_LABEL = "White matter wins" -BOTTOM_REGION_LABEL = "Gray matter wins" -TOP_REGION_COLOR = "#D6E4F1" -BOTTOM_REGION_COLOR = "#FAEFDB" -Y_LIM = 1.0 - -FAMILY_COLORS = { - "Linear": "#A8BEDD", # lighter version of #4C78A8 - "Random Forest": "#A8D4A0", # lighter version of #59A14F - "Deep": "#F0AEAF", # lighter version of #E15759 -} -FAMILY_POINT_COLORS = { - "Linear": "#4C78A8", # same as combined_plot.py - "Random Forest": "#59A14F", # same as combined_plot.py - "Deep": "#E15759", # medicalnet color from combined_plot.py -} - - -def _combo_label(dataset: str, target: str) -> str: - return f"{dataset}::{str(target).lower()}" - - -def _load_scope(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, COMBOS) - if df.empty: - raise RuntimeError("No rows left after filtering requested dataset-target-task combos") - return df - - -def _select_best_tissue_rows( - feature_df: pd.DataFrame, - higher_is_better: bool, -) -> tuple[pd.Series, pd.Series] | None: - white_rows = feature_df[feature_df["tissue_type"] == "white"] - gray_rows = feature_df[feature_df["tissue_type"] == "gray"] - if white_rows.empty or gray_rows.empty: - return None - - if higher_is_better: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmax()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmax()] - else: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmin()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmin()] - return best_white, best_gray - - -def _normalize_fold_val(val: float, prediction_task: str) -> float: - if prediction_task == "binary_classification": - return (val - 0.5) / 0.5 - return float(val) - - -def _collect_pairwise_effects(df: pd.DataFrame) -> pd.DataFrame: - rows = [] - for (dataset, target, task), group in df.groupby( - ["dataset", "target_clean", "prediction_task"], dropna=False - ): - try: - fold_prefix, _metric_label = choose_spread_metric(group, task) - except (RuntimeError, ValueError): - continue - - best = select_best_runs(group, fold_prefix, higher_is_better=True) - if best.empty or "_fold_mean" not in best.columns: - continue - - best = best[~best["model_name"].apply(is_dummy_model)].copy() - if best.empty: - continue - - best["family"] = best["model_name"].map(map_model_family).map(MODEL_FAMILY_MAP) - best = best[best["family"].isin(MODEL_FAMILY_ORDER)].copy() - if best.empty: - continue - - fold_cols = fold_columns(best, fold_prefix) - if not fold_cols: - continue - - for family, family_df in best.groupby("family", dropna=False): - for feature, feature_df in family_df.groupby("primary_metric", dropna=False): - best_tissues = _select_best_tissue_rows(feature_df, higher_is_better=True) - if best_tissues is None: - continue - best_white, best_gray = best_tissues - - white_vals = np.asarray(best_white[fold_cols].values, dtype=float) - gray_vals = np.asarray(best_gray[fold_cols].values, dtype=float) - valid = np.isfinite(white_vals) & np.isfinite(gray_vals) - white_vals = white_vals[valid] - gray_vals = gray_vals[valid] - if white_vals.size == 0: - continue - - norm_white = np.array([_normalize_fold_val(v, task) for v in white_vals]) - norm_gray = np.array([_normalize_fold_val(v, task) for v in gray_vals]) - diffs = norm_white - norm_gray - - for fold_idx, diff in enumerate(diffs): - rows.append( - { - "dataset": dataset, - "target": target, - "task": task, - "feature": str(feature), - "family": family, - "fold": fold_idx, - "normalized_diff": float(diff), - "combo_label": _combo_label(dataset, target), - } - ) - - return pd.DataFrame(rows) - - -def _center_dataset_effects(diffs: pd.DataFrame) -> pd.DataFrame: - """Remove feature baseline offsets using all fold rows (no fold aggregation).""" - feature_means = ( - diffs.groupby("feature")["normalized_diff"].mean().rename("feature_mean").reset_index() - ) - out = diffs.merge(feature_means, on="feature", how="left") - out = out.copy() - out["normalized_diff"] = out["normalized_diff"] - out["feature_mean"] - return out.drop(columns=["feature_mean"]) - - -def _ordered_combo_labels(plot_df: pd.DataFrame) -> list[str]: - present = set(plot_df["combo_label"].dropna().astype(str).tolist()) - ordered = [] - for dataset, target, _task in COMBOS: - label = _combo_label(dataset, target) - if label in present: - ordered.append(label) - return ordered - - -def _fold_level_ttest_pvalue(values: np.ndarray) -> float: - from scipy.stats import ttest_1samp - - values = np.asarray(values, dtype=float) - values = values[np.isfinite(values)] - if values.size < 2: - return float("nan") - result = ttest_1samp(values, popmean=0.0, nan_policy="omit") - if np.isnan(result.pvalue): - return float("nan") - return float(result.pvalue) - - -def _compute_family_pvalues(plot_df: pd.DataFrame, order: list[str]) -> dict[tuple[str, str], float]: - pvals: dict[tuple[str, str], float] = {} - for combo_label in order: - combo_df = plot_df[plot_df["combo_label"] == combo_label] - for family in MODEL_FAMILY_ORDER: - subset = combo_df[combo_df["family"] == family] - if subset.empty: - pvals[(combo_label, family)] = float("nan") - continue - pvals[(combo_label, family)] = _fold_level_ttest_pvalue( - subset["normalized_diff"].to_numpy(dtype=float) - ) - return pvals - - -def _format_pvalue(p_value: float) -> str: - if not np.isfinite(p_value): - return "p=n/a" - if p_value < 0.001: - return "p<0.001" - return f"p={p_value:.3f}" - - -def _plot_family_comparison(plot_df: pd.DataFrame, output_file: Path) -> None: - if plot_df.empty: - raise RuntimeError("No white-vs-gray effects available for plotting") - - order = _ordered_combo_labels(plot_df) - if not order: - raise RuntimeError("No requested dataset-target combinations available for plotting") - - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - fig_w = max(base_w, 1.55 * len(order) + 0.6) - fig_h = max(base_h, 3.1) - fig, ax = plt.subplots(figsize=(fig_w, fig_h)) - - box_width = 0.72 - sns.boxplot( - data=plot_df, - x="combo_label", - y="normalized_diff", - hue="family", - order=order, - hue_order=MODEL_FAMILY_ORDER, - palette=FAMILY_COLORS, - width=box_width, - linewidth=1.0, - showfliers=False, - ax=ax, - ) - sns.stripplot( - data=plot_df, - x="combo_label", - y="normalized_diff", - hue="family", - order=order, - hue_order=MODEL_FAMILY_ORDER, - palette=FAMILY_POINT_COLORS, - dodge=True, - size=3.2, - alpha=0.45, - jitter=0.16, - ax=ax, - ) - - if ax.legend_ is not None: - ax.legend_.remove() - legend_handles = [ - Patch(facecolor=FAMILY_COLORS[family], edgecolor="#3a3a3a", label=f"{family} models") - for family in MODEL_FAMILY_ORDER - ] - ax.legend( - handles=legend_handles, - loc="upper left", - bbox_to_anchor=(0.0, 1.0), - frameon=True, - framealpha=0.85, - edgecolor="none", - ) - - # pvals = _compute_family_pvalues(plot_df, order) - # --- Compute raw p-values --- - raw_pvals_dict = _compute_family_pvalues(plot_df, order) - - # Collect finite p-values for FDR correction - keys = [] - raw_pvals = [] - for key, p in raw_pvals_dict.items(): - if np.isfinite(p): - keys.append(key) - raw_pvals.append(p) - - raw_pvals = np.asarray(raw_pvals, dtype=float) - - # --- Apply Benjamini–Hochberg FDR --- - adjusted_dict = raw_pvals_dict.copy() - if raw_pvals.size > 0: - adjusted_pvals = false_discovery_control(raw_pvals, method="bh") - for key, p_adj in zip(keys, adjusted_pvals): - adjusted_dict[key] = float(p_adj) - - pvals = adjusted_dict - group_max = plot_df.groupby(["combo_label", "family"])["normalized_diff"].max() - y_pad = 0.06 * Y_LIM - y_cap = 1.05 * Y_LIM # place p-values above y=1, in the clear headroom - y_floor = 0.08 * Y_LIM # never let a p-value sit at or below the zero line - # Vertical step between staggered p-value labels to avoid overlap - y_stagger_step = 0.10 * Y_LIM - - n_families = len(MODEL_FAMILY_ORDER) - offsets = np.linspace( - -box_width / 2.0 + box_width / (2.0 * n_families), - box_width / 2.0 - box_width / (2.0 * n_families), - n_families, - ) - family_offsets = dict(zip(MODEL_FAMILY_ORDER, offsets, strict=False)) - - for idx, combo_label in enumerate(order): - # Collect candidate y positions for all families in this group - candidate_y: dict[str, float] = {} - for family in MODEL_FAMILY_ORDER: - subset = plot_df[ - (plot_df["combo_label"] == combo_label) & (plot_df["family"] == family) - ] - if subset.empty: - continue - box_top = group_max.get((combo_label, family), np.nan) - y_text = y_cap if not np.isfinite(box_top) else min(float(box_top) + y_pad, y_cap) - candidate_y[family] = max(y_floor, y_text) - - # Resolve overlaps: sort families by their candidate y, then stagger if too close - sorted_families = sorted(candidate_y.keys(), key=lambda f: candidate_y[f]) - resolved_y: dict[str, float] = {} - for i, family in enumerate(sorted_families): - y = candidate_y[family] - if i > 0: - prev_family = sorted_families[i - 1] - prev_y = resolved_y[prev_family] - if y - prev_y < y_stagger_step: - y = prev_y + y_stagger_step - # Clamp: never below the floor, never above the ceiling - resolved_y[family] = max(y_floor, min(y, y_cap + (n_families - 1) * y_stagger_step)) - - for family in MODEL_FAMILY_ORDER: - subset = plot_df[ - (plot_df["combo_label"] == combo_label) & (plot_df["family"] == family) - ] - if subset.empty: - continue - x_pos = idx + family_offsets[family] - # Nudge the Random Forest p-value label slightly right so it doesn't - # land on the left edge of the adjacent Deep models box. - if family == "Random Forest": - x_pos -= 0.02 - ax.text( - x_pos, - resolved_y[family], - _format_pvalue(pvals[(combo_label, family)]), - ha="center", - va="bottom", - fontsize=7, - color="#303030", - ) - - ax.axhspan(0.0, Y_LIM * 1.35, color=TOP_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhspan(-Y_LIM, 0.0, color=BOTTOM_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhline(0.0, color="#333333", linewidth=1.0) - ax.set_ylim(-Y_LIM, Y_LIM * 1.35) - ax.set_yticks([-1.0, -0.5, 0.0, 0.5, 1.0]) - ax.set_xlabel("") - ax.set_ylabel(Y_AXIS_LABEL) - ax.set_title(PLOT_TITLE, pad=12) - ax.set_xticks(np.arange(len(order))) - ax.set_xticklabels([format_label(label) for label in order], rotation=18, ha="right") - ax.text( - 0.5, - Y_LIM * 1.26, - TOP_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="top", - fontweight="bold", - color="#606060", - ) - ax.text( - 0.5, - -Y_LIM * 0.94, - BOTTOM_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="bottom", - fontweight="bold", - color="#606060", - ) - ax.grid(axis="y", alpha=0.3, linestyle="--") - ax.grid(axis="x", visible=False) - sns.despine(ax=ax, top=True, right=True) - - fig.tight_layout() - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def generate_white_vs_gray_family_comparison( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", -) -> Path: - apply_miccai_style() - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_scope(parquet_path) - plot_df = _collect_pairwise_effects(df) - plot_df = _center_dataset_effects(plot_df) - if plot_df.empty: - raise RuntimeError( - "No valid white-vs-gray paired effects found for the selected combos and families" - ) - - _plot_family_comparison( - plot_df, - output_file=out_path / "white_vs_gray_dataset_task_linear_rf_deep.pdf", - ) - return out_path - - -def main() -> None: - parser = argparse.ArgumentParser( - description=( - "Plot white-vs-gray normalized score differences by dataset-target for " - "Linear, Random Forest, and Deep model families" - ) - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/folds", - help="Output directory", - ) - args = parser.parse_args() - - out_path = generate_white_vs_gray_family_comparison(args.input, args.outdir) - print("Saved white-vs-gray family comparison plot to", out_path) - - -if __name__ == "__main__": - main() diff --git a/scripts/visualization_backup/white_vs_gray_plots copy.py b/scripts/visualization_backup/white_vs_gray_plots copy.py deleted file mode 100644 index 98cebdbb..00000000 --- a/scripts/visualization_backup/white_vs_gray_plots copy.py +++ /dev/null @@ -1,761 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path - -import numpy as np -import pandas as pd -import matplotlib -import seaborn as sns - -matplotlib.use("Agg") -import matplotlib.pyplot as plt - -from config import ( - MICCAI_DOUBLE_COLUMN_FIGSIZE, - apply_miccai_style, -) -from utils import ( - DEFAULT_COMBOS, - LINEAR_MODELS, - RANDOM_FOREST_MODELS, - calculate_paired_ttest, - choose_spread_metric, - clean_target, - filter_combos, - fold_columns, - format_label, - get_display_label, - is_dummy_model, - select_best_runs, -) - -CLASSICAL_MODELS = LINEAR_MODELS | RANDOM_FOREST_MODELS - -PLOT_TITLES = { - "full": "White vs Gray Matter: Normalized Score Difference (All Dataset/Target/Task/Feature)", - "dataset": "White vs Gray Matter: Dataset Tissue Effect (Feature Baseline Removed)", - "feature": "White vs Gray Matter: Feature Tissue Effect (Dataset-Task Baseline Removed)", - "pair": "White vs Gray Matter: Aggregated Tissue Effect Comparison", -} -X_AXIS_LABEL = "\u0394 Normalized score (white \u2212 gray)" -LEFT_REGION_LABEL = "Gray matter wins" -RIGHT_REGION_LABEL = "White matter wins" -POINTS_COLOR = "#4C78A8" -MEAN_STD_COLOR = "#B22222" -BOX_COLOR = "#D6E3F3" -AGG_PANEL_XLABELS = ("By Dataset (feature effect removed)", "By Feature (dataset effect removed)") -TOP_REGION_COLOR = "#D6E4F1" -BOTTOM_REGION_COLOR = "#FAEFDB" -TOP_REGION_LABEL = "White matter wins" -BOTTOM_REGION_LABEL = "Gray matter wins" - - -def _load_filtered_results(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, DEFAULT_COMBOS) - if df.empty: - raise RuntimeError("No rows left after filtering combos") - return df - - -def _select_best_tissue_rows( - feature_df: pd.DataFrame, - higher_is_better: bool, -) -> tuple[pd.Series, pd.Series] | None: - white_rows = feature_df[feature_df["tissue_type"] == "white"] - gray_rows = feature_df[feature_df["tissue_type"] == "gray"] - if white_rows.empty or gray_rows.empty: - return None - - if higher_is_better: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmax()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmax()] - else: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmin()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmin()] - - return best_white, best_gray - - -def _normalize_fold_val(val: float, prediction_task: str) -> float: - """Map a raw fold metric value to [0, 1] relative to dummy baseline. - - - Binary classification (balanced accuracy): dummy = 0.5, perfect = 1.0 - - Regression (R²): dummy = 0.0, perfect = 1.0 - """ - if prediction_task == "binary_classification": - return (val - 0.5) / 0.5 - return float(val) # R²: already 0 = dummy, 1 = perfect - - -def _collect_pairwise_effects(df: pd.DataFrame) -> pd.DataFrame: - """Collect fold-level normalized score differences (white − gray) per dataset/target/task/feature.""" - rows = [] - - for (dataset, target, task), group in df.groupby(["dataset", "target_clean", "prediction_task"]): - try: - fold_prefix, metric_label = choose_spread_metric(group, task) - except (RuntimeError, ValueError): - continue - - # choose_spread_metric always returns higher-is-better metrics (R² / balanced accuracy) - higher_is_better = True - best = select_best_runs(group, fold_prefix, higher_is_better) - if best.empty or "_fold_mean" not in best.columns: - continue - - best = best[~best["model_name"].apply(is_dummy_model)] - best = best[best["model_name"].isin(CLASSICAL_MODELS)] - if best.empty: - continue - - fold_cols = fold_columns(best, fold_prefix) - if not fold_cols: - continue - - for feature, feature_df in best.groupby("primary_metric"): - best_tissues = _select_best_tissue_rows(feature_df, higher_is_better) - if best_tissues is None: - continue - best_white, best_gray = best_tissues - - white_vals = np.asarray(best_white[fold_cols].values, dtype=float) - gray_vals = np.asarray(best_gray[fold_cols].values, dtype=float) - - valid = np.isfinite(white_vals) & np.isfinite(gray_vals) - white_vals = white_vals[valid] - gray_vals = gray_vals[valid] - if white_vals.size == 0: - continue - - # Normalize each fold to [0,1] then subtract: positive = white matter wins - norm_white = np.array([_normalize_fold_val(v, task) for v in white_vals]) - norm_gray = np.array([_normalize_fold_val(v, task) for v in gray_vals]) - diffs = norm_white - norm_gray - - # P-value from paired t-test on raw values (linear scaling preserves significance) - p_value = calculate_paired_ttest(white_vals, gray_vals) - - for fold_idx, diff in enumerate(diffs): - rows.append( - { - "dataset": dataset, - "target": target, - "task": task, - "feature": feature, - "metric_label": metric_label, - "fold": fold_idx, - "normalized_diff": float(diff), - "p_value": float(p_value), - } - ) - - return pd.DataFrame(rows) - - -def _center_dataset_effects(diffs: pd.DataFrame) -> pd.DataFrame: - """Remove feature baseline offsets to isolate dataset-task-specific tissue effects. - - Procedure: - 1. Collapse fold-level diffs to one mean effect per (dataset, target, task, feature) - so that fold count imbalance does not distort the baseline estimate. - 2. Compute the feature baseline: mean of those per-combination means across all - (dataset, target, task) combinations for each feature. - 3. Residualize each individual fold: normalized_diff -= feature_baseline. - - Fold-level rows are preserved so individual folds appear in the plot. - """ - group_cols = ["dataset", "target", "task", "feature", "metric_label"] - # Step 1: per-combination means for baseline estimation - combo_means = ( - diffs.groupby(group_cols, as_index=False)["normalized_diff"] - .mean() - ) - - # Step 2: feature baseline = mean of combo means across dataset/target/task - cluster_means = ( - combo_means.groupby(["feature"])["normalized_diff"] - .mean() - .rename("cluster_mean") - .reset_index() - ) - - # Step 3: apply residual to every fold-level row - result = diffs.merge(cluster_means, on=["feature"], how="left") - result = result.copy() - result["normalized_diff"] = result["normalized_diff"] - result["cluster_mean"] - result = result.drop(columns=["cluster_mean"]) - - return result - - -def _center_feature_effects(diffs: pd.DataFrame) -> pd.DataFrame: - """Remove dataset-task baseline offsets to isolate feature-specific tissue effects. - - Procedure: - 1. Collapse fold-level diffs to one mean effect per (dataset, target, task, feature) - so that fold count imbalance does not distort the baseline estimate. - 2. Compute the dataset-task cluster baseline: mean of those per-combination means - across all features within each (dataset, target, task) group. - 3. Residualize each individual fold: normalized_diff -= cluster_baseline. - - Fold-level rows are preserved so individual folds appear in the plot. - """ - group_cols = ["dataset", "target", "task", "feature", "metric_label"] - # Step 1: per-combination means for baseline estimation - combo_means = ( - diffs.groupby(group_cols, as_index=False)["normalized_diff"] - .mean() - ) - - # Step 2: dataset-task baseline = mean of combo means across features in each cluster - cluster_cols = ["dataset", "target", "task"] - cluster_means = ( - combo_means.groupby(cluster_cols)["normalized_diff"] - .mean() - .rename("cluster_mean") - .reset_index() - ) - - # Step 3: apply residual to every fold-level row - result = diffs.merge(cluster_means, on=cluster_cols, how="left") - result = result.copy() - result["normalized_diff"] = result["normalized_diff"] - result["cluster_mean"] - result = result.drop(columns=["cluster_mean"]) - - return result - - -def _build_labels( - diffs: pd.DataFrame, - view: str, - aggregate_tasks: bool, -) -> pd.DataFrame: - plot_df = diffs.copy() - - if view == "full": - plot_df["label"] = plot_df.apply( - lambda r: ( - f"{get_display_label(r['dataset'], r['target'], r['task'], r['metric_label'])}" - f" | {format_label(r['feature'])}" - ), - axis=1, - ) - return plot_df - - if view == "dataset": - if aggregate_tasks: - plot_df["label"] = plot_df["dataset"].map(format_label) - else: - plot_df["label"] = plot_df.apply( - lambda r: f"{format_label(r['dataset'])} | {format_label(r['task'])}", - axis=1, - ) - return plot_df - - if view == "feature": - if aggregate_tasks: - plot_df["label"] = plot_df["feature"].map(format_label) - else: - plot_df["label"] = plot_df.apply( - lambda r: f"{format_label(r['feature'])} | {format_label(r['task'])}", - axis=1, - ) - return plot_df - - raise ValueError(f"Unknown view: {view}") - - -def _get_plot_order(plot_df: pd.DataFrame) -> list[str]: - return ( - plot_df.groupby("label")["normalized_diff"] - .mean() - .sort_values(ascending=False) - .index.tolist() - ) - - -def _init_plot_canvas(n_labels: int) -> tuple[plt.Figure, plt.Axes]: - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - fig_h = max(base_h, 0.42 * n_labels) - return plt.subplots(figsize=(base_w, fig_h)) - - -def _finalize_effect_axis(ax: plt.Axes, title: str) -> None: - ax.axvline(0.0, color="#333333", linewidth=1.0) - ax.set_xlabel(X_AXIS_LABEL) - ax.set_ylabel("") - ax.set_title(title, pad=14) - ax.text( - 0.02, - 1.01, - LEFT_REGION_LABEL, - transform=ax.transAxes, - ha="left", - va="bottom", - fontweight="bold", - color="gray", - ) - ax.text( - 0.98, - 1.01, - RIGHT_REGION_LABEL, - transform=ax.transAxes, - ha="right", - va="bottom", - fontweight="bold", - color="gray", - ) - - -def _plot_strip_with_mean_std( - plot_df: pd.DataFrame, - title: str, - output_file: Path, -) -> None: - if plot_df.empty: - raise RuntimeError("No white/gray differences available for plotting") - - order = _get_plot_order(plot_df) - fig, ax = _init_plot_canvas(len(order)) - - sns.stripplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=POINTS_COLOR, - size=5, - alpha=0.6, - jitter=0.15, - ax=ax, - ) - - summary = ( - plot_df.groupby("label")["normalized_diff"] - .agg(mean="mean", std=lambda s: s.std(ddof=1)) - .reindex(order) - ) - summary["std"] = summary["std"].fillna(0.0) - y_pos = np.arange(len(order)) - - ax.errorbar( - x=summary["mean"].to_numpy(dtype=float), - y=y_pos, - xerr=summary["std"].to_numpy(dtype=float), - fmt="D", - color=MEAN_STD_COLOR, - ecolor=MEAN_STD_COLOR, - elinewidth=1.2, - capsize=3, - markersize=5, - zorder=5, - ) - - _finalize_effect_axis(ax, title) - fig.tight_layout() - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def _draw_box_with_points( - ax: plt.Axes, - plot_df: pd.DataFrame, - order: list[str], - vertical: bool, -) -> None: - if vertical: - sns.boxplot( - data=plot_df, - x="label", - y="normalized_diff", - order=order, - color=BOX_COLOR, - width=0.55, - linewidth=1.0, - showfliers=False, - ax=ax, - ) - sns.stripplot( - data=plot_df, - x="label", - y="normalized_diff", - order=order, - color=POINTS_COLOR, - size=3.5, - alpha=0.5, - jitter=0.22, - ax=ax, - ) - else: - sns.boxplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=BOX_COLOR, - width=0.55, - linewidth=1.0, - showfliers=False, - ax=ax, - ) - sns.stripplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=POINTS_COLOR, - size=4, - alpha=0.5, - jitter=0.18, - ax=ax, - ) - - -def _format_p_value_label(p_value: float) -> str: - return f"pval={p_value:.5f}" - - -def _cluster_mean_ttest_pvalue( - values: np.ndarray, - cluster_ids: np.ndarray, -) -> float: - """Aggregate to one effect per independent pair, then test mean effect vs 0.""" - from scipy.stats import ttest_1samp - - values = np.asarray(values, dtype=float) - cluster_ids = np.asarray(cluster_ids) - - valid_mask = np.isfinite(values) - values = values[valid_mask] - cluster_ids = cluster_ids[valid_mask] - if values.size == 0: - return float("nan") - - # One independent effect per dataset/target/task(/feature) pair. - cluster_means = ( - pd.DataFrame({"cluster_id": cluster_ids, "value": values}) - .groupby("cluster_id", sort=False)["value"] - .mean() - .to_numpy(dtype=float) - ) - n_clusters = cluster_means.size - if n_clusters < 2: - return float("nan") - - res = ttest_1samp(cluster_means, popmean=0.0, nan_policy="omit") - if np.isnan(res.pvalue): - return float("nan") - return float(res.pvalue) - - -def _cluster_mean_effect_size( - values: np.ndarray, - cluster_ids: np.ndarray, -) -> float: - """ - Compute paired Cohen's d using one mean effect per independent cluster. - """ - values = np.asarray(values, dtype=float) - cluster_ids = np.asarray(cluster_ids) - - valid_mask = np.isfinite(values) - values = values[valid_mask] - cluster_ids = cluster_ids[valid_mask] - if values.size == 0: - return float("nan") - - cluster_means = ( - pd.DataFrame({"cluster_id": cluster_ids, "value": values}) - .groupby("cluster_id", sort=False)["value"] - .mean() - .to_numpy(dtype=float) - ) - - n_clusters = cluster_means.size - if n_clusters < 2: - return float("nan") - - mean_effect = np.mean(cluster_means) - std_effect = np.std(cluster_means, ddof=1) - - if std_effect == 0: - return float("nan") - - return float(mean_effect / std_effect) - - -def _compute_aggregated_label_effect_sizes(plot_df: pd.DataFrame, order: list[str]) -> pd.Series: - effect_sizes: dict[str, float] = {} - for label in order: - label_rows = plot_df[plot_df["label"] == label] - cluster_ids = label_rows[["dataset", "target", "task", "feature"]].astype(str).agg( - "|".join, - axis=1, - ) - - effect_sizes[label] = _cluster_mean_effect_size( - label_rows["normalized_diff"].to_numpy(dtype=float), - cluster_ids.to_numpy(), - ) - - return pd.Series(effect_sizes).reindex(order) - - -def _compute_aggregated_label_pvalues(plot_df: pd.DataFrame, order: list[str]) -> pd.Series: - pvals: dict[str, float] = {} - for label in order: - label_rows = plot_df[plot_df["label"] == label] - cluster_ids = label_rows[["dataset", "target", "task", "feature"]].astype(str).agg( - "|".join, - axis=1, - ) - pvals[label] = _cluster_mean_ttest_pvalue( - label_rows["normalized_diff"].to_numpy(dtype=float), - cluster_ids.to_numpy(), - ) - return pd.Series(pvals).reindex(order) - - -def _annotate_panel_statistics( - ax: plt.Axes, - plot_df: pd.DataFrame, - order: list[str], - y_lim: float, -) -> None: - pvals = _compute_aggregated_label_pvalues(plot_df, order) - effects = _compute_aggregated_label_effect_sizes(plot_df, order) - - ymax = plot_df.groupby("label")["normalized_diff"].max().reindex(order) - y_padding = 0.06 * y_lim - y_cap = 0.86 * y_lim - - for xpos, label in enumerate(order): - p_value = pvals.get(label, np.nan) - d_value = effects.get(label, np.nan) - - box_top = ymax.get(label, np.nan) - y_text = y_cap if not np.isfinite(box_top) else min(float(box_top) + y_padding, y_cap) - - stat_label = f"p={p_value:.4f}\nd={d_value:.2f}" - - ax.text( - xpos, - y_text, - stat_label, - ha="center", - va="bottom", - fontsize=7, - color="#303030", - ) - - -def _plot_box_with_points( - plot_df: pd.DataFrame, - title: str, - output_file: Path, -) -> None: - if plot_df.empty: - raise RuntimeError("No white/gray differences available for plotting") - - order = _get_plot_order(plot_df) - fig, ax = _init_plot_canvas(len(order)) - _draw_box_with_points(ax, plot_df, order, vertical=False) - - _finalize_effect_axis(ax, title) - fig.tight_layout() - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def _plot_aggregated_pair_comparison( - dataset_df: pd.DataFrame, - feature_df: pd.DataFrame, - output_file: Path, -) -> None: - if dataset_df.empty or feature_df.empty: - raise RuntimeError("No aggregated white/gray differences available for combined plotting") - - dataset_order = _get_plot_order(dataset_df) - feature_order = _get_plot_order(feature_df) - - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - # The combined plot needs more height than the base figsize to accommodate - # a suptitle, supylabel, two sets of rotated x-tick labels, and the plot area. - fig_h = 3.0 - - fig, axes = plt.subplots( - 1, - 2, - figsize=(base_w, fig_h), - sharey=True, - constrained_layout=True, - ) - - _draw_box_with_points(axes[0], dataset_df, dataset_order, vertical=True) - _draw_box_with_points(axes[1], feature_df, feature_order, vertical=True) - - y_lim = 0.8 - forced_ticks = [-0.8, -0.4, 0.0, 0.4, 0.8] - - panel_defs = ( - (axes[0], dataset_df, dataset_order), - (axes[1], feature_df, feature_order), - ) - for ax, panel_df, panel_order in panel_defs: - ax.axhspan(0.0, y_lim, color=TOP_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhspan(-y_lim, 0.0, color=BOTTOM_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhline(0.0, color="#333333", linewidth=1.0) - ax.set_ylim(-y_lim, y_lim) - ax.set_yticks(forced_ticks) - ax.set_ylabel("") - ax.tick_params(axis="x", rotation=35) - _annotate_panel_statistics(ax, panel_df, panel_order, y_lim) - ax.text( - 0.5, - y_lim * 0.93, - TOP_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="top", - fontweight="bold", - color="#606060", - ) - ax.text( - 0.5, - -y_lim * 0.93, - BOTTOM_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="bottom", - fontweight="bold", - color="#606060", - ) - - axes[0].set_xlabel(AGG_PANEL_XLABELS[0]) - axes[1].set_xlabel(AGG_PANEL_XLABELS[1]) - - # Let constrained_layout position suptitle/supylabel automatically — - # no hardcoded x/y offsets needed. - fig.suptitle(PLOT_TITLES["pair"]) - fig.supylabel(X_AXIS_LABEL) - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def generate_white_vs_gray_plots( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", - aggregate_tasks_dataset: bool = True, - aggregate_tasks_feature: bool = True, -) -> Path: - """Generate all white-vs-gray plot variants in a single run.""" - apply_miccai_style() - - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_filtered_results(parquet_path) - diffs = _collect_pairwise_effects(df) - if diffs.empty: - raise RuntimeError("No valid white/gray differences found") - - full_df = _build_labels(diffs, view="full", aggregate_tasks=False) - _plot_strip_with_mean_std( - full_df, - title=PLOT_TITLES["full"], - output_file=out_path / "white_vs_gray_tscore.pdf", - ) - - centered_diffs_dataset = _center_dataset_effects(diffs) - dataset_df = _build_labels( - centered_diffs_dataset, - view="dataset", - aggregate_tasks=aggregate_tasks_dataset, - ) - dataset_suffix = "dataset" if aggregate_tasks_dataset else "dataset_task_couples" - _plot_box_with_points( - dataset_df, - title=PLOT_TITLES["dataset"], - output_file=out_path / f"white_vs_gray_tscore_{dataset_suffix}.pdf", - ) - - centered_diffs = _center_feature_effects(diffs) - feature_df = _build_labels( - centered_diffs, - view="feature", - aggregate_tasks=aggregate_tasks_feature, - ) - feature_suffix = "feature" if aggregate_tasks_feature else "feature_task_couples" - _plot_box_with_points( - feature_df, - title=PLOT_TITLES["feature"], - output_file=out_path / f"white_vs_gray_tscore_{feature_suffix}.pdf", - ) - - _plot_aggregated_pair_comparison( - dataset_df, - feature_df, - output_file=out_path / f"white_vs_gray_tscore_{dataset_suffix}_{feature_suffix}_combined.pdf", - ) - - return out_path - - -def plot_white_vs_gray_tscore( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", - aggregate_tasks_dataset: bool = True, - aggregate_tasks_feature: bool = True, -) -> Path: - """Backward-compatible wrapper kept for existing callers.""" - return generate_white_vs_gray_plots( - parquet_path, - out_dir=out_dir, - aggregate_tasks_dataset=aggregate_tasks_dataset, - aggregate_tasks_feature=aggregate_tasks_feature, - ) - - -def main() -> None: - parser = argparse.ArgumentParser( - description=( - "Generate white-vs-gray tissue effect plots: full, dataset-aggregated, " - "and feature-aggregated" - ) - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/test", - help="Output directory", - ) - parser.add_argument( - "--dataset-task-couples", - action="store_true", - help="Show dataset|task couples instead of aggregating tasks in dataset view", - ) - parser.add_argument( - "--feature-task-couples", - action="store_true", - help="Show feature|task couples instead of aggregating tasks in feature view", - ) - args = parser.parse_args() - - out_path = generate_white_vs_gray_plots( - args.input, - out_dir=args.outdir, - aggregate_tasks_dataset=not args.dataset_task_couples, - aggregate_tasks_feature=not args.feature_task_couples, - ) - print("Saved white vs gray plots to", out_path) - - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/scripts/visualization_backup/white_vs_gray_plots.py b/scripts/visualization_backup/white_vs_gray_plots.py deleted file mode 100644 index 0af51d16..00000000 --- a/scripts/visualization_backup/white_vs_gray_plots.py +++ /dev/null @@ -1,696 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path - -import numpy as np -import pandas as pd -import matplotlib -import seaborn as sns - -matplotlib.use("Agg") -import matplotlib.pyplot as plt - -from config import ( - MICCAI_DOUBLE_COLUMN_FIGSIZE, - apply_miccai_style, -) -from utils import ( - DEFAULT_COMBOS, - calculate_paired_ttest, - choose_spread_metric, - clean_target, - filter_combos, - fold_columns, - format_label, - get_display_label, - is_dummy_model, - select_best_runs, -) - -PLOT_TITLES = { - "full": "White vs Gray Matter: Normalized Score Difference (All Dataset/Target/Task/Feature)", - "dataset": "White vs Gray Matter: Dataset Tissue Effect (Feature Baseline Removed)", - "feature": "White vs Gray Matter: Feature Tissue Effect (Dataset-Task Baseline Removed)", - "pair": "White vs Gray Matter: Aggregated Tissue Effect Comparison", -} -X_AXIS_LABEL = "\u0394 Normalized score (white \u2212 gray)" -LEFT_REGION_LABEL = "Gray matter wins" -RIGHT_REGION_LABEL = "White matter wins" -POINTS_COLOR = "#4C78A8" -MEAN_STD_COLOR = "#B22222" -BOX_COLOR = "#D6E3F3" -AGG_PANEL_XLABELS = ("By Dataset (feature effect removed)", "By Feature (dataset effect removed)") -TOP_REGION_COLOR = "#D6E4F1" -BOTTOM_REGION_COLOR = "#FAEFDB" -TOP_REGION_LABEL = "White matter wins" -BOTTOM_REGION_LABEL = "Gray matter wins" - - -def _load_filtered_results(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, DEFAULT_COMBOS) - if df.empty: - raise RuntimeError("No rows left after filtering combos") - return df - - -def _select_best_tissue_rows( - feature_df: pd.DataFrame, - higher_is_better: bool, -) -> tuple[pd.Series, pd.Series] | None: - white_rows = feature_df[feature_df["tissue_type"] == "white"] - gray_rows = feature_df[feature_df["tissue_type"] == "gray"] - if white_rows.empty or gray_rows.empty: - return None - - if higher_is_better: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmax()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmax()] - else: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmin()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmin()] - - return best_white, best_gray - - -def _normalize_fold_val(val: float, prediction_task: str) -> float: - """Map a raw fold metric value to [0, 1] relative to dummy baseline. - - - Binary classification (balanced accuracy): dummy = 0.5, perfect = 1.0 - - Regression (R²): dummy = 0.0, perfect = 1.0 - """ - if prediction_task == "binary_classification": - return (val - 0.5) / 0.5 - return float(val) # R²: already 0 = dummy, 1 = perfect - - -def _collect_pairwise_effects(df: pd.DataFrame) -> pd.DataFrame: - """Collect fold-level normalized score differences (white − gray) per dataset/target/task/feature.""" - rows = [] - - for (dataset, target, task), group in df.groupby(["dataset", "target_clean", "prediction_task"]): - try: - fold_prefix, metric_label = choose_spread_metric(group, task) - except (RuntimeError, ValueError): - continue - - # choose_spread_metric always returns higher-is-better metrics (R² / balanced accuracy) - higher_is_better = True - best = select_best_runs(group, fold_prefix, higher_is_better) - if best.empty or "_fold_mean" not in best.columns: - continue - - best = best[~best["model_name"].apply(is_dummy_model)] - if best.empty: - continue - - fold_cols = fold_columns(best, fold_prefix) - if not fold_cols: - continue - - for feature, feature_df in best.groupby("primary_metric"): - best_tissues = _select_best_tissue_rows(feature_df, higher_is_better) - if best_tissues is None: - continue - best_white, best_gray = best_tissues - - white_vals = np.asarray(best_white[fold_cols].values, dtype=float) - gray_vals = np.asarray(best_gray[fold_cols].values, dtype=float) - - valid = np.isfinite(white_vals) & np.isfinite(gray_vals) - white_vals = white_vals[valid] - gray_vals = gray_vals[valid] - if white_vals.size == 0: - continue - - # Normalize each fold to [0,1] then subtract: positive = white matter wins - norm_white = np.array([_normalize_fold_val(v, task) for v in white_vals]) - norm_gray = np.array([_normalize_fold_val(v, task) for v in gray_vals]) - diffs = norm_white - norm_gray - - # P-value from paired t-test on raw values (linear scaling preserves significance) - p_value = calculate_paired_ttest(white_vals, gray_vals) - - for fold_idx, diff in enumerate(diffs): - rows.append( - { - "dataset": dataset, - "target": target, - "task": task, - "feature": feature, - "metric_label": metric_label, - "fold": fold_idx, - "normalized_diff": float(diff), - "p_value": float(p_value), - } - ) - - return pd.DataFrame(rows) - - -def _center_dataset_effects(diffs: pd.DataFrame) -> pd.DataFrame: - """Remove feature baseline offsets to isolate dataset-task-specific tissue effects. - - Procedure: - 1. Collapse fold-level diffs to one mean effect per (dataset, target, task, feature) - so that fold count imbalance does not distort the baseline estimate. - 2. Compute the feature baseline: mean of those per-combination means across all - (dataset, target, task) combinations for each feature. - 3. Residualize each individual fold: normalized_diff -= feature_baseline. - - Fold-level rows are preserved so individual folds appear in the plot. - """ - group_cols = ["dataset", "target", "task", "feature", "metric_label"] - # Step 1: per-combination means for baseline estimation - combo_means = ( - diffs.groupby(group_cols, as_index=False)["normalized_diff"] - .mean() - ) - - # Step 2: feature baseline = mean of combo means across dataset/target/task - cluster_means = ( - combo_means.groupby(["feature"])["normalized_diff"] - .mean() - .rename("cluster_mean") - .reset_index() - ) - - # Step 3: apply residual to every fold-level row - result = diffs.merge(cluster_means, on=["feature"], how="left") - result = result.copy() - result["normalized_diff"] = result["normalized_diff"] - result["cluster_mean"] - result = result.drop(columns=["cluster_mean"]) - - return result - - -def _center_feature_effects(diffs: pd.DataFrame) -> pd.DataFrame: - """Remove dataset-task baseline offsets to isolate feature-specific tissue effects. - - Procedure: - 1. Collapse fold-level diffs to one mean effect per (dataset, target, task, feature) - so that fold count imbalance does not distort the baseline estimate. - 2. Compute the dataset-task cluster baseline: mean of those per-combination means - across all features within each (dataset, target, task) group. - 3. Residualize each individual fold: normalized_diff -= cluster_baseline. - - Fold-level rows are preserved so individual folds appear in the plot. - """ - group_cols = ["dataset", "target", "task", "feature", "metric_label"] - # Step 1: per-combination means for baseline estimation - combo_means = ( - diffs.groupby(group_cols, as_index=False)["normalized_diff"] - .mean() - ) - - # Step 2: dataset-task baseline = mean of combo means across features in each cluster - cluster_cols = ["dataset", "target", "task"] - cluster_means = ( - combo_means.groupby(cluster_cols)["normalized_diff"] - .mean() - .rename("cluster_mean") - .reset_index() - ) - - # Step 3: apply residual to every fold-level row - result = diffs.merge(cluster_means, on=cluster_cols, how="left") - result = result.copy() - result["normalized_diff"] = result["normalized_diff"] - result["cluster_mean"] - result = result.drop(columns=["cluster_mean"]) - - return result - - -def _build_labels( - diffs: pd.DataFrame, - view: str, - aggregate_tasks: bool, -) -> pd.DataFrame: - plot_df = diffs.copy() - - if view == "full": - plot_df["label"] = plot_df.apply( - lambda r: ( - f"{get_display_label(r['dataset'], r['target'], r['task'], r['metric_label'])}" - f" | {format_label(r['feature'])}" - ), - axis=1, - ) - return plot_df - - if view == "dataset": - if aggregate_tasks: - plot_df["label"] = plot_df["dataset"].map(format_label) - else: - plot_df["label"] = plot_df.apply( - lambda r: f"{format_label(r['dataset'])} | {format_label(r['task'])}", - axis=1, - ) - return plot_df - - if view == "feature": - if aggregate_tasks: - plot_df["label"] = plot_df["feature"].map(format_label) - else: - plot_df["label"] = plot_df.apply( - lambda r: f"{format_label(r['feature'])} | {format_label(r['task'])}", - axis=1, - ) - return plot_df - - raise ValueError(f"Unknown view: {view}") - - -def _get_plot_order(plot_df: pd.DataFrame) -> list[str]: - return ( - plot_df.groupby("label")["normalized_diff"] - .mean() - .sort_values(ascending=False) - .index.tolist() - ) - - -def _init_plot_canvas(n_labels: int) -> tuple[plt.Figure, plt.Axes]: - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - fig_h = max(base_h, 0.42 * n_labels) - return plt.subplots(figsize=(base_w, fig_h)) - - -def _finalize_effect_axis(ax: plt.Axes, title: str) -> None: - ax.axvline(0.0, color="#333333", linewidth=1.0) - ax.set_xlabel(X_AXIS_LABEL) - ax.set_ylabel("") - ax.set_title(title, pad=14) - ax.text( - 0.02, - 1.01, - LEFT_REGION_LABEL, - transform=ax.transAxes, - ha="left", - va="bottom", - fontweight="bold", - color="gray", - ) - ax.text( - 0.98, - 1.01, - RIGHT_REGION_LABEL, - transform=ax.transAxes, - ha="right", - va="bottom", - fontweight="bold", - color="gray", - ) - - -def _plot_strip_with_mean_std( - plot_df: pd.DataFrame, - title: str, - output_file: Path, -) -> None: - if plot_df.empty: - raise RuntimeError("No white/gray differences available for plotting") - - order = _get_plot_order(plot_df) - fig, ax = _init_plot_canvas(len(order)) - - sns.stripplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=POINTS_COLOR, - size=5, - alpha=0.6, - jitter=0.15, - ax=ax, - ) - - summary = ( - plot_df.groupby("label")["normalized_diff"] - .agg(mean="mean", std=lambda s: s.std(ddof=1)) - .reindex(order) - ) - summary["std"] = summary["std"].fillna(0.0) - y_pos = np.arange(len(order)) - - ax.errorbar( - x=summary["mean"].to_numpy(dtype=float), - y=y_pos, - xerr=summary["std"].to_numpy(dtype=float), - fmt="D", - color=MEAN_STD_COLOR, - ecolor=MEAN_STD_COLOR, - elinewidth=1.2, - capsize=3, - markersize=5, - zorder=5, - ) - - _finalize_effect_axis(ax, title) - fig.tight_layout() - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def _draw_box_with_points( - ax: plt.Axes, - plot_df: pd.DataFrame, - order: list[str], - vertical: bool, -) -> None: - if vertical: - sns.boxplot( - data=plot_df, - x="label", - y="normalized_diff", - order=order, - color=BOX_COLOR, - width=0.55, - linewidth=1.0, - showfliers=False, - ax=ax, - ) - sns.stripplot( - data=plot_df, - x="label", - y="normalized_diff", - order=order, - color=POINTS_COLOR, - size=3.5, - alpha=0.5, - jitter=0.22, - ax=ax, - ) - else: - sns.boxplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=BOX_COLOR, - width=0.55, - linewidth=1.0, - showfliers=False, - ax=ax, - ) - sns.stripplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=POINTS_COLOR, - size=4, - alpha=0.5, - jitter=0.18, - ax=ax, - ) - - -def _format_p_value_label(p_value: float) -> str: - return f"pval={p_value:.5f}" - - -def _cluster_mean_ttest_pvalue( - values: np.ndarray, - cluster_ids: np.ndarray, -) -> float: - """Aggregate to one effect per independent pair, then test mean effect vs 0.""" - from scipy.stats import ttest_1samp - - values = np.asarray(values, dtype=float) - cluster_ids = np.asarray(cluster_ids) - - valid_mask = np.isfinite(values) - values = values[valid_mask] - cluster_ids = cluster_ids[valid_mask] - if values.size == 0: - return float("nan") - - # One independent effect per dataset/target/task(/feature) pair. - cluster_means = ( - pd.DataFrame({"cluster_id": cluster_ids, "value": values}) - .groupby("cluster_id", sort=False)["value"] - .mean() - .to_numpy(dtype=float) - ) - n_clusters = cluster_means.size - if n_clusters < 2: - return float("nan") - - res = ttest_1samp(cluster_means, popmean=0.0, nan_policy="omit") - if np.isnan(res.pvalue): - return float("nan") - return float(res.pvalue) - - -def _compute_aggregated_label_pvalues(plot_df: pd.DataFrame, order: list[str]) -> pd.Series: - pvals: dict[str, float] = {} - for label in order: - label_rows = plot_df[plot_df["label"] == label] - cluster_ids = label_rows[["dataset", "target", "task", "feature"]].astype(str).agg( - "|".join, - axis=1, - ) - pvals[label] = _cluster_mean_ttest_pvalue( - label_rows["normalized_diff"].to_numpy(dtype=float), - cluster_ids.to_numpy(), - ) - return pd.Series(pvals).reindex(order) - - -def _annotate_panel_p_values( - ax: plt.Axes, - plot_df: pd.DataFrame, - order: list[str], - y_lim: float, -) -> None: - pvals = _compute_aggregated_label_pvalues(plot_df, order) - ymax = plot_df.groupby("label")["normalized_diff"].max().reindex(order) - y_padding = 0.06 * y_lim - y_cap = 0.86 * y_lim - - for xpos, label in enumerate(order): - p_value = pvals.get(label, np.nan) - box_top = ymax.get(label, np.nan) - y_text = y_cap if not np.isfinite(box_top) else min(float(box_top) + y_padding, y_cap) - ax.text( - xpos, - y_text, - _format_p_value_label(float(p_value)), - ha="center", - va="bottom", - fontsize=7, - color="#303030", - ) - - -def _plot_box_with_points( - plot_df: pd.DataFrame, - title: str, - output_file: Path, -) -> None: - if plot_df.empty: - raise RuntimeError("No white/gray differences available for plotting") - - order = _get_plot_order(plot_df) - fig, ax = _init_plot_canvas(len(order)) - _draw_box_with_points(ax, plot_df, order, vertical=False) - - _finalize_effect_axis(ax, title) - fig.tight_layout() - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def _plot_aggregated_pair_comparison( - dataset_df: pd.DataFrame, - feature_df: pd.DataFrame, - output_file: Path, -) -> None: - if dataset_df.empty or feature_df.empty: - raise RuntimeError("No aggregated white/gray differences available for combined plotting") - - dataset_order = _get_plot_order(dataset_df) - feature_order = _get_plot_order(feature_df) - - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - # The combined plot needs more height than the base figsize to accommodate - # a suptitle, supylabel, two sets of rotated x-tick labels, and the plot area. - fig_h = 3.0 - - fig, axes = plt.subplots( - 1, - 2, - figsize=(base_w, fig_h), - sharey=True, - constrained_layout=True, - ) - - _draw_box_with_points(axes[0], dataset_df, dataset_order, vertical=True) - _draw_box_with_points(axes[1], feature_df, feature_order, vertical=True) - - y_lim = 0.8 - forced_ticks = [-0.8, -0.4, 0.0, 0.4, 0.8] - - panel_defs = ( - (axes[0], dataset_df, dataset_order), - (axes[1], feature_df, feature_order), - ) - for ax, panel_df, panel_order in panel_defs: - ax.axhspan(0.0, y_lim, color=TOP_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhspan(-y_lim, 0.0, color=BOTTOM_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhline(0.0, color="#333333", linewidth=1.0) - ax.set_ylim(-y_lim, y_lim) - ax.set_yticks(forced_ticks) - ax.set_ylabel("") - ax.tick_params(axis="x", rotation=35) - _annotate_panel_p_values(ax, panel_df, panel_order, y_lim) - ax.text( - 0.5, - y_lim * 0.93, - TOP_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="top", - fontweight="bold", - color="#606060", - ) - ax.text( - 0.5, - -y_lim * 0.93, - BOTTOM_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="bottom", - fontweight="bold", - color="#606060", - ) - - axes[0].set_xlabel(AGG_PANEL_XLABELS[0]) - axes[1].set_xlabel(AGG_PANEL_XLABELS[1]) - - # Let constrained_layout position suptitle/supylabel automatically — - # no hardcoded x/y offsets needed. - fig.suptitle(PLOT_TITLES["pair"]) - fig.supylabel(X_AXIS_LABEL) - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def generate_white_vs_gray_plots( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", - aggregate_tasks_dataset: bool = True, - aggregate_tasks_feature: bool = True, -) -> Path: - """Generate all white-vs-gray plot variants in a single run.""" - apply_miccai_style() - - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_filtered_results(parquet_path) - diffs = _collect_pairwise_effects(df) - if diffs.empty: - raise RuntimeError("No valid white/gray differences found") - - full_df = _build_labels(diffs, view="full", aggregate_tasks=False) - _plot_strip_with_mean_std( - full_df, - title=PLOT_TITLES["full"], - output_file=out_path / "white_vs_gray_tscore.pdf", - ) - - centered_diffs_dataset = _center_dataset_effects(diffs) - dataset_df = _build_labels( - centered_diffs_dataset, - view="dataset", - aggregate_tasks=aggregate_tasks_dataset, - ) - dataset_suffix = "dataset" if aggregate_tasks_dataset else "dataset_task_couples" - _plot_box_with_points( - dataset_df, - title=PLOT_TITLES["dataset"], - output_file=out_path / f"white_vs_gray_tscore_{dataset_suffix}.pdf", - ) - - centered_diffs = _center_feature_effects(diffs) - feature_df = _build_labels( - centered_diffs, - view="feature", - aggregate_tasks=aggregate_tasks_feature, - ) - feature_suffix = "feature" if aggregate_tasks_feature else "feature_task_couples" - _plot_box_with_points( - feature_df, - title=PLOT_TITLES["feature"], - output_file=out_path / f"white_vs_gray_tscore_{feature_suffix}.pdf", - ) - - _plot_aggregated_pair_comparison( - dataset_df, - feature_df, - output_file=out_path / f"white_vs_gray_tscore_{dataset_suffix}_{feature_suffix}_combined.pdf", - ) - - return out_path - - -def plot_white_vs_gray_tscore( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", - aggregate_tasks_dataset: bool = True, - aggregate_tasks_feature: bool = True, -) -> Path: - """Backward-compatible wrapper kept for existing callers.""" - return generate_white_vs_gray_plots( - parquet_path, - out_dir=out_dir, - aggregate_tasks_dataset=aggregate_tasks_dataset, - aggregate_tasks_feature=aggregate_tasks_feature, - ) - - -def main() -> None: - parser = argparse.ArgumentParser( - description=( - "Generate white-vs-gray tissue effect plots: full, dataset-aggregated, " - "and feature-aggregated" - ) - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/test", - help="Output directory", - ) - parser.add_argument( - "--dataset-task-couples", - action="store_true", - help="Show dataset|task couples instead of aggregating tasks in dataset view", - ) - parser.add_argument( - "--feature-task-couples", - action="store_true", - help="Show feature|task couples instead of aggregating tasks in feature view", - ) - args = parser.parse_args() - - out_path = generate_white_vs_gray_plots( - args.input, - out_dir=args.outdir, - aggregate_tasks_dataset=not args.dataset_task_couples, - aggregate_tasks_feature=not args.feature_task_couples, - ) - print("Saved white vs gray plots to", out_path) - - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/scripts/visualization_backup/white_vs_gray_plots_linear.py b/scripts/visualization_backup/white_vs_gray_plots_linear.py deleted file mode 100644 index 6e17760a..00000000 --- a/scripts/visualization_backup/white_vs_gray_plots_linear.py +++ /dev/null @@ -1,701 +0,0 @@ -from __future__ import annotations - -import argparse -from pathlib import Path - -import numpy as np -import pandas as pd -import matplotlib -import seaborn as sns - -matplotlib.use("Agg") -import matplotlib.pyplot as plt - -from config import ( - MICCAI_DOUBLE_COLUMN_FIGSIZE, - apply_miccai_style, -) -from utils import ( - DEFAULT_COMBOS, - LINEAR_MODELS, - RANDOM_FOREST_MODELS, - calculate_paired_ttest, - choose_spread_metric, - clean_target, - filter_combos, - fold_columns, - format_label, - get_display_label, - is_dummy_model, - select_best_runs, -) - -CLASSICAL_MODELS = LINEAR_MODELS | RANDOM_FOREST_MODELS - -PLOT_TITLES = { - "full": "White vs Gray Matter: Normalized Score Difference (All Dataset/Target/Task/Feature)", - "dataset": "White vs Gray Matter: Dataset Tissue Effect (Feature Baseline Removed)", - "feature": "White vs Gray Matter: Feature Tissue Effect (Dataset-Task Baseline Removed)", - "pair": "White vs Gray Matter: Aggregated Tissue Effect Comparison", -} -X_AXIS_LABEL = "\u0394 Normalized score (white \u2212 gray)" -LEFT_REGION_LABEL = "Gray matter wins" -RIGHT_REGION_LABEL = "White matter wins" -POINTS_COLOR = "#4C78A8" -MEAN_STD_COLOR = "#B22222" -BOX_COLOR = "#D6E3F3" -AGG_PANEL_XLABELS = ("By Dataset (Microstructure feature effect removed)", "By Microstructure feature (dataset effect removed)") -TOP_REGION_COLOR = "#D6E4F1" -BOTTOM_REGION_COLOR = "#FAEFDB" -TOP_REGION_LABEL = "White matter wins" -BOTTOM_REGION_LABEL = "Gray matter wins" - - -def _load_filtered_results(parquet_path: str) -> pd.DataFrame: - df = pd.read_parquet(parquet_path) - df["target_clean"] = df["target"].map(clean_target) - df = filter_combos(df, DEFAULT_COMBOS) - if df.empty: - raise RuntimeError("No rows left after filtering combos") - return df - - -def _select_best_tissue_rows( - feature_df: pd.DataFrame, - higher_is_better: bool, -) -> tuple[pd.Series, pd.Series] | None: - white_rows = feature_df[feature_df["tissue_type"] == "white"] - gray_rows = feature_df[feature_df["tissue_type"] == "gray"] - if white_rows.empty or gray_rows.empty: - return None - - if higher_is_better: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmax()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmax()] - else: - best_white = white_rows.loc[white_rows["_fold_mean"].idxmin()] - best_gray = gray_rows.loc[gray_rows["_fold_mean"].idxmin()] - - return best_white, best_gray - - -def _normalize_fold_val(val: float, prediction_task: str) -> float: - """Map a raw fold metric value to [0, 1] relative to dummy baseline. - - - Binary classification (balanced accuracy): dummy = 0.5, perfect = 1.0 - - Regression (R²): dummy = 0.0, perfect = 1.0 - """ - if prediction_task == "binary_classification": - return (val - 0.5) / 0.5 - return float(val) # R²: already 0 = dummy, 1 = perfect - - -def _collect_pairwise_effects(df: pd.DataFrame) -> pd.DataFrame: - """Collect fold-level normalized score differences (white − gray) per dataset/target/task/feature.""" - rows = [] - - for (dataset, target, task), group in df.groupby(["dataset", "target_clean", "prediction_task"]): - try: - fold_prefix, metric_label = choose_spread_metric(group, task) - except (RuntimeError, ValueError): - continue - - # choose_spread_metric always returns higher-is-better metrics (R² / balanced accuracy) - higher_is_better = True - best = select_best_runs(group, fold_prefix, higher_is_better) - if best.empty or "_fold_mean" not in best.columns: - continue - - best = best[~best["model_name"].apply(is_dummy_model)] - best = best[best["model_name"].isin(CLASSICAL_MODELS)] - if best.empty: - continue - - fold_cols = fold_columns(best, fold_prefix) - if not fold_cols: - continue - - for feature, feature_df in best.groupby("primary_metric"): - best_tissues = _select_best_tissue_rows(feature_df, higher_is_better) - if best_tissues is None: - continue - best_white, best_gray = best_tissues - - white_vals = np.asarray(best_white[fold_cols].values, dtype=float) - gray_vals = np.asarray(best_gray[fold_cols].values, dtype=float) - - valid = np.isfinite(white_vals) & np.isfinite(gray_vals) - white_vals = white_vals[valid] - gray_vals = gray_vals[valid] - if white_vals.size == 0: - continue - - # Normalize each fold to [0,1] then subtract: positive = white matter wins - norm_white = np.array([_normalize_fold_val(v, task) for v in white_vals]) - norm_gray = np.array([_normalize_fold_val(v, task) for v in gray_vals]) - diffs = norm_white - norm_gray - - # P-value from paired t-test on raw values (linear scaling preserves significance) - p_value = calculate_paired_ttest(white_vals, gray_vals) - - for fold_idx, diff in enumerate(diffs): - rows.append( - { - "dataset": dataset, - "target": target, - "task": task, - "feature": feature, - "metric_label": metric_label, - "fold": fold_idx, - "normalized_diff": float(diff), - "p_value": float(p_value), - } - ) - - return pd.DataFrame(rows) - - -def _center_dataset_effects(diffs: pd.DataFrame) -> pd.DataFrame: - """Remove feature baseline offsets to isolate dataset-task-specific tissue effects. - - Procedure: - 1. Collapse fold-level diffs to one mean effect per (dataset, target, task, feature) - so that fold count imbalance does not distort the baseline estimate. - 2. Compute the feature baseline: mean of those per-combination means across all - (dataset, target, task) combinations for each feature. - 3. Residualize each individual fold: normalized_diff -= feature_baseline. - - Fold-level rows are preserved so individual folds appear in the plot. - """ - group_cols = ["dataset", "target", "task", "feature", "metric_label"] - # Step 1: per-combination means for baseline estimation - combo_means = ( - diffs.groupby(group_cols, as_index=False)["normalized_diff"] - .mean() - ) - - # Step 2: feature baseline = mean of combo means across dataset/target/task - cluster_means = ( - combo_means.groupby(["feature"])["normalized_diff"] - .mean() - .rename("cluster_mean") - .reset_index() - ) - - # Step 3: apply residual to every fold-level row - result = diffs.merge(cluster_means, on=["feature"], how="left") - result = result.copy() - result["normalized_diff"] = result["normalized_diff"] - result["cluster_mean"] - result = result.drop(columns=["cluster_mean"]) - - return result - - -def _center_feature_effects(diffs: pd.DataFrame) -> pd.DataFrame: - """Remove dataset-task baseline offsets to isolate feature-specific tissue effects. - - Procedure: - 1. Collapse fold-level diffs to one mean effect per (dataset, target, task, feature) - so that fold count imbalance does not distort the baseline estimate. - 2. Compute the dataset-task cluster baseline: mean of those per-combination means - across all features within each (dataset, target, task) group. - 3. Residualize each individual fold: normalized_diff -= cluster_baseline. - - Fold-level rows are preserved so individual folds appear in the plot. - """ - group_cols = ["dataset", "target", "task", "feature", "metric_label"] - # Step 1: per-combination means for baseline estimation - combo_means = ( - diffs.groupby(group_cols, as_index=False)["normalized_diff"] - .mean() - ) - - # Step 2: dataset-task baseline = mean of combo means across features in each cluster - cluster_cols = ["dataset", "target", "task"] - cluster_means = ( - combo_means.groupby(cluster_cols)["normalized_diff"] - .mean() - .rename("cluster_mean") - .reset_index() - ) - - # Step 3: apply residual to every fold-level row - result = diffs.merge(cluster_means, on=cluster_cols, how="left") - result = result.copy() - result["normalized_diff"] = result["normalized_diff"] - result["cluster_mean"] - result = result.drop(columns=["cluster_mean"]) - - return result - - -def _build_labels( - diffs: pd.DataFrame, - view: str, - aggregate_tasks: bool, -) -> pd.DataFrame: - plot_df = diffs.copy() - - if view == "full": - plot_df["label"] = plot_df.apply( - lambda r: ( - f"{get_display_label(r['dataset'], r['target'], r['task'], r['metric_label'])}" - f" | {format_label(r['feature'])}" - ), - axis=1, - ) - return plot_df - - if view == "dataset": - if aggregate_tasks: - plot_df["label"] = plot_df["dataset"].map(format_label) - else: - plot_df["label"] = plot_df.apply( - lambda r: f"{format_label(r['dataset'])} | {format_label(r['task'])}", - axis=1, - ) - return plot_df - - if view == "feature": - if aggregate_tasks: - plot_df["label"] = plot_df["feature"].map(format_label) - else: - plot_df["label"] = plot_df.apply( - lambda r: f"{format_label(r['feature'])} | {format_label(r['task'])}", - axis=1, - ) - return plot_df - - raise ValueError(f"Unknown view: {view}") - - -def _get_plot_order(plot_df: pd.DataFrame) -> list[str]: - return ( - plot_df.groupby("label")["normalized_diff"] - .mean() - .sort_values(ascending=False) - .index.tolist() - ) - - -def _init_plot_canvas(n_labels: int) -> tuple[plt.Figure, plt.Axes]: - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - fig_h = max(base_h, 0.42 * n_labels) - return plt.subplots(figsize=(base_w, fig_h)) - - -def _finalize_effect_axis(ax: plt.Axes, title: str) -> None: - ax.axvline(0.0, color="#333333", linewidth=1.0) - ax.set_xlabel(X_AXIS_LABEL) - ax.set_ylabel("") - ax.set_title(title, pad=14) - ax.text( - 0.02, - 1.01, - LEFT_REGION_LABEL, - transform=ax.transAxes, - ha="left", - va="bottom", - fontweight="bold", - color="gray", - ) - ax.text( - 0.98, - 1.01, - RIGHT_REGION_LABEL, - transform=ax.transAxes, - ha="right", - va="bottom", - fontweight="bold", - color="gray", - ) - - -def _plot_strip_with_mean_std( - plot_df: pd.DataFrame, - title: str, - output_file: Path, -) -> None: - if plot_df.empty: - raise RuntimeError("No white/gray differences available for plotting") - - order = _get_plot_order(plot_df) - fig, ax = _init_plot_canvas(len(order)) - - sns.stripplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=POINTS_COLOR, - size=5, - alpha=0.6, - jitter=0.15, - ax=ax, - ) - - summary = ( - plot_df.groupby("label")["normalized_diff"] - .agg(mean="mean", std=lambda s: s.std(ddof=1)) - .reindex(order) - ) - summary["std"] = summary["std"].fillna(0.0) - y_pos = np.arange(len(order)) - - ax.errorbar( - x=summary["mean"].to_numpy(dtype=float), - y=y_pos, - xerr=summary["std"].to_numpy(dtype=float), - fmt="D", - color=MEAN_STD_COLOR, - ecolor=MEAN_STD_COLOR, - elinewidth=1.2, - capsize=3, - markersize=5, - zorder=5, - ) - - _finalize_effect_axis(ax, title) - fig.tight_layout() - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def _draw_box_with_points( - ax: plt.Axes, - plot_df: pd.DataFrame, - order: list[str], - vertical: bool, -) -> None: - if vertical: - sns.boxplot( - data=plot_df, - x="label", - y="normalized_diff", - order=order, - color=BOX_COLOR, - width=0.55, - linewidth=1.0, - showfliers=False, - ax=ax, - ) - sns.stripplot( - data=plot_df, - x="label", - y="normalized_diff", - order=order, - color=POINTS_COLOR, - size=3.5, - alpha=0.5, - jitter=0.22, - ax=ax, - ) - else: - sns.boxplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=BOX_COLOR, - width=0.55, - linewidth=1.0, - showfliers=False, - ax=ax, - ) - sns.stripplot( - data=plot_df, - x="normalized_diff", - y="label", - order=order, - color=POINTS_COLOR, - size=4, - alpha=0.5, - jitter=0.18, - ax=ax, - ) - - -def _format_p_value_label(p_value: float) -> str: - return f"pval={p_value:.5f}" - - -def _cluster_mean_ttest_pvalue( - values: np.ndarray, - cluster_ids: np.ndarray, -) -> float: - """Aggregate to one effect per independent pair, then test mean effect vs 0.""" - from scipy.stats import ttest_1samp - - values = np.asarray(values, dtype=float) - cluster_ids = np.asarray(cluster_ids) - - valid_mask = np.isfinite(values) - values = values[valid_mask] - cluster_ids = cluster_ids[valid_mask] - if values.size == 0: - return float("nan") - - # One independent effect per dataset/target/task(/feature) pair. - cluster_means = ( - pd.DataFrame({"cluster_id": cluster_ids, "value": values}) - .groupby("cluster_id", sort=False)["value"] - .mean() - .to_numpy(dtype=float) - ) - n_clusters = cluster_means.size - if n_clusters < 2: - return float("nan") - - res = ttest_1samp(cluster_means, popmean=0.0, nan_policy="omit") - if np.isnan(res.pvalue): - return float("nan") - return float(res.pvalue) - - -def _compute_aggregated_label_pvalues(plot_df: pd.DataFrame, order: list[str]) -> pd.Series: - pvals: dict[str, float] = {} - for label in order: - label_rows = plot_df[plot_df["label"] == label] - cluster_ids = label_rows[["dataset", "target", "task", "feature"]].astype(str).agg( - "|".join, - axis=1, - ) - pvals[label] = _cluster_mean_ttest_pvalue( - label_rows["normalized_diff"].to_numpy(dtype=float), - cluster_ids.to_numpy(), - ) - return pd.Series(pvals).reindex(order) - - -def _annotate_panel_p_values( - ax: plt.Axes, - plot_df: pd.DataFrame, - order: list[str], - y_lim: float, -) -> None: - pvals = _compute_aggregated_label_pvalues(plot_df, order) - ymax = plot_df.groupby("label")["normalized_diff"].max().reindex(order) - y_padding = 0.06 * y_lim - y_cap = 0.86 * y_lim - - for xpos, label in enumerate(order): - p_value = pvals.get(label, np.nan) - box_top = ymax.get(label, np.nan) - y_text = y_cap if not np.isfinite(box_top) else min(float(box_top) + y_padding, y_cap) - ax.text( - xpos, - y_text, - _format_p_value_label(float(p_value)), - ha="center", - va="bottom", - fontsize=7, - color="#303030", - ) - - -def _plot_box_with_points( - plot_df: pd.DataFrame, - title: str, - output_file: Path, -) -> None: - if plot_df.empty: - raise RuntimeError("No white/gray differences available for plotting") - - order = _get_plot_order(plot_df) - fig, ax = _init_plot_canvas(len(order)) - _draw_box_with_points(ax, plot_df, order, vertical=False) - - _finalize_effect_axis(ax, title) - fig.tight_layout() - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def _plot_aggregated_pair_comparison( - dataset_df: pd.DataFrame, - feature_df: pd.DataFrame, - output_file: Path, -) -> None: - if dataset_df.empty or feature_df.empty: - raise RuntimeError("No aggregated white/gray differences available for combined plotting") - - dataset_order = _get_plot_order(dataset_df) - feature_order = _get_plot_order(feature_df) - - base_w, base_h = MICCAI_DOUBLE_COLUMN_FIGSIZE - # The combined plot needs more height than the base figsize to accommodate - # a suptitle, supylabel, two sets of rotated x-tick labels, and the plot area. - fig_h = 3.0 - - fig, axes = plt.subplots( - 1, - 2, - figsize=(base_w, fig_h), - sharey=True, - constrained_layout=True, - ) - - _draw_box_with_points(axes[0], dataset_df, dataset_order, vertical=True) - _draw_box_with_points(axes[1], feature_df, feature_order, vertical=True) - - y_lim = 0.8 - forced_ticks = [-0.8, -0.4, 0.0, 0.4, 0.8] - - panel_defs = ( - (axes[0], dataset_df, dataset_order), - (axes[1], feature_df, feature_order), - ) - for ax, panel_df, panel_order in panel_defs: - ax.axhspan(0.0, y_lim, color=TOP_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhspan(-y_lim, 0.0, color=BOTTOM_REGION_COLOR, alpha=0.32, zorder=0) - ax.axhline(0.0, color="#333333", linewidth=1.0) - ax.set_ylim(-y_lim, y_lim) - ax.set_yticks(forced_ticks) - ax.set_ylabel("") - ax.tick_params(axis="x", rotation=35) - _annotate_panel_p_values(ax, panel_df, panel_order, y_lim) - ax.text( - 0.5, - y_lim * 0.93, - TOP_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="top", - fontweight="bold", - color="#606060", - ) - ax.text( - 0.5, - -y_lim * 0.93, - BOTTOM_REGION_LABEL, - transform=ax.get_yaxis_transform(), - ha="center", - va="bottom", - fontweight="bold", - color="#606060", - ) - - axes[0].set_xlabel(AGG_PANEL_XLABELS[0]) - axes[1].set_xlabel(AGG_PANEL_XLABELS[1]) - - # Let constrained_layout position suptitle/supylabel automatically — - # no hardcoded x/y offsets needed. - fig.suptitle(PLOT_TITLES["pair"]) - fig.supylabel(X_AXIS_LABEL) - fig.savefig(output_file, dpi=300) - plt.close(fig) - - -def generate_white_vs_gray_plots( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", - aggregate_tasks_dataset: bool = True, - aggregate_tasks_feature: bool = True, -) -> Path: - """Generate all white-vs-gray plot variants in a single run.""" - apply_miccai_style() - - out_path = Path(out_dir) - out_path.mkdir(parents=True, exist_ok=True) - - df = _load_filtered_results(parquet_path) - diffs = _collect_pairwise_effects(df) - if diffs.empty: - raise RuntimeError("No valid white/gray differences found") - - full_df = _build_labels(diffs, view="full", aggregate_tasks=False) - _plot_strip_with_mean_std( - full_df, - title=PLOT_TITLES["full"], - output_file=out_path / "white_vs_gray_tscore.pdf", - ) - - centered_diffs_dataset = _center_dataset_effects(diffs) - dataset_df = _build_labels( - centered_diffs_dataset, - view="dataset", - aggregate_tasks=aggregate_tasks_dataset, - ) - dataset_suffix = "dataset" if aggregate_tasks_dataset else "dataset_task_couples" - _plot_box_with_points( - dataset_df, - title=PLOT_TITLES["dataset"], - output_file=out_path / f"white_vs_gray_tscore_{dataset_suffix}.pdf", - ) - - centered_diffs = _center_feature_effects(diffs) - feature_df = _build_labels( - centered_diffs, - view="feature", - aggregate_tasks=aggregate_tasks_feature, - ) - feature_suffix = "feature" if aggregate_tasks_feature else "feature_task_couples" - _plot_box_with_points( - feature_df, - title=PLOT_TITLES["feature"], - output_file=out_path / f"white_vs_gray_tscore_{feature_suffix}.pdf", - ) - - _plot_aggregated_pair_comparison( - dataset_df, - feature_df, - output_file=out_path / f"white_vs_gray_tscore_{dataset_suffix}_{feature_suffix}_combined.pdf", - ) - - return out_path - - -def plot_white_vs_gray_tscore( - parquet_path: str, - out_dir: str = "exp_outputs/summary/plots/folds", - aggregate_tasks_dataset: bool = True, - aggregate_tasks_feature: bool = True, -) -> Path: - """Backward-compatible wrapper kept for existing callers.""" - return generate_white_vs_gray_plots( - parquet_path, - out_dir=out_dir, - aggregate_tasks_dataset=aggregate_tasks_dataset, - aggregate_tasks_feature=aggregate_tasks_feature, - ) - - -def main() -> None: - parser = argparse.ArgumentParser( - description=( - "Generate white-vs-gray tissue effect plots: full, dataset-aggregated, " - "and feature-aggregated" - ) - ) - parser.add_argument( - "--input", - default="exp_outputs/summary/comprehensive_results.parquet", - help="Input parquet file", - ) - parser.add_argument( - "--outdir", - default="exp_outputs/summary/plots/folds", - help="Output directory", - ) - parser.add_argument( - "--dataset-task-couples", - action="store_true", - help="Show dataset|task couples instead of aggregating tasks in dataset view", - ) - parser.add_argument( - "--feature-task-couples", - action="store_true", - help="Show feature|task couples instead of aggregating tasks in feature view", - ) - args = parser.parse_args() - - out_path = generate_white_vs_gray_plots( - args.input, - out_dir=args.outdir, - aggregate_tasks_dataset=not args.dataset_task_couples, - aggregate_tasks_feature=not args.feature_task_couples, - ) - print("Saved white vs gray plots to", out_path) - - -if __name__ == "__main__": - main() \ No newline at end of file