美文网首页
[Stay Sharp]Naive Bayes Algorith

[Stay Sharp]Naive Bayes Algorith

作者: 三千雨点 | 来源:发表于2018-12-28 22:01 被阅读3次

    The Naive Bayes Algorithm

    P \left( Y = c _ { k } | X = x \right) = \frac { P \left( Y = c _ { k } \right) \prod _ { j } P \left( X ^ { ( j ) } = x ^ { ( j ) } | Y = c _ { k } \right) } { \sum _ { k } P \left( Y = c _ { k } \right) \prod _ { j } P \left( X ^ { ( j ) } = x ^ { ( j ) } | Y = c _ { k } \right) }
    Note: the features of input are independent to each other.

    The algorithm is based on the Bayes Theorem.

    image.png

    The Naive Bayes Classifier

    A Naive Bayes Classifier use the algorithm to predict a output class value according to a set of set of attributes.

    For loop [each know class value] {
        step 1. calculate probabilities of each attribute under the condition of class value.
        step 2. get the joint conditional probability of all the attributes of the input.
        step 3. calculate the conditional probabilities of the class value.
    }
    The class with the highest conditional probability wins.
    

    相关文章

      网友评论

          本文标题:[Stay Sharp]Naive Bayes Algorith

          本文链接:https://www.haomeiwen.com/subject/fbhylqtx.html