gallantlab / himalaya

Multiple-target linear models - CPU/GPU
https://gallantlab.github.io/himalaya
BSD 3-Clause "New" or "Revised" License
80 stars 13 forks source link

split=True on model predictions for GroupRidgeCV does not return predictions for each input feature set? #20

Closed sreejank closed 2 years ago

sreejank commented 2 years ago

Hi, Thanks for this fantastic code. It was really easy for me to get started with it, and it's extremely fast. I couldn't find if this is intended for public use yet and so I apologize if it is not. For this code:

from himalaya.ridge import GroupRidgeCV
import numpy as np 
X=np.random.rand(100,100)
X0=np.random.rand(100,100)
Y=np.random.rand(100,5)
model=GroupRidgeCV(groups='input')
model.fit([X,X0],Y)
print(model.predict([X,X0],split=True).shape)

This returns (100,5). I was expecting a list size 2 of [100x5] predictions, one for each of [X,X0]?

sreejank commented 2 years ago

Was able to fix this by installing from source rather than pip.

Could be worth updating the pip version?

TomDLT commented 2 years ago

Glad that you like this package ! It has been recently made public, so you are very welcome to use it. I will try to make it clearer on the readme. I will also push a new version to pypi, thanks for the suggestion.

Do not hesitate if you have other comments or questions.