Skip to content

Commit 2ad1b9f

Browse files
torwagerclaude
andcommitted
Factor figures: split interpretable scalars by domain; Figure 1 = Kung Fury
- extractCategoryFactors: split the lumped "interpretable_scalars" block into per- domain scalar categories (visual/audio/language/social/situation/affect_scalars), so language (orange), social (pink), and situational (green) features now appear as their own colored categories in the factor figures. 19 categories, 154 factors. - plotFactorScores: default time-series clip -> Kung Fury (has dialogue, so language features are populated; Big Buck Bunny is largely non-verbal -> language all-NaN). - Regenerate figures, factor_reducibility.json, and the summary .docx (Fig 1 caption updated to the domain color key). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c5bba4d commit 2ad1b9f

11 files changed

Lines changed: 20 additions & 12 deletions

analysis/factor_reducibility.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"generated":"from extractCategoryFactors corpus","n_timepoints":28237,"categories":[{"category":"emonet","class":"affect","model":"Kragel2019-EmoNet(emonet-pytorch)","nVars":20,"pc1_pct":6.8},{"category":"face_emotion","class":"affect","model":"HSEmotion-enet_b0_8_va_mtl","nVars":8,"pc1_pct":20.7},{"category":"text_emotion","class":"affect","model":"SamLowe/roberta-base-go_emotions","nVars":28,"pc1_pct":9.2},{"category":"text_sentiment","class":"affect","model":"cardiffnlp/twitter-roberta-base-sentiment-latest","nVars":3,"pc1_pct":53.2},{"category":"audioset_tags","class":"audio","model":"AST(BEATs-substitute):MIT/ast-finetuned-audioset-10-10-0.4593","nVars":527,"pc1_pct":4.5},{"category":"clap_embedding","class":"audio","model":"laion/clap-htsat-unfused","nVars":512,"pc1_pct":17.6},{"category":"clap_probe","class":"audio","model":"laion/clap-htsat-unfused","nVars":12,"pc1_pct":20.9},{"category":"chroma","class":"audio","model":"librosa","nVars":12,"pc1_pct":56.3},{"category":"mfcc","class":"audio","model":"librosa","nVars":13,"pc1_pct":31.5},{"category":"action_posteriors","class":"visual","model":"MCG-NJU/videomae-base-finetuned-kinetics","nVars":400,"pc1_pct":4.5},{"category":"dino_embedding","class":"visual","model":"facebook/dinov2-small","nVars":384,"pc1_pct":4.9},{"category":"siglip_embedding","class":"visual","model":"google/siglip2-base-patch16-224","nVars":768,"pc1_pct":5.4},{"category":"siglip_probe","class":"visual","model":"google/siglip2-base-patch16-224","nVars":16,"pc1_pct":9.6},{"category":"interpretable_scalars","class":"mixed","model":"(mixed)","nVars":65,"pc1_pct":9.7}]}
1+
{"generated":"from extractCategoryFactors corpus","n_timepoints":28237,"categories":[{"category":"emonet","class":"affect","model":"Kragel2019-EmoNet(emonet-pytorch)","nVars":20,"pc1_pct":6.8},{"category":"face_emotion","class":"affect","model":"HSEmotion-enet_b0_8_va_mtl","nVars":8,"pc1_pct":20.7},{"category":"text_emotion","class":"affect","model":"SamLowe/roberta-base-go_emotions","nVars":28,"pc1_pct":9.2},{"category":"text_sentiment","class":"affect","model":"cardiffnlp/twitter-roberta-base-sentiment-latest","nVars":3,"pc1_pct":53.2},{"category":"audioset_tags","class":"audio","model":"AST(BEATs-substitute):MIT/ast-finetuned-audioset-10-10-0.4593","nVars":527,"pc1_pct":4.5},{"category":"clap_embedding","class":"audio","model":"laion/clap-htsat-unfused","nVars":512,"pc1_pct":17.6},{"category":"clap_probe","class":"audio","model":"laion/clap-htsat-unfused","nVars":12,"pc1_pct":20.9},{"category":"chroma","class":"audio","model":"librosa","nVars":12,"pc1_pct":56.3},{"category":"mfcc","class":"audio","model":"librosa","nVars":13,"pc1_pct":31.5},{"category":"action_posteriors","class":"visual","model":"MCG-NJU/videomae-base-finetuned-kinetics","nVars":400,"pc1_pct":4.5},{"category":"dino_embedding","class":"visual","model":"facebook/dinov2-small","nVars":384,"pc1_pct":4.9},{"category":"siglip_embedding","class":"visual","model":"google/siglip2-base-patch16-224","nVars":768,"pc1_pct":5.4},{"category":"siglip_probe","class":"visual","model":"google/siglip2-base-patch16-224","nVars":16,"pc1_pct":9.6},{"category":"visual_scalars","class":"visual","model":"(interpretable)","nVars":32,"pc1_pct":19.4},{"category":"audio_scalars","class":"audio","model":"(interpretable)","nVars":14,"pc1_pct":24.3},{"category":"language_scalars","class":"language","model":"(interpretable)","nVars":9,"pc1_pct":28.5},{"category":"social_scalars","class":"social","model":"(interpretable)","nVars":3,"pc1_pct":37},{"category":"situation_scalars","class":"situation","model":"(interpretable)","nVars":2,"pc1_pct":53.3},{"category":"affect_scalars","class":"affect","model":"(interpretable)","nVars":5,"pc1_pct":25.5}]}

docs/feature_summary_table.docx

273 KB
Binary file not shown.

matlab/extractCategoryFactors.m

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,17 @@
6868
"class", info.Class(idx(1)), "kind", kind, "cols", idx(:)'); %#ok<AGROW>
6969
end
7070

71-
sIdx = find(info.Dtype ~= "vector" & info.Numeric);
72-
73-
cats(end+1) = struct("name","interpretable_scalars", "model","(mixed)", ...
74-
"class","(mixed)", "kind","interpretable-scalar", "cols", sIdx(:)');
71+
% Interpretable scalar channels, split BY DOMAIN so each feature class (visual, audio,
72+
% language, social, situation, affect) forms its own factor category with its own color
73+
% (previously all scalars were lumped into one "interpretable_scalars" block, so
74+
% language / social / situation never appeared as their own colored categories).
75+
sMask = info.Dtype ~= "vector" & info.Numeric;
76+
for cls = ["visual","audio","language","social","situation","affect"]
77+
idx = find(sMask & info.Class == cls);
78+
if isempty(idx), continue; end
79+
cats(end+1) = struct("name", cls + "_scalars", "model", "(interpretable)", ...
80+
"class", cls, "kind", "interpretable-scalar", "cols", idx(:)'); %#ok<AGROW>
81+
end
7582

7683
% ---- run FA/PCA per category
7784
byCat = struct([]); allScores = []; FN=strings(0,1); Cat=strings(0,1);
237 KB
Loading
69 KB
Loading
9.77 KB
Loading
23.9 KB
Loading

matlab/figures/05_tsne.png

14 KB
Loading

matlab/figures/06_umap.png

26.5 KB
Loading

matlab/plotFactorScores.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
opts.MatFile (1,1) string = "analysis/extracted_factors.mat"
4343
opts.OutDir (1,1) string = "matlab/figures"
4444
opts.CanlabPath (1,1) string = "/Users/f003vz1/Documents/GitHub/CanlabCore/CanlabCore"
45-
opts.Clip (1,1) string = "BigBuckBunny"
45+
opts.Clip (1,1) string = "kungfury"
4646
opts.Save (1,1) logical = true
4747
end
4848

0 commit comments

Comments
 (0)