A brain-computer interface (BCI) is a communication system, that implements the principle of "think and make it happen without any physical effort". This means a BCI allows a user to act on his environment only by using his thoughts, without using peripheral nerves and muscles. Nearly all BCIs contain as a core part a machine learning algorithm that is used to discriminate different brain activities. In the present work we use a bayesian framework for machine learning, the evidence framework, to develop a variant of linear discriminant analysis for the use in a BCI based on electroencephalographic measurements (EEG). Properties of the resulting algorithm are: a) a continuous probabilistic output is given, b) fast estimation of regularization constants, and c) the possibility to select among different feature sets, the one which is most promising for classification. The algorithm has been tested on one dataset from the BCI competition 2002 and two datasets from the BCI competitions 2003 and provides a classification-accuracy of 95%, 81%, and 79% respectively.