# Changeset 1169 for trunk/yat/classifier/NBC.h

Ignore:
Timestamp:
Feb 26, 2008, 11:09:04 PM (14 years ago)
Message:

refs #343 moving data to inherited classes and using SmartPtr?.

File:
1 edited

### Legend:

Unmodified
 r1160 \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 \exp(\frac{(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 \f$\sigma_i \f$ could not be estimated 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. \sum P_j \f$, equals unity. */ void predict(const MatrixLookup& data, utility::Matrix& res) const; /** @see above Each sample (column) in \a data is predicted and predictions are returned in the corresponding column in passed \a res. Each row in \a res corresponds to a class. The prediction is the estimated probability that sample belong to class \f$ j \f\$ */ void predict(const MatrixLookupWeighted& data, utility::Matrix& res) const;