Class: NaiveBayesModel

eclairjs/mllib/classification. NaiveBayesModel

new NaiveBayesModel()

Model for Naive Bayes Classifiers.
Implements:
Source:

Methods

(static) load(sc, path) → {module:eclairjs/mllib/classification.NaiveBayesModel}

Parameters:
Name Type Description
sc module:eclairjs.SparkContext
path string
Source:
Returns:
Type
module:eclairjs/mllib/classification.NaiveBayesModel

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
Source: