Although G {\displaystyle G} and F {\displaystyle F} can be any space of functions, many learning algorithms are probabilistic models where g {\displaystyle g} takes the form of a conditional probability model g ( x ) = P ( y | x ) {\displaystyle g(x)=P(y|x)} , or f {\displaystyle f} takes the form of a joint probability model f ( x , y ) = P ( x , y ) {\displaystyle f(x,y)=P(x,y)} . For example, naive Bayes and linear discriminant analysis are joint probability models, whereas logistic regression is a conditional probability model.