ApolloResearch / rib

Library for methods related to the Local Interaction Basis (LIB)
MIT License
3 stars 0 forks source link

Normalize after squaring in jacobian squared #247

Closed danbraunai-apollo closed 9 months ago

danbraunai-apollo commented 9 months ago

Normalize after squaring in jacobian squared

Description

Motivation and Context

Bug in implementation where the normalization was happening before the squaring. Probably doesn't affect much.

How Has This Been Tested?

No new tests. Note that our numbers will be bigger with this method since we are normalizing by 1/|D| instead of (effectively) 1/|D|^2. I don't expect this should affect anything, especially in float64, but it may be that this scaling makes precision errors worse? (Since we're just doing float64 for everything pythia-14m and upwards, I don't see this as a big issue.)

Does this PR introduce a breaking change?

Calculating edges will now give different (more correct) results.

stefan-apollo commented 9 months ago

Looks good to me! Small nit re variable re-assignment