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

Multinomial logistic regression #157

Closed
leo60228 opened this issue Aug 12, 2021 · 3 comments
Closed

Multinomial logistic regression #157

leo60228 opened this issue Aug 12, 2021 · 3 comments

Comments

@leo60228
Copy link

It's worth noting here that I'm not sure this is actually what I'm looking for. A core component of a project I'd like to work on is effectively a multinomial classification problem. However, the project as a whole is much more complex than this, and I actually find the classification itself to be one of the least interesting parts. Based on prior art with this problem, I know that scikit-learn's logistic regression gives good results with my dataset. I was hoping to be able to easily do this in Rust.

@leo60228
Copy link
Author

Comparing linfa and sklearn, it looks like it should be relatively easy to port over multinomial support. However, I'm somewhat worried about implementing this when I don't understand the math at all...

@YuhanLiin
Copy link
Collaborator

It should be relatively simple to extend/generalize the existing binomial regression in linfa-logistic. You'd need to make the weight vector into a weight matrix (n_features x n_targets) and extending the target label processing to support more than 2 distinct labels. It'll specifically involve extending the argmin_params module to multi-dimension arrays. I'd be interested in implementing myself this actually.

@YuhanLiin
Copy link
Collaborator

Implemented by #159

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