Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporting n_obs x n_class target in logistic regression #4

Open
afshinrahimi opened this issue May 16, 2016 · 2 comments
Open

supporting n_obs x n_class target in logistic regression #4

afshinrahimi opened this issue May 16, 2016 · 2 comments

Comments

@afshinrahimi
Copy link

afshinrahimi commented May 16, 2016

Hi,

I was just using the code to do a regularized multinomial logistic regression where each instance's label is a probability distribution over all labels and the design matrix X is sparse.
I found that it is not supported yet as _check_y throws an exception if y's dimension is not eq 1.

It would be great if it is implemented because currently no other library (that I know of) supports that and really need this feature. If you don't have enough time for that would you please guide me what is the best way to start implementing that in the code?

Thanks.

@madrury
Copy link
Owner

madrury commented May 16, 2016

I saw your post on cross validated : )

On the face of it, I'm not sure what it would take. The library depends on
the FORTRAN code of hastie et.al. I have no ability to modify that FORTAN
code (it's a nightmare, and was seemingly written to make sure no one can
understand it). The python-glmnet library simply hooks into the FORTAN
code from python code. So, I would investigate two things:

  1. Does the FORTRAN code support a multinomial distribution?
  2. If so, can you call it with a discrete distribution as arguments?

You should be able to answer these questions by reading the comments in the
FORTRAN. If the answer's are yes, then it should be possible to wrap the
multinomial calls in python.

On Sun, May 15, 2016 at 5:50 PM, afshinrahimi [email protected]
wrote:

Hi,

I was just using the code to do a regularized multinomial logistic
regression where each instance's label is a probability distribution over
all labels.
I found that it is not supported yet as _check_y throws an exception if
y's dimension is not eq 1.

It would be great if it is implemented because currently no other library
(that I know of) supports that and really need this feature. If you don't
have enough time for that would you please guide for me what is the best
way to start implementing that in the code?

Thanks.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#4

@afshinrahimi
Copy link
Author

afshinrahimi commented May 16, 2016

Thank you very much for the prompt reply and the useful guides. I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants