I need an algorithm to best-fit a curve

  • Context: Undergrad 
  • Thread starter Thread starter Jamin2112
  • Start date Start date
  • Tags Tags
    Algorithm Curve
Click For Summary

Discussion Overview

The discussion revolves around developing an algorithm to best-fit a logistic curve for predicting finish times of distance runners based on their recent race times. The focus is on the application of statistical methods and algorithms to achieve this goal.

Discussion Character

  • Technical explanation, Mathematical reasoning, Experimental/applied

Main Points Raised

  • One participant describes the need for a logistic function to predict race finish times based on recent performance data.
  • Another participant suggests that this is a standard non-linear regression problem and mentions that statistics software like R can facilitate curve fitting.
  • A different participant indicates an intention to implement the algorithm in Javascript for a web application.
  • One participant provides links to resources on nonlinear least squares fitting and the Gauss–Newton algorithm as potential methods for curve fitting.
  • Another participant proposes using Lagrange Interpolation, noting that while it may diverge, it will pass through the specified data points.

Areas of Agreement / Disagreement

Participants express various approaches to curve fitting, with no consensus on a single method. Multiple competing views on the best algorithm remain present.

Contextual Notes

Some methods mentioned may have limitations, such as potential divergence in the case of Lagrange Interpolation, and the discussion does not resolve the appropriateness of each suggested approach.

Who May Find This Useful

Readers interested in statistical modeling, algorithm development for sports performance prediction, or those looking to implement curve fitting techniques in programming may find this discussion relevant.

Jamin2112
Messages
973
Reaction score
12
I'm making an applet for distance runners that predicts their finish time for any distance, using recent race times for any distance. For example, a user might enter 3 recent race times which are 16:37 for a 5k (5:21 min/mile pace), 27:42 for an 8k (5:34 min/mile pace), and 35:18 for a 10k (5:41 min/mile pace), then my "finish time calculator" could predict their finish time for a race of any distance. I've found that distance vs. pace follows a logistic curve like the one pictured below.


http://luna.cas.usf.edu/~mbrannic/files/pmet/image329.gif



Hence I want to predict their race finish times using a logistic function f(x) = C1(1/(1+C2e-C3x)). How do I do this, though?
 
Last edited by a moderator:
Physics news on Phys.org
Standard non-linear regression problem. Any statistics software (e.g. R) will let you fit the curve fairly easily.
 
Number Nine said:
Standard non-linear regression problem. Any statistics software (e.g. R) will let you fit the curve fairly easily.

I was actually going to recreate the algorithm in Javascript since I'm putting this "finish time calculator" on a site.
 
You could try Lagrange Interpolation.
Although it may have divergence, it will certainly pass through those points.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
Replies
10
Views
5K
  • · Replies 0 ·
Replies
0
Views
4K
Replies
2
Views
1K
  • · Replies 21 ·
Replies
21
Views
5K