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

Objective function formulation for Logistic Regression #489

Open
fabian-sp opened this issue Jul 15, 2022 · 5 comments
Open

Objective function formulation for Logistic Regression #489

fabian-sp opened this issue Jul 15, 2022 · 5 comments

Comments

@fabian-sp
Copy link

Hi all,

I can not find the exact formulation of the objective function that is minimized in LogisticRegression. In particular, how exactly does C appear in the objective (e.g. if I want to do l1-penalization)?

Thank you!

@achab
Copy link

achab commented Jul 15, 2022

The parameter C is the inverse of the regularization strength. It's a convention also used by scikit-learn, see.

@fabian-sp
Copy link
Author

Yes, but in scikit-learn the loss function values are not averaged. I believe that in tick you solve:

min 1/C ||x||_1 + 1/n \sum_{i=1}^n log(...)

@achab
Copy link

achab commented Jul 15, 2022

Indeed, there is a scaling difference

@fabian-sp
Copy link
Author

Thanks! Another question I would have is: how can I set/access the starting point of a solver? So when using SVRG for logistic regression, what is the default starting point?

@stephanegaiffas
Copy link
Collaborator

Cf https://x-datainitiative.github.io/tick/modules/solver.html
You can choose the one you want using the optim api otherwise it's zero I think (long time not using it)

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

3 participants