# Changeset 1152 for trunk/yat/classifier

Ignore:
Timestamp:
Feb 26, 2008, 12:31:46 AM (16 years ago)
Message:

some docs for NBC, note docs that not yet match implementation refs #335

File:
1 edited

### Legend:

Unmodified
 r1144 /** @brief Naive Bayesian Classification. @brief Naive Bayesian Classifier. Each class is modelled as a multinormal distribution with public: /// /// Constructor taking the training data, the target vector, and /// the distance measure as input. /// Constructor taking the training data, the target vector. /// NBC(const MatrixLookup&, const Target&); estimated probability that sample belong to class \f$j \f$ \f$P_j = \frac{1}{Z}\prod_i{\frac{1}{\sigma_i}} \f$ P_j = \frac{1}{Z}\prod_i{\frac{1}{\sqrt{2\pi\sigma_i^2}}} \exp(\frac{w_i(x_i-\mu_i)^2}{\sigma_i^2})\f$, where \f$ \mu_i \f$and \f$ \sigma_i^2 \f$are the estimated mean and variance, respectively. If \a data is a MatrixLookup is equivalent to using all weight equal to unity. respectively. If a \f$ \sigma_i \f$could not be estimated during training, corresponding factor is set to unity, in other words, that feature is ignored for the prediction of that particular class. Z is chosen such that total probability, \f$ \sum P_j \f\$, equals unity. If \a data is a MatrixLookup is equivalent to using all weight equal to unity. */ void predict(const DataLookup2D& data, utility::Matrix& res) const;