# Machine learning algorithm for ranking

I have got a set of elements $X$ which I can describe according to $n$ characteristics. Thus:

$$x_i: \{c_{i1}, c_{i2}, \ldots, c_{in}\} \mid x_i \in X$$

where $c_{ij}$ is the (numerical) evaluation for element $i$ according to the characteristics $j$. So my elements can be viewed as points in a $n$ dimension space.

According to my readings, there exists algorithms like the "Bayes Classifier" which can provide me with a "yes" or "no" type of answer on any element of my set, provided that I did use a "training set" consisting of some elements of my set, and the expected outcome of the algorithm. Based on that data, the algorithm should be able to take any other element, not part of the training set, and provide a "yes" or "no" answer based on what it learnt thanks to the training set. This is great if you have some kind of idea of what your expect (training set) but you are unsure of the specific rules that yields to that result.

What I would like to do with my data is not get a "yes" or "no" type of answer, but I would like to introduce a ranking within the elements. Some of them are "better" than others. Just like for the Bayes filter, I have got a generic idea of what I expect. I could thus generate a "training ranking" taken from a subset of my elements, that I would feed into the MLA. Based on that training it would be able to rank my whole set.

In order to do that I see two approach :

1. Each element would be given a score by the MLA, then rank the elements according to the score.
2. The MLA would be able to take two elements $x_i$ and $x_j$ and determine wich one is better (pairwise comparisons). Use quicksort using that comparison operation.

Note : based on a score the pairwise function is trivial to implement, and based on a pairwise function, it is trivial to generate a score, so these are just two approches to yield to the same results.

Are there examples out there of MLA's that can provide a scoring function, or a pairwise comparison function ?

EDIT : In order to add more context : currently my items are ranked according to an algorithm that generates a score (real number) te each items by making calculations on the $c_{ij}$. While the generated ranking is quite correct, I often have to modify the algorithm to tweak it in some way because I can clearly see some items that are not ranked according to what I would have expected.

So currently my design process is :

1. Get an idea of what a perfect ranking would be
2. Try to (manually) derive an algorithm that would rank the items like that
3. Observe the results