# Looking for Rating Functions

I'm looking for something i would call rating functions. I'm searching for some literature about this concept. I'm not really sure about the terminology, but what I mean should be pretty obvious.

A type of function that returns a rating of some input.

Lets have a function that gets some input and returns a number between 0 and 1 as a rating, where 0 is bad and 1 is great. Everything between is well between bad and great depending.

Lets assume inputs are just numbers

$f\colon \mathbb{N} \longrightarrow [0,1]$

I would like if I have several rating functions be able to compose them. For example if I have the rating functions $r_1$, $r_2$ I would like to compose both to a new rating function that returns a new rating in dependency to $r_1$ and $r_2$

Now I'm looking for literature, but was unable to find any. Can somebody hint me into the correct direction? The correct name for the concept I'm looking for would be great.

## Edit

I want to implement various Rating Functions and want to combine them

One functions could be

alwaysPerfect = (x) -> 1
isOdd = (x) -> x%2
distanceToOne = (x) ->
x = 2 if x is 0
1/abs(x)


Anyone could implement this functions, but the contract for this functions would be to always return a value between 0 and 1

I need to evaluate some data with various evaluation conditions. Writing these evaluation seperate small functions and combine them seems to be more clearer than writing one big function that does all the evalauting

• there are candidates but... too vague! rating according to what criteria? one possibility is to look into genetic algorithm fitness functions. – vzn Apr 11 '13 at 16:05
• This sounds vaguely like what the fuzzy set crowd does... – vonbrand Apr 11 '13 at 16:06
• Which numbers should get which rating? What is your intended application? – Yuval Filmus Apr 11 '13 at 16:07
• After the Edit, even more: Look at the whole "fuzzy set" and related areas. – vonbrand Apr 11 '13 at 17:32
• I don't even know what to tag this; it's not about algorithms, that's for sure. – Raphael Apr 11 '13 at 22:54

So you have a bunch of functions $f_1, \dots, f_k$ from $\mathbb{N} \to [0,1]$ and want to combine them to a new one. There is a myriad of possibilities, e.g.

• $f(n) = \prod_{i=1}^k f_i(n)$,
• $f(n) = \frac{1}{k} \cdot \sum_{i=1}^k f_i(n)$,
• $f(n) = \sum_{i=1}^k c_if_i(n)$ for $\sum_{i=1}^k c_i = 1$ and $c_i \geq 0$,
• $f(n) = \min\{f_1(n), \dots, f_k(n)\}$,
• $f(n) = \max\{f_1(n), \dots, f_k(n)\}$,
• $f(n) = \operatorname{median}\{f_1(n), \dots, f_k(n)\}$,
• $f(n) = f_1( \lceil 1000 \cdot f_2 ( \lceil 1000 \cdot f_3( \dots )\rceil)\rceil)$,

or any other of infinitely many choices. Without context, it is impossible to know which one yields something meaningful in your context.

You question is very vague, but there is extensive work on combining weak classifiers into stronger classifiers. Perhaps that's what you mean?

For example the Adaboost algorithm can be used to find the weights you should give individual classifiers in order to combine them optimally.