4 ms·
Would that quadratic formula generally work if you picked any two random points from the graph instead? Anyway, the graph doesn't even try to suggest the perfo
by Delk 5y ago
Would that quadratic formula generally work if you picked any two random points from the graph instead?
Anyway, the graph doesn't even try to suggest the performance behaviour shows a single linear relationship. The post (and the graph) explicitly says there seem two be two different linear segments. It's true that a single linear relationship would be a wrong model, but does that mean quadratic is right either?
I might be completely off but I wonder if the relationship could be generally linear but with different coefficients before and after the cutover point due to the data becoming larger than fits in the cache at once, or something.
- iamcreasy 5y ago> Would that quadratic formula generally work if you picked any two random points from the graph instead? You need 3 points for a fit a polynomial of degree 2. I am not talking about the first linear segment at all. My concern is that the 2nd part is not linear. Drawing a line though eye balling is very error prone. That's point I am trying to make.
- Delk 5y ago> You need 3 points for a fit a polynomial of degree 2. I'm a bit confused. Yes, you need (at least) three points to try and fit a polynomial of degree two. But both of your earlier examples of why the relationship could be quadratic consisted of two points. I'd be more or less happy to accept that if the same quadratic formula worked (within a margin of error) for several other other, randomly chosen pairs of points in the graph. The second segment seems roughly linear to me. There are a couple of points in the graph that are somewhat off, but it's (at least as shown in the graph) only a couple of points, and we don't know the accuracy of the measurements, so there could be some noise. It's true that you can easily get spurious relationships by trying to see multiple different segments or otherwise zooming to an selected level. I'm just not really sure the points as a whole look like a quadratic curve either, and it's not impossible there could be multiple segments, as e.g. cache behaviour could potentially introduce such non-linearity in what could otherwise have linear performance.
- iamcreasy 5y agoIf you are trying to find the best polynomial of degree 2 you need 3 points - as you can not fit a quadratic with only 2 points. I tested it with multiple points. 400,000 to 800,000, and 400,000 to 600,000. I should have done it the first time though. It does look linear but that's the problems with eye ball testing. I think if you fit a quadratic, you'll start to see the gradual curve. Its will be a very zoomed in area in a parabola. If I had more time I'd generate the dataset from the graph and try to fit linear and quadratic regression line and compare the models using coefficient of determination. That would provide some strong for/against evidence.
- Delk 5y ago> Its will be a very zoomed in area in a parabola. That's entirely possible. Of course someone who knew how the algorithm worked (within the js engine) could just tell based on the code. :)