A machine learning system to rank data within sets is disclosed. The
system comprises a ranking module that has differentiable parameters. The
system further comprises a cost calculation module that uses a cost
function that depends on pairs of examples and which describes an output
of the ranking module. Methods of using the disclosed system are also
provided.