8000 removed extra whitespace and scipy.sparse.issparse (never used) from … · scikit-learn/scikit-learn@0ed036b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ed036b

Browse files
committed
removed extra whitespace and scipy.sparse.issparse (never used) from naive_bayes.py
1 parent 7c54edc commit 0ed036b

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

sklearn/naive_bayes.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222

2323
import numpy as np
24-
from scipy.sparse import issparse
2524

2625
from .base import BaseEstimator, ClassifierMixin
2726
from .preprocessing import binarize
@@ -141,7 +140,7 @@ class GaussianNB(BaseNB):
141140
----------
142141
class_count_ : array, shape (n_classes,)
143142
number of training samples observed in each class.
144-
143+
145144
class_prior_ : array, shape (n_classes,)
146145
probability of each class.
147146
@@ -150,10 +149,10 @@ class labels known to the classifier
150149
151150
epsilon_ : float
152151
absolute additive value to variances
153-
152+
154153
sigma_ : array, shape (n_classes, n_features)
155154
variance of each feature per class
156-
155+
157156
theta_ : array, shape (n_classes, n_features)
158157
mean of each feature per class
159158
@@ -699,7 +698,7 @@ class MultinomialNB(BaseDiscreteNB):
699698
coef_ : array, shape (n_classes, n_features)
700699
Mirrors ``feature_log_prob_`` for interpreting MultinomialNB
701700
as a linear model.
702-
701+
703702
feature_count_ : array, shape (n_classes, n_features)
704703
Number of samples encountered for each (class, feature)
705704
during fitting. This value is weighted by the sample weight when
@@ -712,7 +711,7 @@ class MultinomialNB(BaseDiscreteNB):
712711
intercept_ : array, shape (n_classes, )
713712
Mirrors ``class_log_prior_`` for interpreting MultinomialNB
714713
as a linear model.
715-
714+
716715
n_features_ : int
717716
Number of features of each sample.
718717
@@ -806,14 +805,14 @@ class ComplementNB(BaseDiscreteNB):
806805
class_log_prior_ : array, shape (n_classes, )
807806
Smoothed empirical log probability for each class. Only used in edge
808807
case with a single class in the training set.
809-
808+
810809
classes_ : array, shape (n_classes,)
811810
Class labels known to the classifier
812-
811+
813812
feature_all_ : array, shape (n_features,)
814813
Number of samples encountered for each feature during fitting. This
815814
value is weighted by the sample weight when provided.
816-
815+
817816
feature_count_ : array, shape (n_classes, n_features)
818817
Number of samples encountered for each (class, feature) during fitting.
819818
This value is weighted by the sample weight when provided.
@@ -822,7 +821,7 @@ class ComplementNB(BaseDiscreteNB):
822821
Empirical weights for class complements.
823822
824823
n_features_ : int
825-
Number of features of each sample.
824+
Number of features of each sample.
826825
827826
Examples
828827
--------
@@ -914,18 +913,18 @@ class BernoulliNB(BaseDiscreteNB):
914913
class_count_ : array, shape = [n_classes]
915914
Number of samples encountered for each class during fitting. This
916915
value is weighted by the sample weight when provided.
917-
916+
918917
class_log_prior_ : array, shape = [n_classes]
919918
Log probability of each class (smoothed).
920919
921920
classes_ : array, shape (n_classes,)
922921
Class labels known to the classifier
923-
922+
924923
feature_count_ : array, shape = [n_classes, n_features]
925924
Number of samples encountered for each (class, feature)
926925
during fitting. This value is weighted by the sample weight when
927926
provided.
928-
927+
929928
feature_log_prob_ : array, shape = [n_classes, n_features]
930929
Empirical log probability of features given a class, P(x_i|y).
931930
@@ -1043,18 +1042,18 @@ class CategoricalNB(BaseDiscreteNB):
10431042
class_count_ : array, shape (n_classes,)
10441043
Number of samples encountered for each class during fitting. This
10451044
value is weighted by the sample weight when provided.
1046-
1045+
10471046
class_log_prior_ : array, shape (n_classes, )
10481047
Smoothed empirical log probability for each class.
10491048
10501049
classes_ : array, shape (n_classes,)
10511050
Class labels known to the classifier
1052-
1051+
10531052
feature_log_prob_ : list of arrays, len n_features
10541053
Holds arrays of shape (n_classes, n_categories of respective feature)
10551054
for each feature. Each array provides the empirical log probability
10561055
of categories given the respective feature and class, ``P(x_i|y)``.
1057-
1056+
10581057
n_features_ : int
10591058
Number of features of each sample.
10601059

0 commit comments

Comments
 (0)
0