"Dawn Pass number ==> machine learning Express" model article 05--naive Bayesian "Naive Bayes" (with Python code)

Source: Internet
Author: User

directory prior probability and posterior probability what is the three basic elements of naive Bayesian model construction of KD tree kd tree nearest neighbor search kd Tree k nearest Neighbor Search Python code (Sklearn Library)

prior probability and posteriori probability

what K-nearest neighbor algorithm (k-nearest neighbor,knn)

  Cited examples

There is a training set that contains 100 instances, the properties are skin color (black, white, yellow), marker is region (Asian, African, North American). In the training set there were 30 Africans (28 blacks), 50 Asians (1 blacks), 20 North American (5 blacks). Please train a Bayesian model.

When a negro outside the training set reports, how do we judge his region? The naïve Bayesian classifier predicts that his hometown is African, with the principle that "blacks in Africa are higher in proportion than in other states". The naïve Bayesian model will divide the instance into the class with the greatest posteriori probability.

Baidu Encyclopedia definition  

The proximity algorithm, or K nearest neighbor (Knn,k-nearestneighbor) classification algorithm, is one of the simplest methods in data mining classification technology. The so-called K nearest neighbor is the meaning of K's closest neighbour, saying that each sample can be represented by its nearest K-neighbor.
The core idea of the KNN algorithm is that if the majority of the k nearest samples in a feature space belong to a category, the sample also falls into this category and has the characteristics of the sample on this category. This method determines the category to which the sample is to be divided, depending on the category of one or more adjacent samples in determining the classification decision. The KNN method is only associated with a very small number of adjacent samples when deciding on a class. The KNN method is more suitable than other methods because the KNN method mainly relies on the surrounding finite sample, rather than the Discriminant class domain method to determine the category of the class.

"Dawn Pass number ==> machine learning Express" model article 05--naive Bayesian "Naive Bayes" (with Python code)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.