public class NaiveBayes extends ProbabilisticClassifier<Vector,NaiveBayes,NaiveBayesModel> implements NaiveBayesParams, DefaultParamsWritable
| Constructor and Description |
|---|
NaiveBayes() |
NaiveBayes(String uid) |
| Modifier and Type | Method and Description |
|---|---|
NaiveBayes |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
static NaiveBayes |
load(String path) |
static MLReader<T> |
read() |
NaiveBayes |
setModelType(String value)
Set the model type using a string (case-sensitive).
|
NaiveBayes |
setSmoothing(double value)
Set the smoothing parameter.
|
NaiveBayes |
setWeightCol(String value)
Sets the value of param
weightCol. |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
setProbabilityCol, setThresholdssetRawPredictionColfit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchemaequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetModelType, getSmoothing, modelType, smoothingvalidateAndTransformSchemagetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwntoStringgetWeightCol, weightColwritesavevalidateAndTransformSchemagetRawPredictionCol, rawPredictionColgetProbabilityCol, probabilityColgetThresholds, thresholdsinitializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic static NaiveBayes load(String path)
public static MLReader<T> read()
public String uid()
Identifiableuid in interface Identifiablepublic NaiveBayes setSmoothing(double value)
value - (undocumented)public NaiveBayes setModelType(String value)
value - (undocumented)public NaiveBayes setWeightCol(String value)
weightCol.
If this is not set or empty, we treat all instance weights as 1.0.
Default is not set, so all instances have weight one.
value - (undocumented)public NaiveBayes copy(ParamMap extra)
ParamsdefaultCopy().copy in interface Paramscopy in class Predictor<Vector,NaiveBayes,NaiveBayesModel>extra - (undocumented)