Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
profumo
PFM_Simulations
Commits
3178ef1a
Commit
3178ef1a
authored
Oct 02, 2019
by
Sam Harrison
Browse files
Add cross-subject spatial correlations to scoring
parent
c39f0592
Changes
1
Hide whitespace changes
Inline
Side-by-side
Scoring/calculateDecompositionAccuracy.m
View file @
3178ef1a
...
...
@@ -57,6 +57,35 @@ end
%--------------------------------------------------------------------------
% Spatial accuracy - cross subject correlations
scores
.
P_xs
.
data
=
NaN
(
params
.
V
,
params
.
N
);
scores
.
P_xs
.
name
=
'Spatial maps (cross subject)'
;
scores
.
P_xs
.
metric
=
'Correlation'
;
scores
.
P_xs
.
range
=
[
-
1.0
,
1.0
];
for
n
=
1
:
params
.
N
Pn
=
NaN
(
params
.
V
,
params
.
S
);
inf_Pn
=
NaN
(
params
.
V
,
params
.
S
);
for
s
=
1
:
params
.
S
Pn
(:,
s
)
=
P
{
s
}(:,
gt_inds
(
n
));
inf_Pn
(:,
s
)
=
signs
(
n
)
.*
inf_P
{
s
}(:,
inf_inds
(
n
));
end
% Just the correlations between the two
%cP = diag(corrcoef(Pn', inf_Pn')); % [V, V]: Too big!
dim
=
2
;
zPn
=
zscore
(
Pn
,
1
,
dim
);
% normalise by N, not N-1
inf_zPn
=
zscore
(
inf_Pn
,
1
,
dim
);
cP
=
mean
(
zPn
.*
inf_zPn
,
dim
);
% Ignore elements with limited true variability
cP
(
std
(
Pn
,
1
,
dim
)
==
0.0
)
=
NaN
;
cP
(
sum
(
Pn
==
0.0
,
dim
)
>
0.2
*
params
.
S
)
=
NaN
;
% Return scores in order of GT components so comparable across methods
scores
.
P_xs
.
data
(:,
gt_inds
(
n
))
=
cP
;
end
%--------------------------------------------------------------------------
% Repeat for the temporal accuracy
% Take correlation between true and inferred time courses
scores
.
A
.
data
=
NaN
(
sum
(
params
.
R
),
params
.
N
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment