Help with sigmoid function

makomeyer

New member
Joined
May 3, 2022
Messages
1
Hi there, I am hoping someone can help me come up with a formula for a sigmoid or sigmoid-like function. I've developed a world ranking system for long-distance marathon swimmers using python network analysis. Race results are analyzed to produce a ranking, but not all results are weighted equally; a result from yesterday is weighted more heavily than a result from two years ago. Right now I'm using a linear depreciation model where the "weight" of the result, in terms of its age at least, is equal to:

race_date = the date of the race
rank_date = the "as of" date of the ranking
days_old = rank_date - race_date (this is an integer, in days)
DEPRECIATION_PERIOD = time period, in days, over which a result is depreciated
weight = (DEPRECIATION_PERIOD - days_old) / DEPRECIATION_PERIOD

I'd like to experiment with not using a linear model, but something closer to a sigmoid function where the weight tails off slowly initially, then faster during the middle of the period, then slower again eventualy to zero. Weight should start at 1 and go to 0 over d days. So for all negative value of x, y=1, then after (0,1) it would converge to an asymtote starting at (d,0). I'd like the inputs to be d, where d is the total time in days over which the weight is depreciated, and s which controls the steepness of the dropoff. Attached is an example curve with a few different steepnesses, controlled by variable s, and where d = 365 days or one year.

I tried playing around with an online graphing calculator but I can't get it to make the shape I want, and I'm really not a strong math person. Any help is appreciated!

Here's more about my project if you're interested: https://www.marathonswimrankings.com/home
 

Attachments

  • sigmoid.jpg
    sigmoid.jpg
    29.6 KB · Views: 1
Top