Created
June 16, 2017 18:23
-
-
Save ssbozy/e60c914f1d9b33787d744687bba2bc47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This little script takes into consideration a cooling rate and creates a new value for the ratings as time progresses | |
from datetime import datetime | |
import time | |
COOLINGRATE = 0.2 | |
def fetch_new_rating(rating, timestamp): | |
diff_time = time.time() - timestamp | |
new_ratings = current_rating * exp(-cooling_rate * diff_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment