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_regression loss is calling regularization with reg_type='l2' #4

Open
cassidys opened this issue Jul 27, 2018 · 0 comments
Open

l1_regression loss is calling regularization with reg_type='l2' #4

cassidys opened this issue Jul 27, 2018 · 0 comments

Comments

@cassidys
Copy link

cassidys commented Jul 27, 2018

from hipsternet/hipsternet/loss.py line 112

def l1_regression(model, y_pred, y_train, lam=1e-3):
    m = y_pred.shape[0]

    data_loss = np.sum(np.abs(y_train - y_pred)) / m
    reg_loss = regularization(model, reg_type='l2', lam=lam)  #<----- should this be l1 not l2

    return data_loss + reg_loss

Shouldn't it be calling regularization with reg_type='l1' and not 'l2'?

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

1 participant