Basic Machine Learning Algorithms - Part Two: The Bayes Classifier

2023-03-27

In part two of this series, we explore the practical applications of the Naive Bayes algorithm as a classifier, comparing it to the system used by email services to detect spam. The Bayes classifier is a process of aggregating multiple observations into a single, final probability. In this article, we use the Bayes classifier to distinguish sentences from two of the authors favourite books - War of the Worlds by H. G. Wells or Journey to the Centre of the Earth by Jules Verne. The article provides an overview of the requirements to run Bayes algorithm, including the probability of word given book, probability of a given word across both books and the probability of it being a given book. The article concludes by showing how to calculate the revised overall probability of p(book) word by word, using Bayes algorithm. Thanks to Gary Short for his advice on Machine Learning theory for this article.

Link [ http://www.thecodepainter.co.uk/blog/20230322/machinelearning-02-bayesclassifier.html ]

Previous Article

Basic Machine Learning Algorithms - Part Two: The Bayes Classifier

2023-03-27

In part two of this series, we explore the practical applications of the Naive Bayes algorithm as a classifier, comparing it to the system used by email services to detect spam. The Bayes classifier is a process of aggregating multiple observations into a single, final probability. In this article, we use the Bayes classifier to distinguish sentences from two of the authors favourite books - War of the Worlds by H. G. Wells or Journey to the Centre of the Earth by Jules Verne. The article provides an overview of the requirements to run Bayes algorithm, including the probability of word given book, probability of a given word across both books and the probability of it being a given book. The article concludes by showing how to calculate the revised overall probability of p(book) word by word, using Bayes algorithm. Thanks to Gary Short for his advice on Machine Learning theory for this article.

Link [ http://www.thecodepainter.co.uk/blog/20230322/machinelearning-02-bayesclassifier.html ]

Copyright © 2024 All rights reserved

Rss

Atom