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: Implement location, scale, affine transformation #1735

Closed
wants to merge 2 commits into from

Conversation

i9e1
Copy link

@i9e1 i9e1 commented Jun 6, 2023

closes #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 #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.

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 Jun 6, 2023

Codecov Report

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

Comparison is base (2dee35e) 85.90% compared to head (01acb8c) 85.85%.

❗ Current head 01acb8c differs from pull request most recent head cb044e1. Consider uploading reports for the commit cb044e1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1735      +/-   ##
==========================================
- Coverage   85.90%   85.85%   -0.06%     
==========================================
  Files         142      142              
  Lines        8566     8571       +5     
==========================================
  Hits         7359     7359              
- Misses       1207     1212       +5     
Impacted Files Coverage Δ
src/univariate/discrete/dirac.jl 76.92% <0.00%> (-18.32%) ⬇️

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

src/univariate/discrete/dirac.jl Show resolved Hide resolved
src/univariate/discrete/dirac.jl Show resolved Hide resolved
src/univariate/discrete/dirac.jl Outdated Show resolved Hide resolved
src/univariate/discrete/dirac.jl Show resolved Hide resolved
@i9e1 i9e1 closed this Jul 2, 2023
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.

location and scale of Dirac missing, rescaling Dirac Dirac of a vector should be Multivariate
3 participants