A unified model for the sparse optimal scoring problem