08.06.2015 Views

Building Machine Learning Systems with Python - Richert, Coelho

Building Machine Learning Systems with Python - Richert, Coelho

Building Machine Learning Systems with Python - Richert, Coelho

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6<br />

This denotation "" leads to the following values:<br />

Now we have all the data to classify new tweets. The only work left is to parse the<br />

tweet and give features to it.<br />

Tweet Class probabilities Classification<br />

awesome 1 0 Positive<br />

crazy 0 1 Negative<br />

awesome<br />

crazy<br />

1 1 Positive<br />

awesome<br />

text<br />

0 0 Undefined,<br />

because we have<br />

never seen these<br />

words in this<br />

tweet before<br />

So far, so good. The classification of trivial tweets makes sense except for the last one,<br />

which results in a division by zero. How can we handle that?<br />

[ 123 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!