Skip to content

Instantly share code, notes, and snippets.

Avatar
🗺️
Mapping the Internet, one router at a time.

Maxime Mouchet maxmouchet

🗺️
Mapping the Internet, one router at a time.
View GitHub Profile
View penalty.py
def penalty(β):
"""
L: log-likelihood
n: number of data points
k: number of parameters
"""
return lambda L, n, k: β(n)*k - 2*L
AIC = penalty(lambda n: 2)
BIC = penalty(lambda n: np.log(n))