Ignore:
Timestamp:
Mar 16, 2007, 8:30:02 PM (15 years ago)
Author:
Peter
Message:

Predict in NBC. Fixes #57

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/NBC.h

    r812 r813  
    8383   
    8484    /**
    85        For each sample, calculate the probabilities the sample belong
    86        to the corresponding class.
     85       Each sample (column) in \a data is predicted and predictions
     86       are returned in the corresponding column in passed \a res. Each
     87       row in \a res corresponds to a class. The prediction is the
     88       estimated probability that sample belong to class \f$ j \f$
     89
     90       \f$ P_j = \frac{1}{Z}\prod_i{\frac{1}{\sigma_i}}
     91       \exp(\frac{w_i(x_i-\mu_i)^2}{\sigma_i^2})\f$, where \f$ \mu_i
     92       \f$ and \f$ \sigma_i^2 \f$ are the estimated mean and variance,
     93       respectively. If \a data is a MatrixLookup is equivalent to
     94       using all weight equal to unity.
    8795    */
    8896    void predict(const DataLookup2D& data, utility::matrix& res) const;
Note: See TracChangeset for help on using the changeset viewer.