AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
August 24, 2016 12:28PM
Hi Juan,

I'm one of the developers and currently maintain 3dsvm in Stephen LaConte's lab.

3dsvm was originally designed for blocked designs, but it can be used for event-related designs with some extra prep work. We are planning to add options to better accommodate event-related designs in the future.

Questions, Run1_IM+tlrc & -trainlabels file:

3dDeconvolve -stim_times_IM
We find that when people use "-stim_times_IM" option, they take the assumption "fixed-shape regression", and usually use the function "GAM, BLOCK(d,p) or BLOCK(d)". They do not use the variable-shape regression, such as the TENT(b,c,n). Are we right? If we only can use the "fixed-shape regression" with the 3dDeconvolve -stim_times_IM", then things are complex.


De-convolving and normalizing the BOLD response first is a good idea. I haven't tried using the TENT response model, but I think it should work as well.

When we use "3dDeconvolve - stim_times_IM" function with the assumption "fixed-shape regression", We perhaps can get 40 trials for the event "House", 38 trials for the event "Building" , 45 trials for the event "Threat Face", and 41 trials for the event "Scrambled Face" (after I excluded the wrong and miss trials), for Run1. In the 3dDeconvolve output, they showed something like Bricks below (I use "3dinfo -verb" command to show),

Sub_Brick #0, "Full_Fstat",
Sub_Brick #1-40: "House #1_Coef, House #2_Coef............House #40_Coef'.
Sub_Brick #41-79: "Building #1_Coef, Building #2_Coef............Building #38_Coef'.
Sub_Brick #80-124: "ThreatFace #1_Coef, ThreatFace #2_Coef............ThreatFace #45_Coef'.
Sub_Brick #125-165: "ScrambledFace#1_Coef, ScrambledFace #2_Coef............ScrambledFace #41_Coef'.
Sub_Brick #166, "Error#0"

As you see, they are list sequentially since 0 to 166. How should I prepare the option " -trainlabels "? Suppose the part of the sequence in a run of the experiment coding is as following (codes: House 1, Building 2, Threat Face 3, Scrambled Face 4): 2 2 1 1 2 4 3 4 4 3 1 2 4 4 3 3 3 2 1 1.....

Does it mean that we just use this 1D data as the run's trainlabels input file here? Or should weI prepare them as 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 ...., as the Bricks in the "Run1_IM+tlrc " are sequential?


In this example, the file for –trainlabels should contain the following:

line 1: 9999
line 2-41: 1
line 42-80: 2
line 81-125: 3
line 126-166: 4
line 167: 9999

This excludes sub-brick #0 and #166, assigns class-1 to sub-brick #1-40, class-2 to sub-brick #41-79, class-3 to sub-brick #80-124 and class-4 to sub-brick #125-165. However, to keep the number of observations balanced across classes (i.e. equal number of observations for each class), I would randomly exclude some of the observations by using '9999' or by using the -censor option.


Is that MVPA only can be used to classify two conditions? Then does it mean that we only can compare one condition, against the other three conditions at one time? If we want to classify 1 and 2, then 3 and 4 should all be 999? If so they maybe 1 1 1 1 1 2 2 2 2 2 999 999 999 999 999 999 999 999 999 999? Or, as above, 2 2 1 1 2 999 999 999 999 999 1 2 999 999 999 999 999 2 1 1?

During training, 3dsvm will automatically train a binary classifier for each class combination and only select the data (sub-bricks) belonging to that class combination (e.g. for the 1-vs-2 classifier, the sub-bricks belonging to all other classes (class-3,class-4) as well as sub-bricks labeled with 9999s will be ignored). During testing, the data will be sent through all binary classifiers and the class membership will be determined using a Directed Acyclic Graph (option: -multiclass DAG) or max votes wins (option: - multiclass vote).

Question, MVPA based on several Regions

If we only want to focus on several special regions, such as temporal lobe (e.g, Hippocampus, parahippocampal cortex...). how can we select the features from the third (5s) or fourth (7.5s) scans? Our question goes back, can we use 3dDeconvolve -stim_times_IM with variable-shape regression? I know if I do the ROI analysis, perhaps I can use the IRF-Shape nonfixed 3dDeconvolve, such as CSPLIN (0,15,7), then select the features from 5s or 7.5s TRs.


Generally, this can be done using the -mask option in 3dsvm. The mask is considered part of the model and will be automatically applied to the testing data as well. You can generate a mask for specific brain regions defined in an atlas (e.g. Hippocampus, etc.) using whereami. You can also model the events in 3dDeconvolve (using onset time, shape and duration) first, and create a mask based on the goodness of fit.


Question, Prediction accuracy

After we use the model to predict/Testing the remained data, we can get the prediction accuracy for each subject. Can we just group all the accuracy data and do the one-tailed T test (compared to the chance level 50%) to see whether the MVPA model is good/significant or not? Some people suggested "group-level classifier accuracy was computed using a one-sampled t-test versus chance (50%) and assessed for significance with permutaiton testing". Any good pointers?


I think a one-tailed t-test of prediction accuracies vs. 50% can be used to check for above-chance significance at a group level. I would recommend estimating prediction accuracy (for each subject) using enough independent data (at least 20%) that was never used for training, or by cross-validation (at least 20 permutations) leaving out at least 20% of the data. Maybe someone else with a better statistics background can answer this question in more detail.

Jonathan



Edited 1 time(s). Last edit at 08/25/2016 09:56AM by jlisinski.
Subject Author Posted

Question on 3dsvm usage -thanks!!!

Juan August 20, 2016 02:46PM

Re: Question on 3dsvm usage -thanks!!!

jlisinski August 24, 2016 12:28PM

Re: Question on 3dsvm usage -thanks!!!

Juan August 24, 2016 07:46PM

Re: Question on 3dsvm usage -thanks!!!

jlisinski August 25, 2016 10:31AM

Re: Question on 3dsvm usage -thanks!!!

Juan August 25, 2016 12:50PM

Re: Question on 3dsvm usage -thanks!!!

jlisinski August 31, 2016 04:36PM

Re: Question on 3dsvm usage -thanks!!!

charujing123 September 21, 2016 02:58AM

Re: Question on 3dsvm usage -thanks!!!

charujing123 September 21, 2016 06:31AM