Added L1 regularization support for the weights