<div dir="ltr">Hi -<div><br></div><div>When I run the spotlight using SVM I get complaints about C not being able to be normalized. This seems to be because the group mask includes voxels that are not live for all subjects.  I can make these warnings go away with more aggressive masking for each subject, but what I'd really like to do is tell the classifier to just ignore constant features.</div><div><br></div><div>I found the remove_invariant_features function, which seems just the thing.  However, when writing the searchlight results produced on a dataset filtered through this function, the original image dimensions are lost.  Is there a way to have the invariant features removed in a similar way as when you specify a mask with the dataset, which allows the original image dimensions to be preserved in the mapper chain s.t. searchlight results written to disk Just Work?</div><div><br></div><div>Here's a code snippet that shows what I mean.  If I don't remove the invariant features (indicated with a comment) </div><div><div><br></div><div>###</div><div><div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif"># Using just this, the written image would be of the original image dimensions (73 * 87 * 73)</font></div><div><font face="trebuchet ms, sans-serif"># sub_ds_inv = s.sub_datasets[contrast]</font></div></div><div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif"># Removing inv features pleases the SVM but messes up dimensions.</font></div><div><font face="trebuchet ms, sans-serif">sub_ds_inv = mfx.remove_invariant_features(s.sub_datasets[contrast])</font></div><div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif">clf  = LinearCSVMC()</font></div><div><font face="trebuchet ms, sans-serif">cv   = CrossValidation(clf, NFoldPartitioner(attr="scrambled_runs"), \</font></div><div><font face="trebuchet ms, sans-serif">         errorfx=lambda p,t: np.mean(p == t), enable_ca=['stats'])</font></div><div><font face="trebuchet ms, sans-serif">sl    = sphere_searchlight(cv, radius=radius_size, postproc=mean_sample(), nproc=NPROC)</font></div><div><font face="trebuchet ms, sans-serif">res  = sl(sub_ds_inv)</font></div><div><font face="trebuchet ms, sans-serif"><br></font></div><div><font face="trebuchet ms, sans-serif"># With inv features removed, this writes the results in one giant array (26880 x 1 x 1).</font></div><div><font face="trebuchet ms, sans-serif">nimg = map2nifti(sub_ds_inv, res.samples[0])</font></div><div><font face="trebuchet ms, sans-serif">nimg.to_filename("spotlight_101")</font></div></div><div><br></div><div>###</div><div><br></div><div>Thanks for any help,</div><div><br></div><div>Shane</div></div>