# Changeset 1182

Ignore:
Timestamp:
Feb 28, 2008, 1:27:37 PM (13 years ago)
Message:

working on #335. Fixed weighted test data case. Left to fix is when there are missing features in training in other words what should happen when complete training cannot be done because lack of data. The current behavior is probably not optimal, but have to look into it in more detail.

Location:
trunk/yat/classifier
Files:
2 edited

### Legend:

Unmodified
 r1169 row in \a res corresponds to a class. The prediction is the estimated probability that sample belong to class \f$j \f$ \f$P_j = \frac{1}{Z}\prod_i$${\frac{1}{\sqrt{2\pi\sigma_i^2}}}$$ \exp(\frac{\sum{w_i(x_i-\mu_i)^2}{\sigma_i^2}}{\sum w_i})\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 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. */ void predict(const MatrixLookupWeighted& data, utility::Matrix& res) const;