 14 Jul 2020
 1 Minute to read

Print

DarkLight

PDF
Bayesian Inference
 Updated on 14 Jul 2020
 1 Minute to read

Print

DarkLight

PDF
Bayesian inference is the core of Aito's machine learning functions. It is a method of statistical inference in which the Bayes' theorem is used to update the probability for a hypothesis as more evidence and information becomes available. This method can be described by the following formula:
In which:
 H  Any hypothesis whose probability may be affected by the data (called evidence below)
 E  Evidence or known data.
 P(HE)  The posterior probability, is the estimated probability of a hypothesis given the observed evidence.
 P(EH)  The likelihood, is the estimated probability of observing evidence E given the hypothesis H is true.
 P(H)  The prior probability, is the estimated probability of the hypothesis H before the evidence E is observed.
 P(E)  The marginal likelihood, is the estimated probability that the evidence E is true.
Let's take a look at an example: Predict the genre of a game given its description . Given the game "Cities:Skylines" description: "Cities: Skylines is a citybuilding game developed by Colossal Order and published by Paradox Interactive. Players engage in urban planning by controlling zoning, road placement, taxation, public services, and public transportation of an area". This will be the evidence. There are 5 available genres: "Action", "Fighting", "Puzzle", "Simulation", and "Strategy". These are the hypotheses. We can use Bayesian Inference to solve our problem by finding the probability of each genre given the description evidence. For example, with the "Action" genre:
In Aito, the likelihood P("Cities:Skylines..."  Action)
is estimated by breaking down the description into features and Aito uses these features as multiple pieces of evidence for the inference.
The Bayesian statement can be translated to an Aito query by the following formula:
EVIDENCE => PROPOSITION
HYPOTHESIS => Target of an operation
For instance, we can ask Aito to solve the predicting genre problem by using the MATCH API, asuming that we have a game data table with field description and genre :
{
"from": "game_data",
"where": {
"description": {
"$match": "Cities: Skylines is a citybuilding game developed by Colossal Order and published by Paradox Interactive. Players engage in urban planning by controlling zoning, road placement, taxation, public services, and public transportation of an area"
}
},
"match": "genre"
}