spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfonso Muñoz Muñoz <Alfonso.Mu...@11paths.com>
Subject Question about SVM mlllib...
Date Mon, 13 Oct 2014 14:03:33 GMT
Dear friends,

Is there any way to know what is the “predicted label” for each “input label”?

[CODE]
…
Val model=SVMWithSGD.train(training,numIterations)
Model.clearThreshold()

Val scoreAndLabels = test.map{ point =>
                Val score = model.predict(point.features)
                (prediction, point.label)
}

scoreAndLabels.foreach( t=> println(“”+t._1+” [“+t._2”]”))
…
[END CODE]

Thanks,

Mime
View raw message