Skip to content

Instantly share code, notes, and snippets.

View amirshamaei's full-sized avatar
😄

Amir Shamaei amirshamaei

😄
View GitHub Profile
@rawlik
rawlik / cramer_rao.py
Last active March 5, 2022 15:04
Python module to numerically calculate Cramer-Rao bounds.
import pylab as pl
from scipy.misc import derivative
import inspect
def cramer_rao(model, p0, X, noise, show_plot=False):
"""Calulate inverse of the Fisher information matrix for model
sampled on grid X with parameters p0. Assumes samples are not
correlated and have equal variance noise^2.
Parameters