Skip to content

Commit

Permalink
Update ML_06_Haxby_Scripting.rst
Browse files Browse the repository at this point in the history
Updated name to save script as to be consistent.
If subjects is not previously defined, code will break. Added definition.
'end' is needed.
  • Loading branch information
JohnAtl authored Oct 19, 2021
1 parent 063f27e commit 4a48ad3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/ML/ML_Short_Course/ML_06_Haxby_Scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ When the script has finished running for subjects 2, 3, 4, and 6, the only subje
Editing the MVPA Scripts
************************

The changes to the MVPA scripts are similar to the edits for the preprocessing. At the beginning of the script we will declare our for-loop:
The changes to the MVPA scripts are similar to the edits for the preprocessing. At the beginning of the ``Haxby_MVPA_ROI`` script we will declare our for-loop:

::

subjects = [1 2 3 4 5 6];
for subject=subjects
subject = num2str(subject);
Expand All @@ -105,7 +107,9 @@ And then change the code for setting the results and beta maps directories:
% Set the filepath where your SPM.mat and all related betas are, e.g. 'c:\exp\glm\model_button'
beta_loc = [pwd '/SPM_Results_' subject];
And run the script from the terminal. As an exercise, when it has finished modify the script again to do a searchlight analysis for all of the subjects, using the methods you learned in the last chapter. A template script can be downloaded `here <https://github.com/andrewjahn/MachineLearning>`__, under the file ``Haxby_MVPA_Scripted``.
Also, add an ``end`` at the end of the file.

And run the script from the terminal. As an exercise, when it has finished modify the script again to do a searchlight analysis for all of the subjects, using the methods you learned in the last chapter. A template script can be downloaded `here <https://github.com/andrewjahn/MachineLearning>`__, under the file ``Haxby_MVPA_ROI_Scripted``.

Next Steps
**********
Expand Down

0 comments on commit 4a48ad3

Please sign in to comment.