adswa / localizer

A home for an analysis aimed at devoloping a novel approach for determining the specificity of functional ROIs.
1 stars 2 forks source link

How to interprete estimate signs exactly #4

Open adswa opened 5 years ago

adswa commented 5 years ago

just following up on a short clarification/conversation on this PR for future reference should I forget I already thought about it, ulabels will generally be sorted, bc during training, ulabels are assigned as self.ulabels = ulabels = targets_sa.unique where the unique method uses np.unique internally, and that seems to sort what it returns. So ulabels are sorted and order is lexicographically contained as:

# what the clfs ulabels are
In [112]: clf.ulabels
Out[112]: array(['EBA', 'FFA', 'LOC', 'OFA', 'PPA', 'VIS'], dtype='|S3')

In [113]: list(itertools.combinations(clf.ulabels, 2))
Out[113]: 
[('EBA', 'FFA'),
 ('EBA', 'LOC'),
 ('EBA', 'OFA'),
 ('EBA', 'PPA'),
 ('EBA', 'VIS'),
 ('FFA', 'LOC'),
 ('FFA', 'OFA'),
 ('FFA', 'PPA'),
 ('FFA', 'VIS'),
 ('LOC', 'OFA'),
 ('LOC', 'PPA'),
 ('LOC', 'VIS'),
 ('OFA', 'PPA'),
 ('OFA', 'VIS'),
 ('PPA', 'VIS')]

# from sensitivities after classification
In [114]: sensitivities[0].sa.bilat_ROIs
Out[114]: 
array([('EBA', 'FFA'), 
('EBA', 'LOC'), 
('EBA', 'OFA'), 
('EBA', 'PPA'),
('EBA', 'VIS'), 
('FFA', 'LOC'),
('FFA', 'OFA'),
('FFA', 'PPA'),
('FFA', 'VIS'), 
('LOC', 'OFA'), 
('LOC', 'PPA'), 
('LOC', 'VIS'),
('OFA', 'PPA'), 
('OFA', 'VIS'), 
('PPA', 'VIS')], dtype=object)

so, I believe in the FFA-PPA case, negative weights are suggesting greater FFA activation. I'll assert this assumption in the code, and then we can be sure to know in which ROIs favor to interpret estimate signs.

yarikoptic commented 5 years ago

yes, for any (L1, L2) the coefficient in case of a linear classifier is just a decision boundary coefficient for classification where L1 is assigned "-1" and L2 is "+1" label. So positive value would say that to go from L1 to L2 the feature value would be increasing, and the negative would be saying that to go from L1 to L2 would be decreasing. So swapping the direction, negative value would say that to go from L2 to L1 would be increasing ;) So for (FFA, PPA), negative values would indeed correspond to higher values for FFA than for PPA.