在用 spark ml 的 Logistic Regression 的时候,遇到了下面的问题,日志显示 Step Size: NaN, 迭代的损失函数也是NaN。 具体的日志如下,截取了一部分:
18/01/31 11:13:10 INFO OWLQN: Step Size: NaN
18/01/31 11:13:10 INFO OWLQN: Val and Grad Norm: NaN (rel: NaN) NaN
18/01/31 11:13:10 ERROR OWLQN: Failure! Resetting history: breeze.optimize.NaNHistory:
18/01/31 11:13:10 INFO OWLQN: Step Size: 1.000
18/01/31 11:13:11 INFO OWLQN: Val and Grad Norm: NaN (rel: NaN) NaN
18/01/31 11:13:11 INFO OWLQN: Converged because max iterations reached
loss-- NaN
loss-- NaN
loss-- NaN
loss-- NaN
loss-- NaN
loss-- NaN
loss-- NaN
代码是github上的 JavaLogisticRegressionSummaryExample ,请大牛指点!!