new NaiveBayesModel()
Model for Naive Bayes Classifiers.
Methods
(static) load(sc, path) → {module:eclairjs/mllib/classification.NaiveBayesModel}
Parameters:
Name | Type | Description |
---|---|---|
sc |
module:eclairjs.SparkContext | |
path |
string |
Returns:
predict(testData) → {module:eclairjs.RDD|float}
Predict values for the given data set using the model trained.
Parameters:
Name | Type | Description |
---|---|---|
testData |
module:eclairjs.RDD | module:eclairjs/mllib/linalg.Vector | RDD representing data points to be predicted or Vector array representing a single data point |
- Implements:
- Source:
Returns:
an RDD[float] where each entry contains the corresponding prediction or float predicted category from the trained model
- Type
- module:eclairjs.RDD | float
save(sc, path)
Parameters:
Name | Type | Description |
---|---|---|
sc |
module:eclairjs.SparkContext | |
path |
string |