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

Dirac #1745

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Dirac #1745

wants to merge 2 commits into from

Conversation

i9e1
Copy link

@i9e1 i9e1 commented Jul 2, 2023

Applied suggestions from Review and rebased on current master.
This PR than is just to fix location, scale, +, * #1731, #1695

i9e1 and others added 2 commits July 3, 2023 00:55
closes JuliaStats#1731

* location implemented
* scale implemented (= one)
* shifting = :+ implemented

* Scaling = :*, errors

Widening the Dirac cannot be done in a type stable way.
Dirac can be interpreted as limit of some distributions
in the limit σ^2 -> 0.0 (e.g. Normal, Uniform, Cosine).
Falling back to one of these is arbitrarily and not
type stable. Therefore it's up to the user what to do
when recaling (= lowering certainty) needs to be done.

Adding two Dirac distributions is allowed. The sum
of Dirac distributed random variables is interpreted
as the sum of their values. This result can be obtained
by either interpretation as certain bare numbers or
by convolution.

resolves JuliaStats#1695

Type T is reduced to T<:Real to be consistent with other
distributions. Non-scalar values are no longer allowed
as arguments.
This is a **potentially breaking** change, if user code
relied on unintended behaviour.
@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.05 ⚠️

Comparison is base (c8d3e4b) 85.90% compared to head (a402444) 85.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1745      +/-   ##
==========================================
- Coverage   85.90%   85.86%   -0.05%     
==========================================
  Files         142      142              
  Lines        8579     8583       +4     
==========================================
  Hits         7370     7370              
- Misses       1209     1213       +4     
Impacted Files Coverage Δ
src/univariate/discrete/dirac.jl 80.00% <0.00%> (-15.24%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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