Hi All,<br><br>I was really happy to find pymvpa a few days ago. I like some of the dataset/classifier abstractions that are present, and while I haven't explored the entire package yet, I am eager to start using it more.<br>
<br>I ran into a problem running LARS, however (which was the original reason I looked into pymvpa.) Part of this might stem from my relative lack of knowledge of R/rpy, but I thought I should ask for some help here.<br><br>
I am doing something really basic:<br><br><br>training = Dataset(samples=N.array( N.arange(100),ndmin=2, dtype='float').T,\<br> labels=[0] * 50 + [1] * 50)<br><br>lrs = LARS()<br>lrs.train(training)<br>
<br><br>That fails with an rpy exception, which basically tells me there is something wrong with the types. I see we are passing a python ndarray as the 'x' argument of lars, which I am guessing is supposed to be converted<br>
to an R matrix behind the scenes. At the end something bad happens when the lars code invokes 'dim(x)'. I am using R 2.7.0, rpy-1.0.3. I have been able to do basic things with rpy, such as plotting, which tells me my rpy/R installation is fine. I have pasted the excetion I get at the end of the email.<br>
<br>Does anyone have any idea how to get LARS to work? <br><br>Thanks<br><br>EJ<br><br><br><br>C:\Python25\lib\site-packages\mvpa\clfs\base.pyc in train(self, dataset)<br> 352<br> 353 if dataset.nfeatures > 0:<br>
--> 354 result = self._train(dataset)<br> 355 else:<br> 356 warning("Trying to train on dataset with no features present")<br><br>C:\Python25\lib\site-packages\mvpa\clfs\lars.pyc in _train(self, data)<br>
145 intercept=self.__intercept,<br> 146 trace=self.__trace,<br>--> 147 use_Gram=self.__use_Gram)<br>
148 else:<br> 149 # train with specifying max_steps<br><br>RPy_RException: Error in rep(1, n) : invalid 'times' argument<br><br>WARNING: Failure executing file: <mvpa_test.py><br><br>
<br><br>