<jupyter_start><jupyter_text>Initial tutorial and script courtesy ofhttp://www.physics.ucdavis.edu/~dwittman/Fisher-matrix-guide.pdf<jupyter_code>import numpy as np

xvals = (-1,1, 1)
sigmavals = (0.1,0.1,0.1)
npar = 2
F = np.zeros([npar,npar])
for x,sigma in zip(xvals,sigmavals):
    for i in range(npar):
        if i==0:
            dfdpi = x
        else:
            dfdpi = 1
        for j in range(npar):
            if j==0:
                dfdpj = x
            else:
                dfdpj = 1
            F[i,j] += sigma**-2*dfdpi*dfdpj
        
print (np.mat(F).I) # invert the matrix<jupyter_output>[[ 0.00375 -0.00125]
 [-0.00125  0.00375]]
{'fraction_non_alphanumeric': 0.1437308868501529, 'fraction_numerical': 0.05963302752293578, 'mean_word_length': 1.9638009049773755, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '579169', 'license': 'MIT', 'n_tokens_mistral': 289, 'n_tokens_neox': 262, 'n_words': 55, 'path': '.ipynb_checkpoints/Fisher_info-checkpoint.ipynb', 'repo_name': 'jiawu/Roller', 'size': '654'}