LO 7.2.3.C

Learning Objective: Calculate the prior probabilities of two classes, given a training set categorized into two categories.

Review:

Assume, we have five text documents and two classes: ‘+’/positive comment and ‘-’/negative comment. The class categorization of the five documents are described in the figure below.

The goal is to classify the text “predictable with no fun” either as ‘+’/positive comment or ‘-’/negative comment.

<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi><mfenced><mi>c</mi></mfenced><mo>=</mo><mfrac><mtext>Number&#xA0;of&#xA0;documents&#xA0;classified&#xA0;as&#xA0;class&#xA0;c</mtext><mtext>Number&#xA0;of&#xA0;documents</mtext></mfrac></math>

Thus, the priori probabilities of the class ‘positive comment’ and ‘negative comment’ are given by

<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi><mfenced><mtext>class&#xA0;+</mtext></mfenced><mo>=</mo><mfrac><mn>2</mn><mn>5</mn></mfrac></math>

<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi><mfenced><mtext>class&#xA0;-</mtext></mfenced><mo>=</mo><mfrac><mn>3</mn><mn>5</mn></mfrac></math>

Source: Assigned reading