DOC coef_ and intercept_ documentation for ComplementNB#17722
DOC coef_ and intercept_ documentation for ComplementNB#17722glemaitre merged 3 commits intoscikit-learn:masterfrom
Conversation
sklearn/naive_bayes.py
Outdated
| feature_log_prob_ : ndarray of shape (n_classes, n_features) | ||
| Empirical weights for class complements. | ||
|
|
||
| intercept_ : ndarray of shape (n_classes, ) |
There was a problem hiding this comment.
| intercept_ : ndarray of shape (n_classes, ) | |
| intercept_ : ndarray of shape (n_classes,) |
sklearn/naive_bayes.py
Outdated
| Empirical weights for class complements. | ||
|
|
||
| intercept_ : ndarray of shape (n_classes, ) | ||
| Mirrors ``class_log_prior_`` for interpreting ComplementNB |
There was a problem hiding this comment.
| Mirrors ``class_log_prior_`` for interpreting ComplementNB | |
| Mirrors ``class_log_prior_`` for interpreting `ComplementNB` |
sklearn/naive_bayes.py
Outdated
| Class labels known to the classifier | ||
|
|
||
| coef_ : ndarray of shape (n_classes, n_features) | ||
| Mirrors ``feature_log_prob_`` for interpreting ComplementNB |
There was a problem hiding this comment.
| Mirrors ``feature_log_prob_`` for interpreting ComplementNB | |
| Mirrors ``feature_log_prob_`` for interpreting `ComplementNB` |
|
@adrinjalali @agramfort did we deprecate |
|
They didn't seem to be deprecated here when I checked, are they supposed to be? |
|
@adrinjalali I found the PR :) |
|
Anyway it does not change anything since the deprecation did not take place yet. We need first to introduce it in this PR and the other PR will properly deprecate it. |
|
I made the suggested changes and applied them to the class |
|
Good it makes sense. |
| Mirrors ``feature_log_prob_`` for interpreting `MultinomialNB` | ||
| as a linear model. |
There was a problem hiding this comment.
Maybe a bit redundant. What about:
| Mirrors ``feature_log_prob_`` for interpreting `MultinomialNB` | |
| as a linear model. | |
| Mirrors ``feature_log_prob_`` for interpreting as a linear model. |
There was a problem hiding this comment.
that would seem a bit strange of a sentence to me though
There was a problem hiding this comment.
Yep, you are right. Something seems missed in the previous sentence.
Another possibility could be:
| Mirrors ``feature_log_prob_`` for interpreting `MultinomialNB` | |
| as a linear model. | |
| Mirrors ``feature_log_prob_`` for interpreting this estimator | |
| as a linear model. |
Nevertheless, the original sentence LGTM otherwise.
There was a problem hiding this comment.
I think it's fine as it is since I did a copy-paste from another class.
Reference Issues/PRs
references #14312
What does this implement/fix? Explain your changes.
Documents the attributes coef_ and intercept_ in class ComplementNB.
Any other comments?
The documentation of the attributes coef_ and intercept_ is almost identical to the documentation of these attributes in MultinomialNB.
ping @adrinjalali