@brainpilot/skills 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
- package/skills/01_Meta-Skills/contribute-skill/SKILL.md +277 -0
- package/skills/01_Meta-Skills/contribute-skills-via-pr/SKILL.md +163 -0
- package/skills/01_Meta-Skills/paper-to-skill/SKILL.md +435 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/extraction-guide.md +286 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/skill-template.md +250 -0
- package/skills/01_Meta-Skills/repo-to-skill/SKILL.md +289 -0
- package/skills/01_Meta-Skills/share-case/SKILL.md +253 -0
- package/skills/01_Meta-Skills/share-usage/README.md +63 -0
- package/skills/01_Meta-Skills/share-usage/SKILL.md +395 -0
- package/skills/01_Meta-Skills/verify-skill/SKILL.md +331 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/SKILL.md +194 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/effect-sizes.md +352 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/sample-size-guide.md +407 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/SKILL.md +361 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/references/common-analyses.md +517 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/SKILL.md +292 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/references/plot-recipes.md +709 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/SKILL.md +286 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/common-assumptions.md +320 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/planning-template.md +143 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/SKILL.md +197 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/references/instruction-templates.md +60 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/SKILL.md +246 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/classic-paradigms.md +435 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/design-principles.md +256 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/SKILL.md +270 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/references/lavaan-templates.md +172 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/SKILL.md +238 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/references/scoring-rubric.md +143 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md +203 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/fitting-guide.md +571 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/model-variants.md +427 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/SKILL.md +310 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/references/ez-diffusion-formulas.md +137 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/SKILL.md +300 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/application-guide.md +278 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/sdt-formulas.md +318 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/SKILL.md +283 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/references/array-generation-parameters.yaml +111 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/SKILL.md +301 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/references/measure-computation-guide.md +195 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/SKILL.md +257 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/analysis-guide.md +356 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/region-segmentation.md +266 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/SKILL.md +346 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/references/lexical-databases-guide.md +184 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/SKILL.md +226 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/component-paradigm-map.md +276 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/timing-parameters.md +244 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/SKILL.md +367 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/references/parameter-lookup-tables.md +138 -0
- package/skills/05_EEG_ERP/erp-analysis/SKILL.md +185 -0
- package/skills/05_EEG_ERP/erp-analysis/references/erp-components.md +447 -0
- package/skills/05_EEG_ERP/erp-analysis/references/preprocessing-pipeline.md +277 -0
- package/skills/05_EEG_ERP/erp-analysis/references/statistical-approaches.md +351 -0
- package/skills/05_EEG_ERP/mne-python-guide/SKILL.md +174 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/decoding.md +178 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/io_formats.md +160 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/preprocessing.md +259 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/simulation.md +173 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/source_localization.md +234 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/statistics.md +196 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/time_frequency.md +165 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/visualization.md +175 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/SKILL.md +296 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/design-matrix-guide.md +214 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/statistical-inference.md +288 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/SKILL.md +274 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/quality-control.md +336 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/step-by-step-pipeline.md +380 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/SKILL.md +264 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/references/design-optimization-examples.md +114 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/SKILL.md +123 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/database-subjects.md +179 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/dataset-types.md +208 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/freesurfer-fmriprep.md +162 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mapping-transforms.md +181 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mni-utils.md +207 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/surface-analysis.md +219 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/visualization.md +251 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/SKILL.md +297 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/model-patterns.md +197 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/parameter-table.yaml +204 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/SKILL.md +294 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/diagnostics-checklist.md +351 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/prior-selection-guide.md +241 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/SKILL.md +269 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/references/recovery-diagnostics.md +207 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/SKILL.md +305 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/data-requirements.md +60 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/method-comparison.md +151 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/SKILL.md +376 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/hh-parameters.md +117 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/network-regimes.md +130 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/SKILL.md +258 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/indicator-parameters.md +242 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/pipeline-details.md +211 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/SKILL.md +261 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/opsin-catalog.md +124 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/stimulation-parameters.md +304 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/SKILL.md +367 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/disconnection-guide.md +152 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/vlsm-pipeline.md +182 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/SKILL.md +250 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/deficit-profiles.md +302 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/test-catalog.md +304 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/SKILL.md +345 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/references/age-parameters.yaml +186 -0
- package/skills/12_Social_Cognition/tom-task-selector/SKILL.md +379 -0
- package/skills/12_Social_Cognition/tom-task-selector/references/task-database.md +317 -0
- package/skills/13_Visualization/nature-figure/README.md +442 -0
- package/skills/13_Visualization/nature-figure/SKILL.md +60 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-01-bar-charts.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-02-line-trends.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-03-heatmaps.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-04-scatter-bubble.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-05-radar-polar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-06-distributions.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-07-forest-interval.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-08-area-stacked.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-09-image-plates.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-10-network-matrix.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_motivation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation_distillation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_contrastive.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_CEDAR.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/RNAGenScape_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/comparison.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_ablation.py +86 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_comparison.py +109 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/diffusion_swiss_roll.py +97 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/diffusion_swiss_roll.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Ablation.py +64 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_GeneRegulatory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Trajectory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/idea.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/illustration.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_idea.py +76 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_illustration.py +404 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/figures/freq_prior.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/plot_freq_prior.py +146 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/plot_bars.py +216 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/raw_data.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold_holes.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_optimization.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_speed.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_sweep.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_comparison.py +228 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_hole_manifold.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_manifold.py +61 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_sweep.py +77 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_posttraining.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_radar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_comparison_radar.py +173 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_posttraining.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/brute_force.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_category.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_subcategory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/rewriting.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/selfcorrection_math.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_brute_force.py +248 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_category.py +132 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_subcategory.py +131 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_rewriting.py +105 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_selfcorrection_math.py +99 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/composition_heatmap.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/trend_by_month.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_composition.py +81 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_trend.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig1-material-mechanism-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig2-spatial-imaging-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig3-in-vivo-efficacy-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig4-single-cell-systems-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig5-validation-perturbation-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/evals/evals.json +37 -0
- package/skills/13_Visualization/nature-figure/manifest.yaml +57 -0
- package/skills/13_Visualization/nature-figure/references/api.md +428 -0
- package/skills/13_Visualization/nature-figure/references/backend-selection.md +100 -0
- package/skills/13_Visualization/nature-figure/references/chart-types.md +281 -0
- package/skills/13_Visualization/nature-figure/references/common-patterns.md +350 -0
- package/skills/13_Visualization/nature-figure/references/demos.md +65 -0
- package/skills/13_Visualization/nature-figure/references/design-theory.md +436 -0
- package/skills/13_Visualization/nature-figure/references/figure-contract.md +93 -0
- package/skills/13_Visualization/nature-figure/references/nature-2026-observations.md +112 -0
- package/skills/13_Visualization/nature-figure/references/qa-contract.md +119 -0
- package/skills/13_Visualization/nature-figure/references/r-template-index.md +66 -0
- package/skills/13_Visualization/nature-figure/references/r-workflow.md +161 -0
- package/skills/13_Visualization/nature-figure/references/tutorials.md +251 -0
- package/skills/13_Visualization/nature-figure/static/core/contract.md +29 -0
- package/skills/13_Visualization/nature-figure/static/core/stance.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/python.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/r.md +44 -0
- package/skills/14_Writing/markdown-report-writing/SKILL.md +306 -0
- package/skills/14_Writing/markdown-report-writing/references/compatibility-matrix.md +72 -0
- package/skills/14_Writing/markdown-report-writing/references/templates.md +299 -0
- package/skills/15_Others/neuroimaging-power-guide/SKILL.md +324 -0
- package/skills/15_Others/neuroimaging-power-guide/references/effect-size-lookup-tables.md +102 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/SKILL.md +330 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/references/worked-examples.md +220 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import numpy as np
|
|
3
|
+
import matplotlib.pyplot as plt
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def function(x, y):
|
|
7
|
+
z = 0.6 * np.exp(-((x - 1)**2 + (y + 1)**2))
|
|
8
|
+
z += 0.5 * np.exp(-((x - 1)**2 + (y - 4)**2))
|
|
9
|
+
z += 0.3 * np.exp(-((x - 2)**2 + (y - 2)**2))
|
|
10
|
+
z += 0.2 * np.exp(-((x + 3)**2 + (y + 1)**2))
|
|
11
|
+
z += 0.3 * np.exp(-((x + 1)**2 + (y + 1)**2))
|
|
12
|
+
z -= 0.1 * np.exp(-((x + 1)**2 + (y - 2)**2))
|
|
13
|
+
z += 0.3 * np.exp(-((x + 2)**2 + (y - 2)**2))
|
|
14
|
+
z += 0.3 * np.exp(-((x + 2)**2 + (y - 1)**2))
|
|
15
|
+
return z
|
|
16
|
+
|
|
17
|
+
if __name__ == '__main__':
|
|
18
|
+
# Generate coordinates
|
|
19
|
+
x = np.linspace(-3, 3, 200)
|
|
20
|
+
y = np.linspace(-3, 3, 200)
|
|
21
|
+
x, y = np.meshgrid(x, y)
|
|
22
|
+
|
|
23
|
+
# Define a multi-well "energy" function (inverted to form valleys)
|
|
24
|
+
z = function(x, y)
|
|
25
|
+
|
|
26
|
+
# Set up plot
|
|
27
|
+
fig = plt.figure(figsize=(10, 7))
|
|
28
|
+
ax = fig.add_subplot(1, 1, 1, projection='3d')
|
|
29
|
+
|
|
30
|
+
# Plot the surface with smooth shading
|
|
31
|
+
ax.plot_surface(
|
|
32
|
+
x, y, z,
|
|
33
|
+
cmap='coolwarm',
|
|
34
|
+
edgecolor='none',
|
|
35
|
+
linewidth=0,
|
|
36
|
+
antialiased=True,
|
|
37
|
+
alpha=0.95,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
# # Plot descent path
|
|
41
|
+
# path_x = np.linspace(-2.5, 1, 100)
|
|
42
|
+
# path_y = np.linspace(2.5, -1, 100)
|
|
43
|
+
# path_z = function(path_x, path_y)
|
|
44
|
+
# ax.plot(path_x, path_y, path_z, color='red', linestyle='--', linewidth=3)
|
|
45
|
+
|
|
46
|
+
# Aesthetics
|
|
47
|
+
ax.set_xticks([])
|
|
48
|
+
ax.set_yticks([])
|
|
49
|
+
ax.set_zticks([])
|
|
50
|
+
ax.xaxis.pane.set_visible(False)
|
|
51
|
+
ax.yaxis.pane.set_visible(False)
|
|
52
|
+
ax.zaxis.pane.set_visible(False)
|
|
53
|
+
ax.xaxis.line.set_color((0.0, 0.0, 0.0, 0.0))
|
|
54
|
+
ax.yaxis.line.set_color((0.0, 0.0, 0.0, 0.0))
|
|
55
|
+
ax.zaxis.line.set_color((0.0, 0.0, 0.0, 0.0))
|
|
56
|
+
ax.set_box_aspect([1, 1, 0.5])
|
|
57
|
+
ax.view_init(elev=20, azim=50)
|
|
58
|
+
|
|
59
|
+
fig.tight_layout(pad=2)
|
|
60
|
+
os.makedirs('./figures', exist_ok=True)
|
|
61
|
+
fig.savefig('./figures/manifold.png')
|
package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_sweep.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import numpy as np
|
|
3
|
+
import matplotlib.pyplot as plt
|
|
4
|
+
from matplotlib.ticker import MaxNLocator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# results_increase = {
|
|
8
|
+
# r'Median property change': [0.1125, 0.44046, 0.46006, 0.45625, 0.46510],
|
|
9
|
+
# r'Percentage improved $\uparrow$': [55.15, 70.11, 71.02, 71.46, 71.52],
|
|
10
|
+
# r'Latent space distance $\downarrow$': [0.11868, 0.11877, 0.11961, 0.11964, 0.11999],
|
|
11
|
+
# }
|
|
12
|
+
# results_decrease = {
|
|
13
|
+
# r'Median property change': [-1.1246, -1.5761, -1.62873, -1.65457, -1.65872],
|
|
14
|
+
# r'Percentage improved $\uparrow$': [79.39, 86.31, 87.08, 87.24, 87.01],
|
|
15
|
+
# r'Latent space distance $\downarrow$': [0.16017, 0.12758, 0.12141, 0.12024, 0.12015],
|
|
16
|
+
# }
|
|
17
|
+
results_increase = {
|
|
18
|
+
r'Median change in property': [0.292, 0.5047563, 0.57401, 0.55921, 0.5471513271],
|
|
19
|
+
r'Success rate $\uparrow$': [67.6, 77.3, 79.9, 79.4, 79.6],
|
|
20
|
+
}
|
|
21
|
+
results_decrease = {
|
|
22
|
+
r'Median change in property': [-0.90106, -1.27954, -1.3083, -1.2785, -1.29],
|
|
23
|
+
r'Success rate $\uparrow$': [75.9, 84.7, 84.9, 84.7, 85.1],
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
if __name__ == '__main__':
|
|
28
|
+
plt.rcParams['text.usetex'] = True
|
|
29
|
+
plt.rcParams['font.family'] = 'helvetica'
|
|
30
|
+
plt.rcParams['font.size'] = 15
|
|
31
|
+
plt.rcParams['axes.spines.right'] = False
|
|
32
|
+
plt.rcParams['axes.spines.top'] = False
|
|
33
|
+
plt.rcParams['axes.linewidth'] = 2
|
|
34
|
+
|
|
35
|
+
x_label = 'Optimization step'
|
|
36
|
+
x_values = [1, 5, 10, 20, 40]
|
|
37
|
+
|
|
38
|
+
keys = ['Median change in property', 'Success rate']
|
|
39
|
+
fig = plt.figure(figsize=(4.5 * len(keys), 4))
|
|
40
|
+
for fig_idx, y_key in enumerate(keys):
|
|
41
|
+
ax = fig.add_subplot(1, len(keys), fig_idx + 1)
|
|
42
|
+
for key in results_increase.keys():
|
|
43
|
+
if y_key in key:
|
|
44
|
+
y_values_increase = results_increase[key]
|
|
45
|
+
y_label_increase = key
|
|
46
|
+
for key in results_decrease.keys():
|
|
47
|
+
if y_key in key:
|
|
48
|
+
y_values_decrease = results_decrease[key]
|
|
49
|
+
y_label_decrease = key
|
|
50
|
+
|
|
51
|
+
#0F4D92
|
|
52
|
+
ax.plot(x_values,
|
|
53
|
+
y_values_increase,
|
|
54
|
+
linestyle='-', linewidth=3,
|
|
55
|
+
marker='o', markersize=8,
|
|
56
|
+
label='increase property',
|
|
57
|
+
alpha=0.8,
|
|
58
|
+
color="#ea84dd")
|
|
59
|
+
ax.plot(x_values,
|
|
60
|
+
y_values_decrease,
|
|
61
|
+
linestyle='-', linewidth=3,
|
|
62
|
+
marker='o', markersize=8,
|
|
63
|
+
label='decrease property',
|
|
64
|
+
alpha=0.8,
|
|
65
|
+
color="#0f4d92")
|
|
66
|
+
if fig_idx == 1:
|
|
67
|
+
ax.set_ylim([0, 100])
|
|
68
|
+
ax.set_xticks(x_values)
|
|
69
|
+
ax.set_xlabel(x_label, fontsize=16)
|
|
70
|
+
ax.set_ylabel(y_label_increase, fontsize=16)
|
|
71
|
+
ax.yaxis.set_major_locator(MaxNLocator(nbins=5))
|
|
72
|
+
if fig_idx == len(keys) - 1:
|
|
73
|
+
ax.legend(loc='lower right', frameon=False)
|
|
74
|
+
|
|
75
|
+
fig.tight_layout(pad=1)
|
|
76
|
+
os.makedirs('./figures', exist_ok=True)
|
|
77
|
+
fig.savefig('./figures/results_sweep.png', dpi=300)
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import numpy as np
|
|
3
|
+
from matplotlib import pyplot as plt
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
data_comparison = {
|
|
7
|
+
'methods': [
|
|
8
|
+
r'DPO',
|
|
9
|
+
r'DA-DPO',
|
|
10
|
+
r'VIGIL (Ours)',
|
|
11
|
+
],
|
|
12
|
+
'colors': [
|
|
13
|
+
"#D88F8A",
|
|
14
|
+
"#8BCF8B",
|
|
15
|
+
"#0F4D92"
|
|
16
|
+
],
|
|
17
|
+
'results': {
|
|
18
|
+
'Qwen2.5-VL-7B\nPOPE$_{Adv}$': np.array([82.8, 84.2, 86.9]),
|
|
19
|
+
'LLaVA-OneVision-7B\nPOPE$_{Adv}$': np.array([82.8, 84.2, 86.9]),
|
|
20
|
+
'InternVL2.5-26B\nPOPE$_{Adv}$': np.array([85.5, 86.8, 89.4]),
|
|
21
|
+
'Qwen2.5-VL-72B\nPOPE$_{Adv}$': np.array([84.5, 87.4, 89.8]),
|
|
22
|
+
'Qwen2.5-VL-7B\nMathVista': np.array([48.0, 48.8, 49.5]),
|
|
23
|
+
'LLaVA-OneVision-7B\nMathVista': np.array([50.8, 51.5, 52.8]),
|
|
24
|
+
'InternVL2.5-26B\nMathVista': np.array([57.9, 58.8, 60.1]),
|
|
25
|
+
'Qwen2.5-VL-72B\nMathVista': np.array([54.1, 55.4, 56.6]),
|
|
26
|
+
'Qwen2.5-VL-7B\nMMBench': np.array([71.2, 72.0, 72.5]),
|
|
27
|
+
'LLaVA-OneVision-7B\nMMBench': np.array([72.5, 73.0, 73.8]),
|
|
28
|
+
'InternVL2.5-26B\nMMBench': np.array([79.5, 80.1, 81.3]),
|
|
29
|
+
'Qwen2.5-VL-72B\nMMBench': np.array([77.2, 77.8, 78.5]),
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _task_suffix(subtask_name):
|
|
35
|
+
"""Benchmark = part after the first newline (e.g. 'Qwen2.5-VL-7B\\nMathVista' -> 'MathVista')."""
|
|
36
|
+
return subtask_name.split('\n', 1)[-1] if '\n' in subtask_name else subtask_name
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def plot_radar(data_comparison):
|
|
40
|
+
"""
|
|
41
|
+
Single radar chart. Each axis = one subtask; one curve per method.
|
|
42
|
+
Each benchmark (task suffix after \\n) has its own radii list: values are normalized
|
|
43
|
+
to display range 45-90 using that benchmark's min/max from its radii list, and
|
|
44
|
+
radius labels on each spoke show that benchmark's tick values.
|
|
45
|
+
"""
|
|
46
|
+
methods = data_comparison['methods']
|
|
47
|
+
colors = data_comparison['colors']
|
|
48
|
+
n_methods = len(methods)
|
|
49
|
+
benchmark_radii = {
|
|
50
|
+
'POPE$_{Adv}$': [75, 80, 85, 91],
|
|
51
|
+
'MathVista': [30, 40, 50, 61],
|
|
52
|
+
'MMBench': [40, 55, 70, 85],
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# results is directly subtask_name -> value array
|
|
56
|
+
task_dict = data_comparison['results']
|
|
57
|
+
subtask_names = list(task_dict.keys())
|
|
58
|
+
value_arrays = list(task_dict.values())
|
|
59
|
+
|
|
60
|
+
fig = plt.figure(figsize=(12, 10))
|
|
61
|
+
ax = fig.add_subplot(111, projection='polar')
|
|
62
|
+
n_subtasks = len(subtask_names)
|
|
63
|
+
subtask_benchmarks = [_task_suffix(st) for st in subtask_names]
|
|
64
|
+
|
|
65
|
+
# Per-benchmark (r_min, r_max) from that benchmark's radii list
|
|
66
|
+
def limits_for_benchmark(bench):
|
|
67
|
+
radii = benchmark_radii.get(bench, [0, 100])
|
|
68
|
+
return (min(radii), max(radii))
|
|
69
|
+
|
|
70
|
+
# One polygon per method: normalize each spoke by its benchmark's radii range, then map to 45-90
|
|
71
|
+
angles = np.linspace(2 * np.pi, 0, n_subtasks, endpoint=False)
|
|
72
|
+
angles_closed = np.append(angles, angles[0])
|
|
73
|
+
|
|
74
|
+
for m in range(n_methods):
|
|
75
|
+
vals = np.array([v[m] for v in value_arrays], dtype=float)
|
|
76
|
+
mask = np.isnan(vals)
|
|
77
|
+
if np.any(mask):
|
|
78
|
+
vals = vals.copy()
|
|
79
|
+
fill = 0.0 if np.all(mask) else np.nanmean(vals)
|
|
80
|
+
vals[mask] = fill
|
|
81
|
+
# Normalize per spoke: benchmark's (r_min, r_max) -> display 45-90. One vertex per subtask (no interpolation).
|
|
82
|
+
normalized = np.zeros_like(vals)
|
|
83
|
+
for i, (v, bench) in enumerate(zip(vals, subtask_benchmarks)):
|
|
84
|
+
r_lo, r_hi = limits_for_benchmark(bench)
|
|
85
|
+
span = r_hi - r_lo
|
|
86
|
+
if span <= 0:
|
|
87
|
+
normalized[i] = 45 + 45 * 0.5
|
|
88
|
+
else:
|
|
89
|
+
n = np.clip((v - r_lo) / span, 0.0, 1.0)
|
|
90
|
+
normalized[i] = 45 + 45 * n
|
|
91
|
+
# Closed polygon: exact data at each angle, then back to first (no extra interpolation)
|
|
92
|
+
vals_closed = np.append(normalized, normalized[0])
|
|
93
|
+
ax.plot(angles_closed, vals_closed, color=colors[m], linewidth=2, label=methods[m])
|
|
94
|
+
ax.fill(angles_closed, vals_closed, color=colors[m], alpha=0.05)
|
|
95
|
+
# Mark actual vertices so it's clear each point is a real data value
|
|
96
|
+
ax.scatter(angles, normalized, color=colors[m], s=18, zorder=5, edgecolors='none')
|
|
97
|
+
|
|
98
|
+
ax.set_ylim(45, 90)
|
|
99
|
+
ax.set_theta_zero_location('N')
|
|
100
|
+
for spine in ax.spines.values():
|
|
101
|
+
spine.set_visible(False)
|
|
102
|
+
r_min_disp, r_max_disp = ax.get_ylim()
|
|
103
|
+
ax.grid(False)
|
|
104
|
+
# Outer boundary
|
|
105
|
+
ax.plot(angles_closed, np.full_like(angles_closed, r_max_disp), color='k', linewidth=0.8, zorder=4)
|
|
106
|
+
# Radial spokes: one per angle
|
|
107
|
+
for a in angles:
|
|
108
|
+
ax.plot([a, a], [r_min_disp, r_max_disp], color='gray', linewidth=0.5, zorder=4)
|
|
109
|
+
# Benchmark-specific contour polygons: one polygon per level index k (innermost=0, ...).
|
|
110
|
+
max_levels = max(len(benchmark_radii.get(b, [])) for b in subtask_benchmarks)
|
|
111
|
+
for k in range(max_levels):
|
|
112
|
+
display_radii = np.zeros(n_subtasks)
|
|
113
|
+
for i, bench in enumerate(subtask_benchmarks):
|
|
114
|
+
radii_list = benchmark_radii.get(bench, [])
|
|
115
|
+
if not radii_list:
|
|
116
|
+
display_radii[i] = 45 + 22.5
|
|
117
|
+
continue
|
|
118
|
+
contour_val = radii_list[k] if k < len(radii_list) else radii_list[-1]
|
|
119
|
+
r_lo, r_hi = limits_for_benchmark(bench)
|
|
120
|
+
span = r_hi - r_lo
|
|
121
|
+
if span <= 0:
|
|
122
|
+
display_radii[i] = 45 + 22.5
|
|
123
|
+
else:
|
|
124
|
+
frac = (contour_val - r_lo) / span
|
|
125
|
+
display_radii[i] = 45 + 45 * np.clip(frac, 0.0, 1.0)
|
|
126
|
+
contour_closed = np.append(display_radii, display_radii[0])
|
|
127
|
+
ax.plot(angles_closed, contour_closed, color='k', linewidth=0.6, zorder=4, label='_nolegend_')
|
|
128
|
+
ax.set_yticks([r_max_disp])
|
|
129
|
+
ax.set_yticklabels([])
|
|
130
|
+
ax.set_rlabel_position(0)
|
|
131
|
+
ax.set_xticks(angles)
|
|
132
|
+
ax.set_xticklabels([])
|
|
133
|
+
# Per-spoke radius labels: skip innermost tick to avoid clutter
|
|
134
|
+
for angle, bench in zip(angles, subtask_benchmarks):
|
|
135
|
+
radii_list = benchmark_radii.get(bench, [])
|
|
136
|
+
if len(radii_list) <= 1:
|
|
137
|
+
continue
|
|
138
|
+
r_lo, r_hi = limits_for_benchmark(bench)
|
|
139
|
+
span = r_hi - r_lo
|
|
140
|
+
for tick_val in radii_list[1:]: # skip innermost (smallest) number
|
|
141
|
+
if span <= 0:
|
|
142
|
+
display_r = 45 + 22.5
|
|
143
|
+
else:
|
|
144
|
+
frac = (tick_val - r_lo) / span
|
|
145
|
+
display_r = 45 + 45 * np.clip(frac, 0.0, 1.0)
|
|
146
|
+
lbl = f'{tick_val:.0f}' if tick_val == int(tick_val) else f'{tick_val:.1f}'
|
|
147
|
+
rot = np.degrees(angle)
|
|
148
|
+
ax.text(angle, display_r + 1, lbl, fontsize=12, ha='center', va='center',
|
|
149
|
+
rotation=rot, rotation_mode='anchor',
|
|
150
|
+
transform=ax.transData, clip_on=False)
|
|
151
|
+
# One label per subtask (angle)
|
|
152
|
+
for angle, label in zip(angles, subtask_names):
|
|
153
|
+
offset = 8 + 10 * np.abs(np.sin(angle))
|
|
154
|
+
label_r = r_max_disp + offset
|
|
155
|
+
ax.text(angle, label_r, label, fontsize=14, ha='center', va='center',
|
|
156
|
+
transform=ax.transData, clip_on=False, fontfamily='monospace')
|
|
157
|
+
ax.legend(loc='upper right', bbox_to_anchor=(1.40, 0.05), fontsize=15, frameon=False)
|
|
158
|
+
|
|
159
|
+
fig.tight_layout(pad=2)
|
|
160
|
+
os.makedirs('./figures/', exist_ok=True)
|
|
161
|
+
fig.savefig('./figures/comparison_radar.png', dpi=300, bbox_inches='tight')
|
|
162
|
+
plt.close(fig)
|
|
163
|
+
return
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
if __name__ == '__main__':
|
|
167
|
+
plt.rcParams['font.family'] = 'helvetica'
|
|
168
|
+
plt.rcParams['font.size'] = 24
|
|
169
|
+
plt.rcParams['axes.spines.right'] = False
|
|
170
|
+
plt.rcParams['axes.spines.top'] = False
|
|
171
|
+
plt.rcParams['axes.linewidth'] = 3
|
|
172
|
+
|
|
173
|
+
plot_radar(data_comparison)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import numpy as np
|
|
3
|
+
from matplotlib import pyplot as plt
|
|
4
|
+
from matplotlib import gridspec as gridspec
|
|
5
|
+
from matplotlib.collections import LineCollection
|
|
6
|
+
from matplotlib.colors import to_rgba
|
|
7
|
+
from matplotlib.lines import Line2D
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
data_posttraining = {
|
|
11
|
+
'methods': [
|
|
12
|
+
'DPO',
|
|
13
|
+
'DA-DPO',
|
|
14
|
+
'VIGIL (Ours)',
|
|
15
|
+
],
|
|
16
|
+
'colors': [
|
|
17
|
+
"#D88F8A",
|
|
18
|
+
"#8BCF8B",
|
|
19
|
+
"#0F4D92"
|
|
20
|
+
],
|
|
21
|
+
'steps': [0, 200, 400, 600, 800],
|
|
22
|
+
'results': np.array([
|
|
23
|
+
[22.0, 25.5, 28.2, 29.5, 30.2],
|
|
24
|
+
[22.0, 33.5, 38.2, 39.8, 40.5],
|
|
25
|
+
[22.0, 52.5, 56.8, 57.9, 58.5],
|
|
26
|
+
]),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def plot_curves(data_posttraining):
|
|
31
|
+
methods = data_posttraining['methods']
|
|
32
|
+
colors = data_posttraining['colors']
|
|
33
|
+
|
|
34
|
+
fig = plt.figure(figsize=(9, 8))
|
|
35
|
+
ax = fig.add_subplot(1, 1, 1)
|
|
36
|
+
y_ticks = [0, 20, 40, 60]
|
|
37
|
+
x = np.asarray(data_posttraining['steps'])
|
|
38
|
+
results = data_posttraining['results'] # shape (n_methods, n_steps)
|
|
39
|
+
x_pos = np.arange(len(x))
|
|
40
|
+
ax.axhline(y=results[0][0], color='black', alpha=0.3, linewidth=4, linestyle='--')
|
|
41
|
+
for m, (method, color) in enumerate(zip(methods, colors)):
|
|
42
|
+
y = results[m]
|
|
43
|
+
# Segments with alpha increasing left to right
|
|
44
|
+
pts = np.column_stack([x_pos, y])
|
|
45
|
+
segments = np.stack([pts[:-1], pts[1:]], axis=1)
|
|
46
|
+
n_seg = len(segments)
|
|
47
|
+
alphas = np.linspace(0.3, 0.9, n_seg)
|
|
48
|
+
rgb = np.array(to_rgba(color))
|
|
49
|
+
seg_colors = [(*rgb[:3], a) for a in alphas]
|
|
50
|
+
lc = LineCollection(segments, colors=seg_colors, linewidths=3, capstyle='round')
|
|
51
|
+
ax.add_collection(lc)
|
|
52
|
+
ax.plot(x_pos, y, color=color, linewidth=0, marker='o', markersize=10, label='_nolegend_')
|
|
53
|
+
|
|
54
|
+
# Legend with line + marker for each method
|
|
55
|
+
handles = [ Line2D([0], [0], color='black', linestyle='--', linewidth=4, alpha=0.3, label='SFT only')]
|
|
56
|
+
for method, color in zip(methods, colors):
|
|
57
|
+
handles.append(Line2D([0], [0], color=color, linewidth=3, marker='o', markersize=10, label=method))
|
|
58
|
+
ax.legend(handles=handles, fontsize=20, loc='lower right', ncols=2, frameon=False)
|
|
59
|
+
|
|
60
|
+
ax.set_xlabel('Post-training steps', fontsize=28, fontfamily='helvetica', labelpad=12)
|
|
61
|
+
ax.set_xticks(x_pos)
|
|
62
|
+
ax.set_xticklabels([str(b) for b in x])
|
|
63
|
+
ax.set_ylabel('Performance on highly\nvision-dependent tasks' + r'$\uparrow$', fontsize=28, fontfamily='helvetica', labelpad=12)
|
|
64
|
+
ax.set_yticks(y_ticks)
|
|
65
|
+
ax.set_yticklabels(y_ticks)
|
|
66
|
+
ax.tick_params(labelsize=20, length=8, width=1.5)
|
|
67
|
+
|
|
68
|
+
fig.tight_layout(pad=2)
|
|
69
|
+
os.makedirs('./figures/', exist_ok=True)
|
|
70
|
+
fig.savefig('./figures/comparison_posttraining.png', dpi=300)
|
|
71
|
+
plt.close(fig)
|
|
72
|
+
return
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
if __name__ == '__main__':
|
|
76
|
+
plt.rcParams['font.family'] = 'helvetica'
|
|
77
|
+
plt.rcParams['font.size'] = 24
|
|
78
|
+
plt.rcParams['axes.spines.top'] = False
|
|
79
|
+
plt.rcParams['axes.spines.right'] = False
|
|
80
|
+
plt.rcParams['axes.linewidth'] = 3
|
|
81
|
+
|
|
82
|
+
plot_curves(data_posttraining)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import numpy as np
|
|
3
|
+
from matplotlib import pyplot as plt
|
|
4
|
+
from matplotlib import gridspec as gridspec
|
|
5
|
+
from matplotlib import patheffects as path_effects
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
data_brute_force_math = {
|
|
9
|
+
'methods': [
|
|
10
|
+
r'DeepSeek R1 Distill Qwen 1.5B',
|
|
11
|
+
r'DeepSeek R1 Distill Qwen 14B',
|
|
12
|
+
r'DeepSeek R1 Distill Llama 70B',
|
|
13
|
+
r'deepseek-chat (Deepseek-V3)',
|
|
14
|
+
r'deepseek-reasoner (Deepseek-R1)',
|
|
15
|
+
r'gemini-2.5-flash-preview-04-17',
|
|
16
|
+
r'OpenAI o3'
|
|
17
|
+
],
|
|
18
|
+
'colors': ['#DDF3DE', '#AADCA9', '#8BCF8B', '#F6CFCB', '#E9A6A1', '#FFF6CC', '#3775BA'],
|
|
19
|
+
'prompts': ['CoT Prompt', 'Math Prompt', 'Hint Prompt', 'Math + Hint'],
|
|
20
|
+
'subtypes': [r'$\bf{Only}$ $\bf{Model}$ brute force',
|
|
21
|
+
r'$\bf{Only}$ $\bf{Human}$ brute force',
|
|
22
|
+
r'$\bf{Neither}$ brute force',
|
|
23
|
+
r'$\bf{Both}$ brute force'],
|
|
24
|
+
'hatch_styles': ['/', '\\', '', 'x'],
|
|
25
|
+
'result': {
|
|
26
|
+
'CoT Prompt': np.array([[26.8, 3.6, 60.0, 9.6],
|
|
27
|
+
[27.6, 3.2, 59.2, 10.0],
|
|
28
|
+
[24.4, 4.0, 62.4, 9.2],
|
|
29
|
+
[31.2, 3.6, 55.6, 9.6],
|
|
30
|
+
[14.0, 7.2, 72.8, 6.0],
|
|
31
|
+
[16.9, 5.9, 70.0, 7.2],
|
|
32
|
+
[9.5, 7.5, 79.4, 3.5]]) / 100,
|
|
33
|
+
'Math Prompt': np.array([[27.2, 4.8, 59.6, 8.4],
|
|
34
|
+
[25.6, 4.8, 61.2, 8.4],
|
|
35
|
+
[24.4, 4.8, 62.4, 8.4],
|
|
36
|
+
[28.4, 3.2, 58.4, 10.0],
|
|
37
|
+
[10.0, 5.6, 76.7, 7.6],
|
|
38
|
+
[12.6, 5.2, 74.8, 7.4],
|
|
39
|
+
[4.2, 7.9, 85.7, 2.1]]) / 100,
|
|
40
|
+
'Hint Prompt': np.array([[29.6, 4.4, 57.2, 8.8],
|
|
41
|
+
[27.6, 2.8, 59.2, 10.4],
|
|
42
|
+
[20.4, 5.2, 66.4, 8.0],
|
|
43
|
+
[28.0, 3.2, 58.8, 10.0],
|
|
44
|
+
[14.0, 6.0, 72.8, 7.2],
|
|
45
|
+
[12.4, 5.1, 74.4, 8.1],
|
|
46
|
+
[6.8, 6.8, 83.2, 3.1]]) / 100,
|
|
47
|
+
'Math + Hint': np.array([[26.4, 4.0, 60.4, 9.2],
|
|
48
|
+
[27.6, 3.2, 59.2, 10.0],
|
|
49
|
+
[24.0, 4.8, 62.8, 8.4],
|
|
50
|
+
[25.2, 2.8, 61.6, 10.4],
|
|
51
|
+
[8.0, 6.8, 78.8, 6.4],
|
|
52
|
+
[10.0, 6.1, 76.4, 7.4],
|
|
53
|
+
[3.7, 6.4, 86.7, 3.2]]) / 100,
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
data_brute_force_logic = {
|
|
58
|
+
'methods': [
|
|
59
|
+
r'DeepSeek R1 Distill Qwen 1.5B',
|
|
60
|
+
r'DeepSeek R1 Distill Qwen 14B',
|
|
61
|
+
r'DeepSeek R1 Distill Llama 70B',
|
|
62
|
+
r'deepseek-chat (Deepseek-V3)',
|
|
63
|
+
r'deepseek-reasoner (Deepseek-R1)',
|
|
64
|
+
r'gemini-2.5-flash-preview-04-17',
|
|
65
|
+
r'OpenAI o3'
|
|
66
|
+
],
|
|
67
|
+
'colors': ['#DDF3DE', '#AADCA9', '#8BCF8B', '#F6CFCB', '#E9A6A1', '#FFF6CC', '#3775BA'],
|
|
68
|
+
'prompts': ['CoT Prompt', 'Math Prompt', 'Hint Prompt', 'Math + Hint'],
|
|
69
|
+
'subtypes': [r'$\bf{Only}$ $\bf{Model}$ brute force',
|
|
70
|
+
r'$\bf{Only}$ $\bf{Human}$ brute force',
|
|
71
|
+
r'$\bf{Neither}$ brute force',
|
|
72
|
+
r'$\bf{Both}$ brute force'],
|
|
73
|
+
'hatch_styles': ['/', '\\', '', 'x'],
|
|
74
|
+
'result': {
|
|
75
|
+
'CoT Prompt': np.array([[18.0, 5.2, 72.0, 4.8],
|
|
76
|
+
[30.8, 3.2, 59.2, 6.8],
|
|
77
|
+
[23.2, 2.8, 66.8, 7.2],
|
|
78
|
+
[32.4, 3.6, 57.6, 6.4],
|
|
79
|
+
[13.7, 6.8, 76.7, 2.8],
|
|
80
|
+
[15.7, 3.2, 75.6, 5.5],
|
|
81
|
+
[15.9, 6.5, 75.6, 2.0]]) / 100,
|
|
82
|
+
'Math Prompt': np.array([[20.0, 4.4, 70.0, 5.6],
|
|
83
|
+
[31.2, 4.0, 58.8, 6.0],
|
|
84
|
+
[24.4, 4.0, 65.6, 6.0],
|
|
85
|
+
[33.6, 3.6, 56.4, 6.4],
|
|
86
|
+
[12.4, 7.6, 77.6, 2.4],
|
|
87
|
+
[15.2, 5.5, 75.7, 3.7],
|
|
88
|
+
[10.5, 6.2, 80.9, 2.4]]) / 100,
|
|
89
|
+
'Hint Prompt': np.array([[15.6, 4.8, 74.4, 5.2],
|
|
90
|
+
[30.4, 3.2, 59.6, 6.8],
|
|
91
|
+
[25.2, 2.8, 64.8, 7.2],
|
|
92
|
+
[27.6, 2.8, 62.4, 7.2],
|
|
93
|
+
[9.6, 6.0, 80.7, 3.6],
|
|
94
|
+
[14.3, 4.5, 75.8, 5.4],
|
|
95
|
+
[6.9, 5.9, 84.8, 2.5]]) / 100,
|
|
96
|
+
'Math + Hint': np.array([[20.0, 3.2, 70.0, 6.8],
|
|
97
|
+
[32.0, 4.8, 58.0, 5.2],
|
|
98
|
+
[19.6, 4.0, 70.4, 6.0],
|
|
99
|
+
[26.0, 4.0, 64.0, 6.0],
|
|
100
|
+
[8.8, 5.6, 81.5, 4.0],
|
|
101
|
+
[13.0, 5.3, 76.8, 4.8],
|
|
102
|
+
[5.1, 7.4, 86.5, 0.9]]) / 100,
|
|
103
|
+
},
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if __name__ == '__main__':
|
|
107
|
+
plt.rcParams['font.family'] = 'helvetica'
|
|
108
|
+
plt.rcParams['font.size'] = 24
|
|
109
|
+
plt.rcParams['axes.spines.right'] = False
|
|
110
|
+
plt.rcParams['axes.spines.top'] = False
|
|
111
|
+
plt.rcParams['axes.linewidth'] = 3
|
|
112
|
+
|
|
113
|
+
fig = plt.figure(figsize=(52, 12))
|
|
114
|
+
|
|
115
|
+
gs = gridspec.GridSpec(2, 5)
|
|
116
|
+
|
|
117
|
+
for prompt_idx, prompt_name in enumerate(data_brute_force_math['prompts']):
|
|
118
|
+
ax = fig.add_subplot(gs[prompt_idx])
|
|
119
|
+
num_methods = len(data_brute_force_math['methods'])
|
|
120
|
+
bars = ax.bar(
|
|
121
|
+
np.arange(num_methods),
|
|
122
|
+
data_brute_force_math['result'][prompt_name][:, 0],
|
|
123
|
+
color=data_brute_force_math['colors'],
|
|
124
|
+
label=data_brute_force_math['methods'],
|
|
125
|
+
hatch=data_brute_force_math['hatch_styles'][0],
|
|
126
|
+
edgecolor='black',
|
|
127
|
+
linewidth=2,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
for bar in bars:
|
|
131
|
+
height = bar.get_height()
|
|
132
|
+
text = ax.text(
|
|
133
|
+
bar.get_x() + bar.get_width() / 2,
|
|
134
|
+
height / 2,
|
|
135
|
+
f'{height:.3f}',
|
|
136
|
+
ha='center',
|
|
137
|
+
va='center',
|
|
138
|
+
color='#FFD700',
|
|
139
|
+
fontsize=20,
|
|
140
|
+
path_effects=[
|
|
141
|
+
path_effects.Stroke(linewidth=4, foreground='black'),
|
|
142
|
+
path_effects.Normal()
|
|
143
|
+
]
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
for subtype_idx in range(1, len(data_brute_force_math['subtypes'])):
|
|
147
|
+
ax.bar(
|
|
148
|
+
np.arange(num_methods),
|
|
149
|
+
data_brute_force_math['result'][prompt_name][:, subtype_idx],
|
|
150
|
+
color=data_brute_force_math['colors'],
|
|
151
|
+
label=data_brute_force_math['methods'],
|
|
152
|
+
hatch=data_brute_force_math['hatch_styles'][subtype_idx],
|
|
153
|
+
bottom=np.cumsum(data_brute_force_math['result'][prompt_name], axis=1)[:, subtype_idx - 1],
|
|
154
|
+
edgecolor='black',
|
|
155
|
+
linewidth=2,
|
|
156
|
+
alpha=0.8,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
ax.set_title(data_brute_force_math['prompts'][prompt_idx], fontsize=36, pad=36)
|
|
160
|
+
ax.set_ylabel('Probability', fontsize=30, labelpad=12)
|
|
161
|
+
ax.set_ylim([0, 1.01])
|
|
162
|
+
ax.set_xticks([])
|
|
163
|
+
|
|
164
|
+
ax = fig.add_subplot(gs[4])
|
|
165
|
+
bar = ax.bar(
|
|
166
|
+
np.arange(num_methods),
|
|
167
|
+
np.ones_like(np.arange(num_methods)),
|
|
168
|
+
color=data_brute_force_math['colors'],
|
|
169
|
+
label=data_brute_force_math['methods'],
|
|
170
|
+
hatch='',
|
|
171
|
+
edgecolor='black',
|
|
172
|
+
linewidth=3,
|
|
173
|
+
)
|
|
174
|
+
handles, labels = ax.get_legend_handles_labels()
|
|
175
|
+
for b in bar:
|
|
176
|
+
b.remove()
|
|
177
|
+
ax.legend(handles, labels, fontsize=30, loc='center', frameon=False)
|
|
178
|
+
ax.set_axis_off()
|
|
179
|
+
|
|
180
|
+
for prompt_idx, prompt_name in enumerate(data_brute_force_logic['prompts']):
|
|
181
|
+
ax = fig.add_subplot(gs[prompt_idx + 5])
|
|
182
|
+
num_methods = len(data_brute_force_logic['methods'])
|
|
183
|
+
bars = ax.bar(
|
|
184
|
+
np.arange(num_methods),
|
|
185
|
+
data_brute_force_logic['result'][prompt_name][:, 0],
|
|
186
|
+
color=data_brute_force_logic['colors'],
|
|
187
|
+
label=data_brute_force_logic['methods'],
|
|
188
|
+
hatch=data_brute_force_logic['hatch_styles'][0],
|
|
189
|
+
edgecolor='black',
|
|
190
|
+
linewidth=2,
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
for bar in bars:
|
|
194
|
+
height = bar.get_height()
|
|
195
|
+
text = ax.text(
|
|
196
|
+
bar.get_x() + bar.get_width() / 2,
|
|
197
|
+
height / 2,
|
|
198
|
+
f'{height:.3f}',
|
|
199
|
+
ha='center',
|
|
200
|
+
va='center',
|
|
201
|
+
color='#FFD700',
|
|
202
|
+
fontsize=20,
|
|
203
|
+
path_effects=[
|
|
204
|
+
path_effects.Stroke(linewidth=4, foreground='black'),
|
|
205
|
+
path_effects.Normal()
|
|
206
|
+
]
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
for subtype_idx in range(1, len(data_brute_force_logic['subtypes'])):
|
|
210
|
+
ax.bar(
|
|
211
|
+
np.arange(num_methods),
|
|
212
|
+
data_brute_force_logic['result'][prompt_name][:, subtype_idx],
|
|
213
|
+
color=data_brute_force_logic['colors'],
|
|
214
|
+
label=data_brute_force_logic['methods'],
|
|
215
|
+
hatch=data_brute_force_logic['hatch_styles'][subtype_idx],
|
|
216
|
+
bottom=np.cumsum(data_brute_force_logic['result'][prompt_name], axis=1)[:, subtype_idx - 1],
|
|
217
|
+
edgecolor='black',
|
|
218
|
+
linewidth=2,
|
|
219
|
+
alpha=0.8,
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
ax.set_title(data_brute_force_logic['prompts'][prompt_idx], fontsize=36, pad=36)
|
|
223
|
+
ax.set_ylabel('Probability', fontsize=30, labelpad=12)
|
|
224
|
+
ax.set_ylim([0, 1.01])
|
|
225
|
+
ax.set_xticks([])
|
|
226
|
+
|
|
227
|
+
ax = fig.add_subplot(gs[9])
|
|
228
|
+
num_subtypes = len(data_brute_force_math['subtypes'])
|
|
229
|
+
bar = ax.bar(
|
|
230
|
+
np.arange(num_subtypes),
|
|
231
|
+
np.ones_like(np.arange(num_subtypes)),
|
|
232
|
+
color='white',
|
|
233
|
+
label=data_brute_force_math['subtypes'],
|
|
234
|
+
hatch=data_brute_force_math['hatch_styles'],
|
|
235
|
+
edgecolor='black',
|
|
236
|
+
linewidth=3,
|
|
237
|
+
)
|
|
238
|
+
handles, labels = ax.get_legend_handles_labels()
|
|
239
|
+
for b in bar:
|
|
240
|
+
b.remove()
|
|
241
|
+
ax.legend(handles, labels, fontsize=30, loc='center', frameon=False)
|
|
242
|
+
ax.set_axis_off()
|
|
243
|
+
|
|
244
|
+
fig.tight_layout(pad=2)
|
|
245
|
+
|
|
246
|
+
os.makedirs('./figures/', exist_ok=True)
|
|
247
|
+
fig.savefig('./figures/brute_force.png', dpi=300)
|
|
248
|
+
plt.close(fig)
|