tick
tick copied to clipboard
Objective function formulation for Logistic Regression
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!
The parameter C
is the inverse of the regularization strength. It's a convention also used by scikit-learn, see.
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(...)
Indeed, there is a scaling difference
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?
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)