This file contains 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
import math | |
import scipy.stats as stats | |
""" | |
Algorithms desgin: | |
http://www.evanmiller.org/how-not-to-sort-by-average-rating.html | |
What: Calculate lower bound of Wilson score confidence interval for a Bernoulli parameter | |
Why: Sort data by binomial votes score | |
""" | |
def ci_lower_bound(pos, n, confidence): |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Python decorator to measure average execution time of a function. | |
Modification of Andreas Jung' function | |
https://www.andreas-jung.com/contents/a-python-decorator-for-measuring-the-execution-time-of-methods | |
@author Mikołaj Hnatiuk | |
@www www.mikolajhnatiuk.com | |
""" |