<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Hi Lewis,</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">This kind of question would better go
      to Neurostars.</div>
    <div class="moz-cite-prefix">IIUC, you have put in the dataframe
      both the target variable (the class), often denoted "y", and the
      voxel data ("X"). So you don't need to apply a Masker any more.</div>
    <div class="moz-cite-prefix">The only thing is to extract X and y
      from your dataFrame, and give that to scikit-learn, together with
      a correct cross-validation scheme.</div>
    <div class="moz-cite-prefix">Does that make sense ?</div>
    <div class="moz-cite-prefix">Best,</div>
    <div class="moz-cite-prefix">Bertrand<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 20/05/2020 10:49,
      <a class="moz-txt-link-abbreviated" href="mailto:lewis.dunne00@gmail.com">lewis.dunne00@gmail.com</a> wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:5ec4ef21.1c69fb81.ebe04.8c5b@mx.google.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:478571367;
        mso-list-type:hybrid;
        mso-list-template-ids:1418607492 -1 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-bidi-font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;
        mso-bidi-font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-bidi-font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;
        mso-bidi-font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-bidi-font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal">Hello. I'm trying to follow the <a
href="https://nilearn.github.io/auto_examples/plot_decoding_tutorial.html#sphx-glr-auto-examples-plot-decoding-tutorial-py"
            moz-do-not-send="true">tutorial on Nilearn for decoding</a>,
          only using my own data which is event related. I used SPM to
          create unique beta images for each trial in my dataset as
          recommended. But since this is a different approach from the
          Haxby dataset I'm a little unclear on how to follow along now.
          I wonder if I could get some feedback on what I have done so
          far.</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I created a dataframe with the trial event
          labels and paired each trial with its respective beta image. I
          did this by reading in each beta file and masking it with a
          previously made 6mm ROI (not quite sure how to make an
          anatomical mask yet), which left me with a 1x120 array where
          120 is the number of voxels for that trial event within the
          mask. I don't know if this is correct... Since I have 82
          events in this task, I created an 82x120 matrix containing all
          of these masked beta images as rows, voxel data as columns,
          and concatenated this onto my dataframe containing
          trial-by-trial task info. My plan was to then use these 120
          voxels as features and my experimental condition column (it's
          just binary data) as the labels.</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">The problem is I get to the NiftiMasker and
          receive this warning: </p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">`UserWarning: Standardization of 3D signal
          has been requested but would lead to zero values. Skipping.</p>
        <p class="MsoNormal">  warnings.warn('Standardization of 3D
          signal has been requested but '` <span
            style="font-family:Wingdings">ß</span> not a typo</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I think this has to do with the fact that
          these are beta images for events rather than an entire block,
          so there is no time dimension? But I'm not sure because I am
          quite unfamiliar with this. For example in the tutorial it
          says that the variable "fmri_masked" is an array with shape
          `time x voxels`. The array that I get is of course 1 x 120,
          which makes sense given the event-related design, but the
          tutorial doesn't mention anything about this.</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I think I've misunderstood something. What
          should I really be doing differently in the case of an
          event-related design with trial-wise betas? Feedback would be
          greatly appreciated!</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Best</p>
        <p class="MsoNormal">L</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Sent from <a
            href="https://go.microsoft.com/fwlink/?LinkId=550986"
            moz-do-not-send="true">Mail</a> for Windows 10</p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
        <table style="border-top: 1px solid #D3D4DE;">
          <tbody>
            <tr>
              <td style="width: 55px; padding-top: 13px;"><a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
                  target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
                    alt="" style="width: 46px; height: 29px;"
                    moz-do-not-send="true" width="46" height="29"></a></td>
              <td style="width: 470px; padding-top: 12px; color:
                #41424e; font-size: 13px; font-family: Arial, Helvetica,
                sans-serif; line-height: 18px;">Virus-free. <a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
                  target="_blank" style="color: #4453ea;"
                  moz-do-not-send="true">www.avast.com</a> </td>
            </tr>
          </tbody>
        </table>
        <a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
          height="1" moz-do-not-send="true"> </a></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Neuroimaging mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Neuroimaging@python.org">Neuroimaging@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/neuroimaging">https://mail.python.org/mailman/listinfo/neuroimaging</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>