python/pyspark/mllib/classification.py
def train(cls, data, lambda_=1.0):
        """
        Train a Naive Bayes model given an RDD of (label, features) vectors.

        This is the Multinomial NB (U{http://tinyurl.com/lsdw6p}) which can
        handle all kinds of discrete data.  For example, by converting
        documents into TF-IDF vectors, it can be used for document
        classification.  By making every vector a 0-1 vector, it can also be
        used as Bernoulli NB (U{http://tinyurl.com/p7c96j6}).

        @param data: RDD of NumPy vectors, one per element, where the first
               coordinate is the label and the rest is the feature vector
               (e.g. a count vector).
        @param lambda_: The smoothing parameter
        """
        sc = data.context
        dataBytes = _get_unmangled_double_vector_rdd(data)
        ans = sc._jvm.PythonMLLibAPI().trainNaiveBayes(dataBytes._jrdd, lambda_)
        return NaiveBayesModel(
            _deserialize_double_vector(ans[0]),
            _deserialize_double_vector(ans[1]),
            _deserialize_double_matrix(ans[2]))

        Train a Naive Bayes model given an RDD of (label, features) vectors.

        This is the Multinomial NB (U{http://tinyurl.com/lsdw6p}) which can
        handle all kinds of discrete data.  For example, by converting
        documents into TF-IDF vectors, it can be used for document
        classification.  By making every vector a 0-1 vector, it can also be
        used as Bernoulli NB (U{http://tinyurl.com/p7c96j6}).

        @param data: RDD of NumPy vectors, one per element, where the first
               coordinate is the label and the rest is the feature vector
               (e.g. a count vector).
        @param lambda_: The smoothing parameter
        
Train a Naive Bayes model given an RDD of (label, features) vectors.
Train a Naive Bayes model given an RDD of ( label features ) vectors .
def train(cls, data, lambda_=1.0):
        sc = data.context
        dataBytes = _get_unmangled_double_vector_rdd(data)
        ans = sc._jvm.PythonMLLibAPI().trainNaiveBayes(dataBytes._jrdd, lambda_)
        return NaiveBayesModel(
            _deserialize_double_vector(ans[0]),
            _deserialize_double_vector(ans[1]),
            _deserialize_double_matrix(ans[2]))
def train ( cls , data , lambda_ = 1.0 ) : sc = data . context dataBytes = _get_unmangled_double_vector_rdd ( data ) ans = sc . _jvm . PythonMLLibAPI ( ) . trainNaiveBayes ( dataBytes . _jrdd , lambda_ ) return NaiveBayesModel ( _deserialize_double_vector ( ans [ 0 ] ) , _deserialize_double_vector ( ans [ 1 ] ) , _deserialize_double_matrix ( ans [ 2 ] ) )
Train a Naive Bayes model given an RDD of (label, features) vectors.
Train a Naive Bayes model given an RDD of ( label features ) vectors .
"""
        Train a Naive Bayes model given an RDD of (label, features) vectors.

        This is the Multinomial NB (U{http://tinyurl.com/lsdw6p}) which can
        handle all kinds of discrete data.  For example, by converting
        documents into TF-IDF vectors, it can be used for document
        classification.  By making every vector a 0-1 vector, it can also be
        used as Bernoulli NB (U{http://tinyurl.com/p7c96j6}).

        @param data: RDD of NumPy vectors, one per element, where the first
               coordinate is the label and the rest is the feature vector
               (e.g. a count vector).
        @param lambda_: The smoothing parameter
        """
cls
data
RDD of NumPy vectors, one per element, where the first
coordinate is the label and the rest is the feature vector
.
RDD of NumPy vectors one per element where the first coordinate is the label and the rest is the feature vector .
lambda_
The smoothing parameter
The smoothing parameter