Comprendre les méthodes bayésiennes

Apprentissage supervisé en R : Classification

Brett Lantz

Instructor

Estimer une probabilité

Carte des emplacements

La probabilité de A se note P(A)

  • P(work) = 23 / 40 = 57,5 %
  • P(store) = 4 / 40 = 10,0 %
Apprentissage supervisé en R : Classification

Probabilité conjointe et événements indépendants

Diagrammes de Venn

La probabilité conjointe des événements A et B se note P(A et B)

  • P(work et evening) = 1 %
  • P(work et afternoon) = 20 %
Apprentissage supervisé en R : Classification

Probabilité conditionnelle et événements dépendants

Diagrammes de Venn

La probabilité conditionnelle de A sachant B se note P(A | B)

  • P(A | B) = P(A et B) / P(B)
  • P(work | evening) = 1 / 25 = 4 %
  • P(work | afternoon) = 20 / 25 = 80 %
Apprentissage supervisé en R : Classification

Prédire avec Naive Bayes

# building a Naive Bayes model
library(naivebayes)
m <- naive_bayes(location ~ time_of_day, data = location_history)
# making predictions with Naive Bayes
future_location <- predict(m, future_conditions)
Apprentissage supervisé en R : Classification

Passons à la pratique !

Apprentissage supervisé en R : Classification

Preparing Video For Download...