0
$\begingroup$

I have some data.

data = [     (10000, 0),     (100000, 0.25),     (10000000, 0.5), ] 

I want to find function(s) fitting this data. I have a possible starting point:

f(x) = Ax / (B + x) - C 

Can I find A, B, C satisfying the data?

The function should be continuous. f(x) for x<=10000 does not matter but should be negligible or negative for x<=10000. The function should have an asymptotic maximum < 1.

  • 0
    What is ridiculous about discrete brackets?2012-05-12

2 Answers 2

1

As you have the same number of free parameters as data points, you can write three simultaneous equations in three unknowns and solve, but that may not meet the end cases. The functional form you give goes to $A-C$ for large $x$ and to $-C$ for $x=0$. If you want it zero at $x=0$ you have to have $C=0$. Then you have one more data point than parameters. You could minimize the error over A and B and see if you like the result.

It is easy to change parameters in a function-your $A, B, C$. It is hard to change the form of a function.

  • 0
    You can certainly maintain continuity and get zero for small $x$ by taking $g(x)=\max(0, f(x))$ for your $f(x)$ but maybe that feels like the bracket problem. Do you have Excel? It has goal seek-make a spreadsheet that has $A,B,C$ as input and calculates your $f(x)$. Then square the errors from your desired values and tell it to minimize. Then make a table for many values of $x$, plot it, and see if you like the result. You could also create more desired pairs-it will minimize just the same.2012-05-12
0

This function satisfies your 3 example data points, although I believe it falls short of your intention:

f(x) = logb2(logb10(x/1000))/4

Addendum to address Ross Millikan's comment:

Here's a function that is similar to the desired function:

f(x) = 1 - (1/log(x/1000)) for x>=10,000

f(x) = 0 for x < 10,000

This function has a limit <= 1 and produces:

  • f(10,000) = 0
  • f(100,000) = .5
  • f(10,000,000) = .75

Not the same as the example data points, but this form may be useful as a starting point.

  • 0
    It does not satisfy the asymptotic maximum less than 1, however.2012-05-12