I'm working on a LogisticRegression model and trying to debug.
It's a simple thing but can't seem to get it to work: just have time of day
and a state 0 or 1
, and want to predict the state for a given time of day.
There are no errors when training the model, but I see this:
GradientDescent: GradientDescent.runMiniBatchSGD finished. Last 10 stochastic losses NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN
in the logs
when trying to eval
I always end up with an error java.util.NoSuchElementException: key not found: keyname
I have seen this before when feeding the classifier a feature set that is not possible, but here I am only using 1 feature and it's a simple model, so I don't understand what is wrong.
Any idea how I can see what is going on?
I also used BinaryClassificationMetrics
and it returns
FmeasureCurve
= (NaN,0.17630133869823753)
ROCCurve
=
(0.0,0.0)
(1.0,1.0)
(1.0,1.0)
How would I print the model information to see what values are in there? I there an easy way to get this data?
When I print the model I only get:
org.apache.spark.mllib.classification.LogisticRegressionModel: intercept = 0.0, numFeatures = 1, numClasses = 2, threshold = None
Thanks