I am running the sample multinomial regression code given in spark docs (Version 2.2.0)
LogisticRegression lr = new LogisticRegression().setMaxIter(100).setRegParam(0.3).setElasticNetParam(0.8); LogisticRegressionModel lrModel = lr.fit(training); But in the dataset I am adding a constant field where all the values are same. Now, I get an error saying 2018-03-11 15:42:58,835 [main] ERROR OWLQN - Failure! Resetting history: breeze.optimize.NaNHistory: 2018-03-11 15:42:58,922 [main] INFO OWLQN - Step Size: 1.000 2018-03-11 15:42:58,938 [main] INFO OWLQN - Val and Grad Norm: NaN (rel: NaN) NaN 2018-03-11 15:42:58,940 [main] INFO OWLQN - Converged because max iterations reached Without the constant field in the dataset everything works fine. Please help me understand what is the reason behind this error. When I run a binary logistic regression code it runs fine even if there are constant values in a field. Do I really need to get rod of constant field from my dataset while running multinomial regression. Is it a bug or this is expected ?? Thanks !! Kundan