The problem of two hypothesis testing using Bayesian criterion is considered. In contrast to the standard problem with known conditional distributions of classes and their prior probabilities, the adaptive (or unsupervised) version of the problem is studied where one of the conditional distributions is totally unknown and prior probabilities of hypotheses are unknown also. Observations are available from a mixed distribution only. A decision rule with empirical risk tending to the optimal risk calculated from the complete statistical information is proposed. This decision rule is constructed using methods of kernel non-parametric statistics. The simulation results are given.