I followed the example in
examples/src/main/scala/org/apache/spark/examples/mllib/SparseNaiveBayes.scala.
IN this file Params is defined as follows:
case class Params (
input: String = null,
minPartitions: Int = 0,
numFeatures: Int = -1,
lambda: Double = 1.0)
In the main function, the option parser accepts numFeatures as an option.
But I looked at the code in more detail just now and found the following:
val model = new NaiveBayes().setLambda(params.lambda).run(training)
So looks like at the time of creation only the lambda parameter is used.
Perhaps the example needs to be cleaned up during the next release. I am
currently using Spark version 1.0.1.
thanks
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Naive-Bayes-parameters-tp11592p11623.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]