Github user yinxusen commented on the pull request: https://github.com/apache/spark/pull/458#issuecomment-41148756 @coderxiang I do some experiments on your dataset. * For MLlib, you should first rewrite your labels {+1, -1} into {+1, 0}. [Reference here](http://54.82.240.23:4000/mllib-linear-methods.html#binary-classification) * For Lasso, you need preprocess your dataset, and make it with zero mean and unit norm. [Reference here](http://stats.stackexchange.com/questions/19523/need-for-centering-and-standardizing-data-in-regression). @mengxr just removed the former preprocessing because it is not elegant. I open a [JIRA issue](https://issues.apache.org/jira/browse/SPARK-1585) to explain the reason why `Infinity` occurs. IMHO, I prefer rewriting [this line]( https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/optimization/Gradient.scala#L127) into `brzAxpy(2.0 * diff / weights.size, brzData, cumGradient.toBreeze)` to do average, since the gradient is used for updating each single element of weights. But I am not sure of that, maybe @mengxr and @etrain could give us some suggestions.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---