We propose a method for estimating the posterior probability of a class at a given point by approximating a discriminant function
that takes a zero value at this point. The approximation is based on a supervised training set. Posterior probabilities of classes
allow the classification problem to be solved simultaneously for different criteria and different costs of classification errors. The
method is based on choosing such a ratio of the costs of classification errors in the construction of an approximation to the
discriminant function that the approximation takes the zero value at a given point. We give a model example and an example
with real data from the field of medical diagnostics.