Changeset 767 for trunk/yat/classifier/NBC.h
 Timestamp:
 Feb 22, 2007, 4:14:40 PM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/classifier/NBC.h
r722 r767 38 38 class Target; 39 39 40 /// 41 /// @brief Naive Bayesian Classification. 42 /// 40 /** 41 @brief Naive Bayesian Classification. 42 43 Each class is modelled as a multinormal distribution with 44 features being independent: \f$ p(xc) = \prod 45 \frac{1}{\sqrt{2\pi\sigma_i^2}} \exp \left( 46 \frac{(x_im_i)^2}{2\sigma_i^2)} \right)\f$ 47 */ 43 48 class NBC : public SupervisedClassifier 44 49 { … … 69 74 /// Train the classifier using the training data. 70 75 /// 76 /// For each class mean and variance are estimated for each 77 /// feature (see Averager and AveragerWeighted for details). 78 /// 71 79 /// @return true if training succedeed. 72 80 /// … … 78 86 /// to the corresponding class. 79 87 /// 80 void predict(const DataLookup2D& , utility::matrix&) const;88 void predict(const DataLookup2D& data, utility::matrix& res) const; 81 89 82 90 83 91 private: 92 double gaussian(double x, double m, double sigma) const; 93 84 94 utility::matrix centroids_; 85 95 utility::matrix sigma_;
Note: See TracChangeset
for help on using the changeset viewer.