Changeset 1152 for trunk/yat/classifier


Ignore:
Timestamp:
Feb 26, 2008, 12:31:46 AM (16 years ago)
Author:
Peter
Message:

some docs for NBC, note docs that not yet match implementation refs #335

File:
1 edited

Legend:

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

    r1144 r1152  
    4040
    4141  /**
    42      @brief Naive Bayesian Classification.
     42     @brief Naive Bayesian Classifier.
    4343 
    4444     Each class is modelled as a multinormal distribution with
     
    5252  public:
    5353    ///
    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.
    5655    ///
    5756    NBC(const MatrixLookup&, const Target&);
     
    9190       estimated probability that sample belong to class \f$ j \f$
    9291
    93        \f$ P_j = \frac{1}{Z}\prod_i{\frac{1}{\sigma_i}}
     92       \f$ P_j = \frac{1}{Z}\prod_i{\frac{1}{\sqrt{2\pi\sigma_i^2}}}
    9493       \exp(\frac{w_i(x_i-\mu_i)^2}{\sigma_i^2})\f$, where \f$ \mu_i
    9594       \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.
    98101    */
    99102    void predict(const DataLookup2D& data, utility::Matrix& res) const;
Note: See TracChangeset for help on using the changeset viewer.