new NaiveBayesModel()
Model for Naive Bayes Classifiers.
- Implements:
- ClassificationModel
- Source:
Methods
predict(testData) → {module:eclairjs/rdd.RDD|float}
Predict values for the given data set using the model trained.
Parameters:
Name | Type | Description |
---|---|---|
testData |
module:eclairjs/rdd.RDD | Vector | RDD representing data points to be predicted or Vector array representing a single data point |
Returns:
an RDD[Double] where each entry contains the corresponding prediction or float predicted category from the trained model
- Type
- module:eclairjs/rdd.RDD | float
predictProbabilities(testData) → {module:eclairjs/rdd.RDD|Vector}
Predict values for the given data set using the model trained.
Parameters:
Name | Type | Description |
---|---|---|
testData |
module:eclairjs/rdd.RDD | Vector | RDD representing data points to be predicted in the same order as class labels |
Returns:
an RDD[Vector] where each entry contains the predicted posterior class probabilities,
- Type
- module:eclairjs/rdd.RDD | Vector
save(sc, path) → {Promise.<Void>}
Parameters:
Name | Type | Description |
---|---|---|
sc |
module:eclairjs.SparkContext | |
path |
string |
Returns:
A Promise that resolves to nothing.
- Type
- Promise.<Void>