0

I have two variables, y being the number of targets achieved and x the number of individuals involved in the operation. The relationship is positive and non-linear (there are only so many individuals you can add before the returns of adding individuals are diminishing), however I am not sure what is the function of x that best predict y.

Using Python, I would like to find the best fitting line/function and identify the maximum of the function to advise how many individuals include in each team to achieve the maximum number of targets [controlling for different variables]

How to do it?

Filippo Sebastio
  • 1,112
  • 1
  • 12
  • 23
  • 1
    What have you tried so far? – KahntM Jan 07 '19 at 10:17
  • Since the set of all non-linear monotonically increasing functions is probably infinite, you will have to restrict yourself to some finite set of functions. Either some common ones (quadratic, third-order polynomial, log, exp) or maybe all Chebyshev polynomials up to order something. or possibly something more complex. – Graipher Jan 07 '19 at 10:17
  • @KahntM, not much yet! I am not sure how to approach this problem. – Filippo Sebastio Jan 07 '19 at 10:22
  • @Graipher, so I still need to test how different functions perfom fitting the relationship? (E.g. comparing the differenet sum of squared residuals?) – Filippo Sebastio Jan 07 '19 at 10:24
  • @FilippoSebastio: Yes, you will have to fit each function before you know if it fits your data...obviously. Even functions that can only be made positive-semidefinite but are not monotonically increasing can be used by using their CDF. If you can rescale your problem into the [0, 1] domain, the [Beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) (or rather its CDF) might be general enough for it to be able to describe it. – Graipher Jan 07 '19 at 11:37

1 Answers1

0

You can use ridge-regression with kernels. kernels helps in transforming linear function to non-linear function without changing its actual form. This is what Graipher was pointing.

Here is a script, which shows an example to use it.

Also, these selection comes with experience and understanding. You can also guess closely(eg. which polynomial can fit in), by visualizing the function form.

Ankish Bansal
  • 1,827
  • 3
  • 15
  • 25