A book would be rated as positive rather than

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: that a book would be rated as positive rather than negative, where a user rating of 1 5 is interpreted as negative and 6 10 as positive. As described below, the exact numerical ratings of the training examples are used to weight the training examples when estimating the parameters of the model. Speci cally, we employ a multinomial text model 21 , in which a document is modeled as an ordered sequence of word events drawn from the same vocabulary, V . The naive Bayes" assumption states that the probability of each word event is dependent on the document class but independent of the word's context and position. For each class, cj , and word or token, wk 2 V , the probabilities, P cj  and P wk jcj  must be estimated from the training data. Then the posterior probability of each class given a document, D, is computed using Bayes rule:  P cj jD = P cj  P D Y P a jc  Dj j ij i=1 1 where ai is the ith word in the document, and jDj is the length of the document in words. Since for any given document, the prior P D is a constant, this factor can be ignored if all that is desired is a ranking rather than a probability estimate. A ranking is produced by sorting documents by their odds ratio, P c1 jD=P c0 jD, where c1 represents the positive class and c0 represents the negative class. An example is classi ed as positive if the odds are greater than 1, and negative otherwise. In our case, since books are represented as a vector of documents," dm , one for each slot where sm denotes the mth slot, the probability of each word given the category and the slot, P wk jcj ; sm , must be estimated and the posterior category probabilities for a book, B , computed using:  P cj jB  = P cj  P B Y Y P a S jdm j m=1 i=1 mi jcj ; sm  2 where S is the number of slots and ami is the ith word in the mth slot. Parameters are estimated from the training examples as follows. Each of the N training books, Be 1  e  N  is given two real weights, 0  ej  1, based on scaling it's user rating, r 1  r  10 : a positive weight, e1 = r , 1=9, and a negative weight e0 = 1 , e1 . If a word appears n times in an example Be , it is counted as occurring e1 n times in a positive example and e0 n times in a negative example. The model parameters are therefore estimated as follows: N P cj  = 3 ej =N X Xn P w jc ; s  = kj m N e=1 e=1 ej kem =Lcj ; sm  4 Slot WORDS WORDS WORDS WORDS SUBJECTS AUTHOR WORDS WORDS RELATED-TITLES RELATED-TITLES AUTHOR AUTHOR AUTHOR RELATED-AUTHORS RELATED-AUTHORS WORDS WORDS WORDS RELATED-TITLES RELATED-TITLES The Fabric of Reality: The Science of Parallel Universes- And Its Implications by David Deutsch recommended because: Word Strength ZUBRIN 9.85 SMOLIN 9.39 TREFIL 8.77 DOT 8.67 COMPARATIVE 8.39 8.04 D GOLDSMITH ALH 7.97 MANNED 7.97 SETTLE 7.91 CASE 7.91 R ZUBRIN 7.63 R WAGNER 7.63 H MORAVEC 7.63 B DIGREGORIO 7.63 A RADFORD 7.63 LEE 7.57 MORAVEC 7.57 WAGNER 7.57 CONNECTIONIST 7.51 BELOW 7.51 Slot WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS WORDS SUBJECTS TITLE WORDS WORDS Table 1: Sampl...
View Full Document

Ask a homework question - tutors are online