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

Add CDF for TruncatedDiagonalMVN #888

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Add CDF for TruncatedDiagonalMVN #888

merged 1 commit into from
Jul 21, 2023

Conversation

aakashdp6548
Copy link
Collaborator

@aakashdp6548 aakashdp6548 commented Jul 20, 2023

Another quick fix for TruncatedDiagonalMVN - I think we need the CDF for #806 to evaluate the probability that a source is within the interior region,
$$q_\phi(z^{(i)}) = \mathbb{I}[z^{(i)} = \varnothing](1 - q_{\phi_i}(y_i = 1)\mathbf{q_{\phi_i}(\ell_i \in R_i)}) + \mathbb{I}[z^{(i)} \neq \varnothing]q_{\phi_i}(z^{(i)})$$

In code this first term would translate to

loss += (true_cat.n_sources == 0) * (1 - on_prob * (pred["loc"].cdf([0.95, 0.95]) - pred["loc"].cdf([0.05, 0.05]))

@aakashdp6548
Copy link
Collaborator Author

Will merge this once CI server is back up and tests are confirmed to be passing

@aakashdp6548 aakashdp6548 changed the title Add CDF for UnconstrainedDiagonalBivariateNormal Add CDF for TruncatedDiagonalMVN Jul 20, 2023
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #888 (db6eb43) into master (f14e8df) will decrease coverage by 0.03%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master     #888      +/-   ##
==========================================
- Coverage   95.54%   95.51%   -0.03%     
==========================================
  Files          21       21              
  Lines        2266     2276      +10     
==========================================
+ Hits         2165     2174       +9     
- Misses        101      102       +1     
Flag Coverage Δ
unittests 95.51% <91.66%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bliss/unconstrained_dists.py 87.67% <91.66%> (+0.36%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@aakashdp6548 aakashdp6548 merged commit f8f8d3e into master Jul 21, 2023
3 checks passed
@aakashdp6548 aakashdp6548 deleted the loc-dist-cdf branch July 21, 2023 13:38
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