General framework for binary classification on top samples. (3rd September 2022)