concept Bayes in category machine learning

This is an excerpt from Manning's book Grokking Machine Learning.
However, if we are given information, we can make a better estimation of the probability. If I tell you, for example, that we are in Canada, then the probability that it will snow today increases. If I were to tell you that we are in Jamaica, this probability decreases drastically. Bayes theorem helps us calculate these new probabilities, once we know more about the situation.
However, when we have a lot of information, the math becomes complicated. If I were to ask you the probability that it will snow today given the following: we are in Canada, it is February, the temperature is -10 degrees Celsius, and the humidity is 30%, then you would assume that the probability of snow is quite high, but exactly how high? Bayes theorem has a hard time dealing with so much information. But there is a very simple trick we can use, which makes the calculation much easier. The trick relies on making an assumption that is not necessarily true, but that works pretty well in practice and simplifies our life quite a lot. This assumption is the heart of the naive Bayes algorithm.
In this chapter, I will show you Bayes theorem with some real life examples. We’ll start by studying an interesting and slightly surprising medical example. Then we’ll dive deep into the naive Bayes algorithm by applying it to a very common problem in machine learning: spam classification. We’ll finalize by coding the algorithm in Python, and using it to make predictions in a real spam email dataset.