MCPcopy Index your code
hub / github.com/python/cpython / triangular_kernel

Function triangular_kernel

Lib/statistics.py:860–865  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

858
859@register('triangular')
860def triangular_kernel():
861 pdf = lambda t: 1.0 - abs(t)
862 cdf = lambda t: t*t * (1/2 if t < 0.0 else -1/2) + t + 1/2
863 invcdf = lambda p: sqrt(2.0*p) - 1.0 if p < 1/2 else 1.0 - sqrt(2.0 - 2.0*p)
864 support = 1.0
865 return pdf, cdf, invcdf, support
866
867@register('parabolic', 'epanechnikov')
868def parabolic_kernel():

Callers

nothing calls this directly

Calls 1

absFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…