2

I'm coding a piece of software that has to deal with many quantities and mappings of these quantities to a this is "10 out of 100 bad" scale. For example: a server response time of 200ms is 50/100 bad. (i.e. the "severity score" of a 200ms response time is 50 on a scale from 0 to 100).

Here's another example, without loss of generality:

Suppose I have a "severity scale", that is (for example), a piecewise linear function from a measurable quantity (say, concentration of potassium in soil sample) to a value in the $[0,1]$ interval (representing a "severity score", "seriousness score", "economical threat score", etc).

Like this:

$$ f(v) = \begin{cases} 0.0 & \text{if $v$ is $60$ ppm or below}\\ 1.0 & \text{if $v$ is $100$ ppm } \\ 0.0 & \text{if $v$ is $170$ ppm or more} \\ \operatorname{lerp}(v, a, b) & \text{otherwise} \end{cases} $$

where $\operatorname{lerp}(v, a, b)$ is the linear interpolation of unknown $v$ from known $a$ and $b$, and $a$ and $b$ are the closest defined points that surround $v$. The domain of $v$ in this case is $[0, \infty]$, but let's pretend it's $[-\infty, +\infty]$, without loss of generality, just so the function definition makes sense for quantities that can be negative.

Informally, $f$ is a function representing a "scale" whose optimum is $100$ ppm, and both $60$ ppm and $170$ ppm are really bad. Values above 170 and below 60 are considered to be as bad as those extremes for the purposes of the scale.

My question: is there a name for such a mathematical scale? That is, a mapping from an unbounded quantity to a bounded interval?

EDIT: I think my soil example may have mislead some commenters. I don't mean to imply anything about the shape of the function with the example, only that it maps an arbitrary domain into the unit interval in someway.

  • 1
    Well, your function might be called an (asymmetric) tent map. – Milo Brandt Jul 03 '15 at 15:30
  • 1
    Your function is a nonnegative unimodal function with maximum 1. – vadim123 Jul 03 '15 at 15:47
  • @Meelo I didn't know about these concepts and enjoyed learning about them! However, I believe my example may have misled you. Not all my mappings will be unimodal (actually, I would say most would be monotonically increasing). I would be glad if took a look at my edit and see if the question is clearer now. – Rafael Almeida Jul 03 '15 at 18:24
  • @vadim123 ( please see the other comment too ) – Rafael Almeida Jul 03 '15 at 18:24
  • @RafaelAlmeida In the most general form, one might just say "a function $f:S\rightarrow [0,1]$" or "a function mapping to the unit interval". You might find other adjectives useful to describe the mathematical nature (e.g. in the given example "compact support" and "continuous" apply), or perhaps just use terms with less specific meaning to describe their purpose (e.g. what you have might be called an "objective function" in the sense that you'd like to maximize it. You might also find the term "cost function" for the opposite of that helpful) – Milo Brandt Jul 03 '15 at 18:45
  • @Meelo I see. My main goal is to properly name the programming entities (classes, etc) that deal with this. I guess I'll go with something like BoundedScaleConverter for now. My other goal if this had/has a name is to see what has been studied about this, since it can help architecting the system. Thanks a lot! – Rafael Almeida Jul 03 '15 at 18:50
  • 1
    The main property you're trying to describe I would describe as "compact range" or "bounded range". – vadim123 Jul 03 '15 at 18:58

0 Answers0