SWIFTSIM / emulator

The SWIFT simulation cosmological emulator (swift-emulator)
GNU Lesser General Public License v3.0
5 stars 2 forks source link

Add four Gaussian penalty functions #17

Closed Moyoxkit closed 3 years ago

Moyoxkit commented 3 years ago

This push adds four new Gaussian penalty functions:

Based around observational errors, a constant percent error, A mix of the two, where the largest is always taken and a variant of the mixed function with an additional weight factor that could help combine different observables.

As these models don't have a natural cutoff, I added a free parameter thats sets the amount of sigmas where the penalty will become 1.

Ive tested them all and they work as intended, I would be happy to use shorter names but they will be less descriptive. All these are intended for use for MCMC methods, where log(1-Penalty) can be used as a Gaussian log likelihood.

Also adds markers at the data points when using plot penalty

JBorrow commented 3 years ago

You'll need to format with black before merging.

JBorrow commented 3 years ago

Some other minor comments for you

Moyoxkit commented 3 years ago

I've updated the penalty functions I added to now do the add in squares technique we discussed last Friday, still with an L2 (Gaussian-like) norm. Also implemented your comments.

JBorrow commented 3 years ago

Excellent thanks!