<div dir="ltr">Dear all,<div><br></div><div>The PDist() command should return a correlation distance (-1 to +1), however when I run the following command I get values outside of this range (> +1). </div><div><br></div><div><div># Load in dataset</div><div>ds = fmri_dataset(samples = samples, mask = mask, chunks = sa['chunks'], targets = sa['targets'])</div><div>ds = remove_invariant_features(ds)</div><div> </div><div># mean condition samples </div><div>from mvpa2.mappers.fx import mean_group_sample</div><div>mtgs = mean_group_sample(['targets'])</div><div>mtds = mtgs(ds)</div></div><div><br></div><div># run PDist() to return correlation distances </div><div><div>dsm = rsa.PDist(square=True)</div><div>res = dsm(mtds)</div></div><div><br></div><div>#output </div><div>res.samples </div><div><br></div><div><div>array([[ 0. , 0.9043133 , 1.09194786, 1.20181892, 1.2377347 ,1.27552916],</div><div> [ 0.9043133 , 0. , 1.31801455, 1.63764293, 0.84023813, 1.26055982],</div><div> [ 1.09194786, 1.31801455, 0. , 1.204598 , 1.52931203, 0.97232624],</div><div> [ 1.20181892, 1.63764293, 1.204598 , 0. , 1.03952873, 0.90664715],</div><div> [ 1.2377347 , 0.84023813, 1.52931203, 1.03952873, 0. ,1.51721574],</div><div> [ 1.27552916, 1.26055982, 0.97232624, 0.90664715, 1.51721574, 0. ]])</div></div><div><br clear="all"><div><br></div><div>Any idea what I am doing wrong? From the documentation online (<a href="http://www.pymvpa.org/generated/mvpa2.measures.rsa.pdist.html">http://www.pymvpa.org/generated/mvpa2.measures.rsa.pdist.html</a>) the function PDist() by default(?) calculates the Euclidean distance, although the documentation on the RSA page (<a href="http://www.pymvpa.org/examples/rsa_fmri.html">http://www.pymvpa.org/examples/rsa_fmri.html</a>) states that the PDist calculates correlation distance - could this be where I am going wrong? I have tried explicitly calling in metric = 'correlation' but this results in and 'Unexpected keyword argument' error message. </div><div><br></div><div>Cheers,</div><div>Charlotte</div><div><br></div><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><font color="#888888">Charlotte Murphy</font><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">PhD Student</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Department of Psychology</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">University of York,</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Heslington, York, YO10 5DD, UK</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Email: cem552</span><span style="color:rgb(34,34,34);background-color:rgb(255,255,204)">@<a href="http://york.ac.uk" target="_blank">york.ac.uk</a></span><br style="color:rgb(136,136,136)"></div></div></div></div>
</div></div>