I used Spark 2.4 and previous versions, and spark mllib is using SGD for regression problems as optimizer, and there are LinearRegressionWithSGD and LassoWithSGD, which use SGD as the optimizer.
It looks to me that Spark is using L-BFGS, Normal equation solver for weighted least squares ,Iteratively reweighted least squares (IRLS) as optimizer now (https://spark.apache.org/docs/latest/ml-advanced.html).
I would ask why Spark gave up SGD and what's the motivation for spark to move to optimizers mentioned above. Are there limitations with SGD?
Thanks
This explanation is for Spark version 3.4.1, the latest version at the time of writing this post.
If you look at this doc page, you see that SGD is actually still supported for linear methods (like those you mentioned) and is actually the one that most algorithms implement:
You can indeed see in the source code that these are still supported for your examples:
LinearRegressionWithSGDandLassoWithSGD.Now, even though these are still supported, I did find some hints as to why you could prefer to use L-BFGS over SGD.
From the docs:
And also this commit contains some motivation for it. The relevant part of that commit message:
Of course, this is always dependent on your exact case but this might give more context to what you were originally wondering about.