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

Fix cumulative and density function #153

Merged
merged 29 commits into from
Mar 12, 2024
Merged

Fix cumulative and density function #153

merged 29 commits into from
Mar 12, 2024

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Mar 10, 2024

  • deviance function is not supported and user will be warned when using it.
  • Compare to multibugs: multibugs doesn't seem to support cumulative and density, but provide individual cdf and pdf functions. We can also stop supporting these two functions, and direct user to use cdf and pdf.
  • For now, a new member distributions is added to BUGSModel to track all the distributions: using Dict right now because non-scalar rv is problematic if we store distributions in the same way we store values. cumulative and density are handled in special way in _eval function to allow access to distribution info at run time. Maybe this can be generalized, the distribution can be helpful introspect info

Fix: #137

src/model.jl Outdated Show resolved Hide resolved
sunxd3 and others added 5 commits March 10, 2024 16:16
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 93.10345% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 82.19%. Comparing base (fe710e6) to head (7a419e5).

Files Patch % Lines
src/compiler_pass.jl 91.17% 6 Missing ⚠️
src/utils.jl 93.54% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
+ Coverage   81.78%   82.19%   +0.41%     
==========================================
  Files          21       21              
  Lines        1938     1966      +28     
==========================================
+ Hits         1585     1616      +31     
+ Misses        353      350       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coveralls
Copy link

coveralls commented Mar 10, 2024

Pull Request Test Coverage Report for Build 8229663147

Details

  • 129 of 145 (88.97%) changed or added relevant lines in 5 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.4%) to 82.224%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils.jl 40 42 95.24%
src/compiler_pass.jl 53 59 89.83%
src/parser/bugs_macro.jl 21 29 72.41%
Files with Coverage Reduction New Missed Lines %
src/utils.jl 1 85.78%
Totals Coverage Status
Change from base Build 8192126677: 0.4%
Covered Lines: 1619
Relevant Lines: 1969

💛 - Coveralls

@sunxd3 sunxd3 requested a review from yebai March 11, 2024 05:53
src/JuliaBUGS.jl Outdated Show resolved Hide resolved
src/JuliaBUGS.jl Outdated Show resolved Hide resolved
src/compiler_pass.jl Outdated Show resolved Hide resolved
src/JuliaBUGS.jl Outdated Show resolved Hide resolved
src/compiler_pass.jl Outdated Show resolved Hide resolved
src/compiler_pass.jl Outdated Show resolved Hide resolved
src/compiler_pass.jl Outdated Show resolved Hide resolved
test/graphs.jl Outdated Show resolved Hide resolved
test/graphs.jl Outdated Show resolved Hide resolved
@sunxd3
Copy link
Member Author

sunxd3 commented Mar 12, 2024

@yebai I removed some unrelated changes, the code change should be relatively clear.

I am merging this now, but if there are issue, I'll fix them later.

@sunxd3 sunxd3 merged commit 556c5be into master Mar 12, 2024
12 of 15 checks passed
@sunxd3 sunxd3 deleted the sunxd/fix_cumulative branch March 12, 2024 08:52
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.

cumulative, density, deviance are not implemented correctly
2 participants