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

l1 regularization #58

Open
forcoogle opened this issue Sep 20, 2019 · 2 comments
Open

l1 regularization #58

forcoogle opened this issue Sep 20, 2019 · 2 comments

Comments

@forcoogle
Copy link

Shouldn't class l1_regularization() be defined as self.alpha * np.linalg.norm(w, 1) instead of self.alpha * np.linalg.norm(w)?

@cpy18727
Copy link

cpy18727 commented May 7, 2020

i think so too

@klintan
Copy link

klintan commented Oct 26, 2022

Yes, I was looking at that for way too long. It should def be np.linalg.norm(w, 1) for the L1-norm or Manhattan distance, the default is the L2-norm (Frobenius).

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