L2 and L1 regularization