1

I want to write a function that gets up to six parameter and an array of input values and map inputs value to output based on the following conditions:

  1. we know min and max of input values.
  2. The output min and max should be a constant value (say -10,100).
  3. Based on parameters, it amplify small input values more than input values which are near inputmax.
  4. after mapping, the output min and max should be the constant values.

I think I need some sort of logarithmic amplification. But I am not sure how to define it so that it match the above mentioned conditions.

What mathematical formula can I use for this?

I need to implement it both in c++ and c#. If I know how to implement it in one of them, I can convert it to other one.

3
  • Sounds like a fun job for a neural network (feedforward?)! Commented Jun 12, 2013 at 19:43
  • @AustinHenley here is nothing that a NN can learn! Its output is a map of input and the mapping math is not related to input, so I can not see any use of NN here.
    – mans
    Commented Jun 12, 2013 at 19:46
  • Sorry, bad idea then. Commented Jun 12, 2013 at 19:49

1 Answer 1

1

I don't really understand where is the problem; am I missing something? What you say seems to require a simple component-wise operation, something of the form:

forall x in range
    out[x] = ((in[x]-in_min)/(in_max-in_min))^gamma * (out_max-out_min)+out_min

where gamma is some constant, probably smaller than 1 if you want low values to be amplified more than high values. Think of it like a "gamma correction".

I do not however see how your "6 parameters" come into play?

2
  • This is the type of answer that I am looking for. I need to find how gamma is changing mapping and how I can define another model that gets more than one parameter and generate a transfer line that is better suite my task. My aim is to map image pixels and make darker area brighter when the brither are be the same.
    – mans
    Commented Jun 12, 2013 at 20:01
  • 1
    The best way to visualize gamma is to treat it as gamma correction. You can read about gamma correction on en.wikipedia.org/wiki/Gamma_correction
    – CygnusX1
    Commented Jun 12, 2013 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.