Changeset 1152
 Timestamp:
 Feb 26, 2008, 12:31:46 AM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/classifier/NBC.h
r1144 r1152 40 40 41 41 /** 42 @brief Naive Bayesian Classifi cation.42 @brief Naive Bayesian Classifier. 43 43 44 44 Each class is modelled as a multinormal distribution with … … 52 52 public: 53 53 /// 54 /// Constructor taking the training data, the target vector, and 55 /// the distance measure as input. 54 /// Constructor taking the training data, the target vector. 56 55 /// 57 56 NBC(const MatrixLookup&, const Target&); … … 91 90 estimated probability that sample belong to class \f$ j \f$ 92 91 93 \f$ P_j = \frac{1}{Z}\prod_i{\frac{1}{\s igma_i}}92 \f$ P_j = \frac{1}{Z}\prod_i{\frac{1}{\sqrt{2\pi\sigma_i^2}}} 94 93 \exp(\frac{w_i(x_i\mu_i)^2}{\sigma_i^2})\f$, where \f$ \mu_i 95 94 \f$ and \f$ \sigma_i^2 \f$ are the estimated mean and variance, 96 respectively. If \a data is a MatrixLookup is equivalent to 97 using all weight equal to unity. 95 respectively. If a \f$ \sigma_i \f$ could not be estimated 96 during training, corresponding factor is set to unity, in other 97 words, that feature is ignored for the prediction of that 98 particular class. Z is chosen such that total probability, \f$ 99 \sum P_j \f$, equals unity. If \a data is a MatrixLookup is 100 equivalent to using all weight equal to unity. 98 101 */ 99 102 void predict(const DataLookup2D& data, utility::Matrix& res) const;
Note: See TracChangeset
for help on using the changeset viewer.