4

I want to run Lasso regression using TensorFlow. As the Lasso regression is simply adding L1-norm to the cost, I am going to define my cost term as

cost = RSS + tf.nn.l1_norm(Weight) or
cost = RSS + tf.reduce_sum(tf.abs(Weight))
train = tf.train.GradientDescentOptimizer(cost)

Is the above code work as a Lasso regression? One of my question is if I can use gradient descent in this case. Lasso regression has non-diffrentiable point and coordinate descent is widely used that does not exist in the TensorFlow library.

emerson
  • 153
  • 1
  • 8
  • I think TF's gradient descent can handle `l1` norms just fine. I believe it just assumes a value at the discontinuity, but I could be wrong. This was a while ago, so by now I'm sure you know whether or not it worked. – Engineero Jun 09 '17 at 15:33

0 Answers0