Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaK: solution for singular likelihood hessian and infinite volume shells #77

Merged
merged 4 commits into from
Aug 22, 2022

Conversation

diegodoimo
Copy link
Collaborator

I propose to solve some pathologies that actually result in 'None' values in the density estimated with pak:

  1. presence of shells of infinite volume: here I assign a volume equal to e^300 which is almost the largest floating point number. I didn't want to set it to the largest value possible because the volumes are used in the max likelihood routine, and I didn't test the behavior of using np.inf there;

  2. singularity of the hessian matrix in the optimization of the likelihood: here I added a fixed point step whenever the hessian is singular. This 'bug' is particularly nasty as it leads to none values without specific error messages.

@diegodoimo diegodoimo changed the title solution singular likelihood hessian infinite volume issues PaK: solution of singular likelihood hessian and infinite volume issues Jul 21, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #77 (8296d3f) into main (f2af10a) will decrease coverage by 0.16%.
The diff coverage is 68.75%.

@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
- Coverage   78.16%   78.00%   -0.17%     
==========================================
  Files          10       10              
  Lines        1177     1191      +14     
==========================================
+ Hits          920      929       +9     
- Misses        257      262       +5     
Impacted Files Coverage Δ
dadapy/_utils/density_estimation.py 56.57% <68.75%> (+1.74%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2af10a...8296d3f. Read the comment docs.

@diegodoimo diegodoimo changed the title PaK: solution of singular likelihood hessian and infinite volume issues PaK: solution for singular likelihood hessian and infinite volume shells Jul 21, 2022
@diegodoimo diegodoimo merged commit 75e2fd8 into main Aug 22, 2022
@diegodoimo diegodoimo deleted the pak_imporvements branch August 22, 2022 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants