Topic from Data Science.

Data mining is about discovering patterns or more general information in large data sets using methods from artificial intelligence, machine learning, statistics, and database systems.

A bayesian approach uses a probabilistic model including prior knowledge. Another assumption is that the naive approach assumes that the conditional probabilities are individual of each other.

Will this person buy a computer?

AgeIncomeStudentCredit ratingBuys Computer
≤30highnofairno
≤30highnoexcellentno
31-40highnofairyes
>40mediumnofairyes
>40lowyesfairyes
>40lowyesexcellentno
31-40lowyesexcellentyes
≤30mediumnofairno
≤30lowyesfairyes
>40mediumyesfairyes
≤30mediumyesexcellentyes
31-40mediumnoexcellentyes
31-40highyesfairyes
>40mediumnoexcellentno
≤30mediumyesfair??
  • We have 14 people. At the bottom we know the characteristics, but not if they will buy a computer. We consider this table the training data. In this training data, only 9 people bought a computer, and we can divide them all into the 4 categories shown: age, income, student, credit rating

Age

AgeYesNoTotal
≤30235
31-40404
>40325
Total9514

Income

IncomeYesNoTotal
high224
medium426
low314
Total9514

Student

StudentYesNoTotal
No347
Yes617
Total9514

Credit Rating

Credit RatingYesNoTotal
fair628
excellent336
Total9514

Recall Bayes’ Theorem:

So we have to compute:

  • We know
  • Applying the Naive Bayes approach, predictors are conditionally independent given the class:
  • The denominator, i.e. the total probability of observing this combination of characteristics, is calculated using the law of total probability:
  • Denominator equals to:

Thus: