Random Variables · Likelihood and Parameter Fitting

Lesson 1

Nikolai Chukhin · Alexander S. Kulikov

The previous lesson describes what a probabilistic classifier or a language model should output: a conditional distribution. But how can such a distribution be learned from data?

Suppose we choose a family of conditional distributions \[p(y \mid x,\theta),\] where \(\theta \in \Theta \subseteq \mathbb{R}^{k}\) is a vector of parameters. For fixed \(x\) and \(\theta\), the function \(y \mapsto p(y \mid x,\theta)\) is a probability mass function. The parameter \(\theta\) is the part of the model that the learning algorithm is allowed to change.

For example, in a classifier, \(x\) may be the text of an email and \(y\) may be the label \(\texttt{spam}\) or \(\texttt{not spam}\). In a language model, \(x\) may be a prefix of a sentence and \(y\) may be the next token.