array () > from sklearn.naive_bayes import MultinomialNB > clf = MultinomialNB () > clf. n_features_ intĭEPRECATED: Attribute n_features_ was deprecated in version 1.0 and will be removed in 1.2. intercept_ ndarray of shape (n_classes,)ĭEPRECATED: Attribute intercept_ was deprecated in version 0.24 and will be removed in 1.1 (renaming of 0.26). feature_log_prob_ ndarray of shape (n_classes, n_features) This value is weighted by the sample weight when Number of samples encountered for each (class, feature)ĭuring fitting. feature_count_ ndarray of shape (n_classes, n_features) classes_ ndarray of shape (n_classes,)Ĭlass labels known to the classifier coef_ ndarray of shape (n_classes, n_features)ĭEPRECATED: Attribute coef_ was deprecated in version 0.24 and will be removed in 1.1 (renaming of 0.26). Smoothed empirical log probability for each class. class_log_prior_ ndarray of shape (n_classes,) Value is weighted by the sample weight when provided. Number of samples encountered for each class during fitting. Attributes class_count_ ndarray of shape (n_classes,) If specified the priors are notĪdjusted according to the data. class_prior array-like of shape (n_classes,), default=None Whether to learn class prior probabilities or not. Parameters alpha float, default=1.0Īdditive (Laplace/Lidstone) smoothing parameter In practice, fractional counts such as tf-idf may also work. Multinomial distribution normally requires integer feature counts. The multinomial Naive Bayes classifier is suitable for classification withĭiscrete features (e.g., word counts for text classification). Naive Bayes classifier for multinomial models. MultinomialNB ( *, alpha = 1.0, fit_prior = True, class_prior = None ) ¶ Sklearn.naive_bayes.MultinomialNB ¶ class sklearn.naive_bayes.