public class NaiveBayes extends java.lang.Object implements scala.Serializable, Logging
Constructor and Description |
---|
NaiveBayes() |
NaiveBayes(double lambda) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
Bernoulli() |
double |
getLambda() |
java.lang.String |
getModelType() |
static java.lang.String |
Multinomial() |
NaiveBayesModel |
run(RDD<LabeledPoint> data) |
NaiveBayes |
setLambda(double lambda) |
NaiveBayes |
setModelType(java.lang.String modelType) |
static scala.collection.immutable.Set<java.lang.String> |
supportedModelTypes() |
static NaiveBayesModel |
train(RDD<LabeledPoint> input) |
static NaiveBayesModel |
train(RDD<LabeledPoint> input,
double lambda) |
static NaiveBayesModel |
train(RDD<LabeledPoint> input,
double lambda,
java.lang.String modelType) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public static java.lang.String Multinomial()
public static java.lang.String Bernoulli()
public static scala.collection.immutable.Set<java.lang.String> supportedModelTypes()
public static NaiveBayesModel train(RDD<LabeledPoint> input)
public static NaiveBayesModel train(RDD<LabeledPoint> input, double lambda)
public static NaiveBayesModel train(RDD<LabeledPoint> input, double lambda, java.lang.String modelType)
public NaiveBayes setLambda(double lambda)
public double getLambda()
public NaiveBayes setModelType(java.lang.String modelType)
public java.lang.String getModelType()
public NaiveBayesModel run(RDD<LabeledPoint> data)