@@ -139,26 +139,23 @@ class GaussianNB(BaseNB):
139
139
140
140
Attributes
141
141
----------
142
- class_prior_ : array, shape (n_classes,)
143
- probability of each class.
144
-
145
142
class_count_ : array, shape (n_classes,)
146
143
number of training samples observed in each class.
144
+
145
+ class_prior_ : array, shape (n_classes,)
146
+ probability of each class.
147
147
148
148
classes_ : array, shape (n_classes,)
149
149
class labels known to the classifier
150
150
151
- theta_ : array, shape (n_classes, n_features)
152
- mean of each feature per class
153
-
154
- sigma_ : array, shape (n_classes, n_features)
155
- variance of each feature per class
156
-
157
151
epsilon_ : float
158
152
absolute additive value to variances
159
-
160
- classes_ : array-like, shape (n_classes,)
161
- Unique class labels.
153
+
154
+ sigma_ : array, shape (n_classes, n_features)
155
+ variance of each f
8000
eature per class
156
+
157
+ theta_ : array, shape (n_classes, n_features)
158
+ mean of each feature per class
162
159
163
160
Examples
164
161
--------
@@ -689,38 +686,36 @@ class MultinomialNB(BaseDiscreteNB):
689
686
690
687
Attributes
691
688
----------
692
- class_log_prior_ : array, shape (n_classes, )
693
- Smoothed empirical log probability for each class.
694
-
695
- intercept_ : array, shape (n_classes, )
696
- Mirrors ``class_log_prior_`` for interpreting MultinomialNB
697
- as a linear model.
698
-
699
- feature_log_prob_ : array, shape (n_classes, n_features)
700
- Empirical log probability of features
701
- given a class, ``P(x_i|y)``.
702
-
703
- coef_ : array, shape (n_classes, n_features)
704
- Mirrors ``feature_log_prob_`` for interpreting MultinomialNB
705
- as a linear model.
706
-
707
689
class_count_ : array, shape (n_classes,)
708
690
Number of samples encountered for each class during fitting. This
709
691
value is weighted by the sample weight when provided.
710
692
693
+ class_log_prior_ : array, shape (n_classes, )
694
+ Smoothed empirical log probability for each class.
695
+
711
696
classes_ : array, shape (n_classes,)
712
697
Class labels known to the classifier
713
698
699
+ coef_ : array, shape (n_classes, n_features)
700
+ Mirrors ``feature_log_prob_`` for interpreting MultinomialNB
701
+ as a linear model.
702
+
714
703
feature_count_ : array, shape (n_classes, n_features)
715
704
Number of samples encountered for each (class, feature)
716
705
during fitting. This value is weighted by the sample weight when
717
706
provided.
718
707
708
+ feature_log_prob_ : array, shape (n_classes, n_features)
709
+ Empirical log probability of features
710
+ given a class, ``P(x_i|y)``.
711
+
712
+ intercept_ : array, shape (n_classes, )
713
+ Mirrors ``class_log_prior_`` for interpreting MultinomialNB
714
+ as a linear model.
715
+
719
716
n_features_ : int
720
717
Number of features of each sample.
721
718
722
- classes_ : array-like, shape (n_classes,)
723
- Unique class labels.
724
719
725
720
Examples
726
721
--------
@@ -804,33 +799,30 @@ class ComplementNB(BaseDiscreteNB):
804
799
805
800
Attributes
806
801
----------
807
- class_log_prior_ : array, shape (n_classes, )
808
- Smoothed empirical log probability for each class. Only used in edge
809
- case with a single class in the training set.
810
-
811
- feature_log_prob_ : array, shape (n_classes, n_features)
812
- Empirical weights for class complements.
813
-
814
802
class_count_ : array, shape (n_classes,)
815
803
Number of samples encountered for each class during fitting. This
816
804
value is weighted by the sample weight when provided.
817
805
806
+ class_log_prior_ : array, shape (n_classes, )
807
+ Smoothed empirical log probability for each class. Only used in edge
808
+ case with a single class in the training set.
809
+
818
810
classes_ : array, shape (n_classes,)
819
811
Class labels known to the classifier
820
-
812
+
813
+ feature_all_ : array, shape (n_features,)
814
+ Number of samples encountered for each feature during fitting. This
815
+ value is weighted by the sample weight when provided.
816
+
821
817
feature_count_ : array, shape (n_classes, n_features)
822
818
Number of samples encountered for each (class, feature) during fitting.
823
819
This value is weighted by the sample weight when provided.
824
820
825
- n_features_ : int
826
- Number of features of each sample.
827
-
828
- feature_all_ : array, shape (n_features,)
829
- Number of samples encountered for each feature during fitting. This
830
- value is weighted by the sample weight when provided.
821
+ feature_log_prob_ : array, shape (n_classes, n_features)
822
+ Empirical weights for class complements.
831
823
832
- classes_ : array of shape (n_classes,)
833
- The classes labels.
824
+ n_features_ : int
825
+ Number of features of each sample.
834
826
835
827
Examples
836
828
--------
@@ -919,29 +911,27 @@ class BernoulliNB(BaseDiscreteNB):
919
911
920
912
Attributes
921
913
----------
922
- class_log_prior_ : array, shape = [n_classes]
923
- Log probability of each class (smoothed).
924
-
925
- feature_log_prob_ : array, shape = [n_classes, n_features]
926
- Empirical log probability of features given a class, P(x_i|y).
927
-
928
914
class_count_ : array, shape = [n_classes]
929
915
Number of samples encountered for each class during fitting. This
930
916
value is weighted by the sample weight when provided.
917
+
918
+ class_log_prior_ : array, shape = [n_classes]
919
+ Log probability of each class (smoothed).
931
920
932
921
classes_ : array, shape (n_classes,)
933
922
Class labels known to the classifier
934
-
923
+
935
924
feature_count_ : array, shape = [n_classes, n_features]
936
925
Number of samples encountered for each (class, feature)
937
926
during fitting. This value is weighted by the sample weight when
938
927
provided.
928
+
929
+ feature_log_prob_ : array, shape = [n_classes, n_features]
930
+ Empirical log probability of features given a class, P(x_i|y).
939
931
940
932
n_features_ : int
941
933
Number of features of each sample.
942
934
943
- classes_ : array of shape (n_classes,)
944
- The classes labels.
945
935
946
936
Examples
947
937
--------
@@ -1045,23 +1035,26 @@ class CategoricalNB(BaseDiscreteNB):
1045
1035
1046
1036
Attributes
1047
1037
----------
1048
- class_log_prior_ : array, shape (n_classes, )
1049
- Smoothed empirical log probability for each class.
1050
-
1051
- feature_log_prob_ : list of arrays, len n_features
1038
+ category_count_ : list of arrays, len n_features
1052
1039
Holds arrays of shape (n_classes, n_categories of respective feature)
1053
- for each feature. Each array provides the empirical log probability
1054
- of categories given the respective feature and class, ``P(x_i|y)`` .
1040
+ for each feature. Each array provides the number of samples
1041
+ encountered for each class and category of the specific feature .
1055
1042
1056
1043
class_count_ : array, shape (n_classes,)
1057
1044
Number of samples encountered for each class during fitting. This
1058
1045
value is weighted by the sample weight when provided.
1046
+
1047
+ class_log_prior_ : array, shape (n_classes, )
1048
+ Smoothed empirical log probability for each class.
1059
1049
1060
- category_count_ : list of arrays, len n_features
1050
+ classes_ : array, shape (n_classes,)
1051
+ Class labels known to the classifier
1052
+
1053
+ feature_log_prob_ : list of arrays, len n_features
1061
1054
Holds arrays of shape (n_classes, n_categories of respective feature)
1062
- for each feature. Each array provides the number of samples
1063
- encountered for each class and category of the specific feature .
1064
-
1055
+ for each feature. Each array provides the empirical log probability
1056
+ of categories given the respective feature and class, ``P(x_i|y)`` .
1057
+
1065
1058
n_features_ : int
1066
1059
Number of features of each sample.
1067
1060
0 commit comments