소스 검색

Update confidence function comments.

tags/v0.2
Ben Kurtovic 10 년 전
부모
커밋
106e58b164
1개의 변경된 파일9개의 추가작업 그리고 11개의 파일을 삭제
  1. +9
    -11
      earwigbot/wiki/copyvios/workers.py

+ 9
- 11
earwigbot/wiki/copyvios/workers.py 파일 보기

@@ -261,12 +261,11 @@ class CopyvioWorkspace(object):
"""Return the confidence of a violation as a float between 0 and 1."""
def conf_with_article_and_delta(article, delta):
"""Calculate confidence using the article and delta chain sizes."""
# This piecewise function, C_AΔ(Δ), was defined such that
# confidence exhibits exponential growth until it reaches the
# default "suspect" confidence threshold, at which point it
# transitions to polynomial growth with lim (A/Δ)→1 C_AΔ(A,Δ) = 1.
# A graph can be viewed here:
# http://benkurtovic.com/static/article-delta_confidence_function.pdf
# This piecewise function exhibits exponential growth until it
# reaches the default "suspect" confidence threshold, at which
# point it transitions to polynomial growth with a limit of 1 as
# (delta / article) approaches 1.
# A graph can be viewed here: http://goo.gl/mKPhvr
ratio = delta / article
if ratio <= 0.52763:
return -log(1 - ratio)
@@ -275,11 +274,10 @@ class CopyvioWorkspace(object):

def conf_with_delta(delta):
"""Calculate confidence using just the delta chain size."""
# This piecewise function, C_Δ(Δ), was derived from experimental
# data using reference points at (0, 0), (100, 0.5), (250, 0.75),
# (500, 0.9), and (1000, 0.95) with lim Δ→+∞ C_Δ(Δ) = 1.
# A graph can be viewed here:
# http://benkurtovic.com/static/delta_confidence_function.pdf
# This piecewise function was derived from experimental data using
# reference points at (0, 0), (100, 0.5), (250, 0.75), (500, 0.9),
# and (1000, 0.95), with a limit of 1 as delta approaches infinity.
# A graph can be viewed here: http://goo.gl/lVl7or
if delta <= 100:
return delta / (delta + 100)
elif delta <= 250:


불러오는 중...
취소
저장