Skip to content

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

@cassidys

Description

@cassidys

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'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions