-1

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?

4

1 回答 1

0

您可以ridge-regression使用kernels. kernels 有助于在不改变其实际形式的情况下将linear函数转换为函数。non-linear这就是Graipher所指出的。

这是一个脚本,它显示了一个使用它的示例。

此外,这些选择伴随着经验和理解。您还可以通过可视化函数形式来仔细猜测(例如,哪个多项式可以拟合)。

于 2019-01-13T15:25:06.660 回答