docs: fix documentation of naive bayes structs

This commit is contained in:
Luis Moreno
2021-06-05 00:25:34 -04:00
parent 1208051fb5
commit 763a8370eb
3 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -249,7 +249,8 @@ impl<T: RealNumber> BernoulliNBDistribution<T> {
} }
} }
/// BernoulliNB implements the categorical naive Bayes algorithm for categorically distributed data. /// BernoulliNB implements the naive Bayes algorithm for data that follows the Bernoulli
/// distribution.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub struct BernoulliNB<T: RealNumber, M: Matrix<T>> { pub struct BernoulliNB<T: RealNumber, M: Matrix<T>> {
+3 -2
View File
@@ -33,7 +33,7 @@ use crate::naive_bayes::{BaseNaiveBayes, NBDistribution};
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
/// Naive Bayes classifier for categorical features /// Naive Bayes classifier using Gaussian distribution
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
struct GaussianNBDistribution<T: RealNumber> { struct GaussianNBDistribution<T: RealNumber> {
@@ -179,7 +179,8 @@ impl<T: RealNumber> GaussianNBDistribution<T> {
} }
} }
/// GaussianNB implements the categorical naive Bayes algorithm for categorically distributed data. /// GaussianNB implements the naive Bayes algorithm for data that follows the Gaussian
/// distribution.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub struct GaussianNB<T: RealNumber, M: Matrix<T>> { pub struct GaussianNB<T: RealNumber, M: Matrix<T>> {
+1 -1
View File
@@ -212,7 +212,7 @@ impl<T: RealNumber> MultinomialNBDistribution<T> {
} }
} }
/// MultinomialNB implements the categorical naive Bayes algorithm for categorically distributed data. /// MultinomialNB implements the naive Bayes algorithm for multinomially distributed data.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub struct MultinomialNB<T: RealNumber, M: Matrix<T>> { pub struct MultinomialNB<T: RealNumber, M: Matrix<T>> {