elfi-dev / elfi

ELFI - Engine for Likelihood-Free Inference
http://elfi.readthedocs.io
BSD 3-Clause "New" or "Revised" License
267 stars 60 forks source link

BSL update penalty to shrinkage conversion #452

Closed uremes closed 1 year ago

uremes commented 1 year ago

Summary:

updated how the parameter penalty is converted to the shrinkage parameter used in cov_warton and corr_warton in synthetic likelihood calculation. in the previous version when shrinkage=’warton’, penalty=1 corresponded to using the sample covariance matrix without shrinkage and penalty=0 corresponded to maximum shrinkage. now the shrinkage parameter is calculated as 1-penalty so that penalty=0 corresponds to no shrinkage. this means that both penalised covariance matrix estimation methods (’warton’and ’glasso’) now return the sample covariance matrix when penalty=0 and a more shrunk or sparse solution when penalty increases.

Please make sure

If your contribution adds, removes or somehow changes the functional behavior of the package, please check that

and the proposed changes pass all unit tests (check step 6 of CONTRIBUTING.rst for details)

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: