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

Respect type of parameters in fit for Bernoulli, Binomial, and Uniform #1558

Merged
merged 2 commits into from
May 30, 2022

Conversation

devmotion
Copy link
Member

As a follow-up to #1551 and #1557, this PR addresses #1544 for Bernoulli, Binomial, and Uniform.

With this PR fit(Uniform{Float32}, ...) etc. will actually estimate a distribution of type Uniform{Float32}, regardless of the observations. One can still use fit(Uniform, ...) if the parameter type should not be fixed but depend on the type of the observations.

@codecov-commenter
Copy link

codecov-commenter commented May 29, 2022

Codecov Report

Merging #1558 (7699b7b) into master (a350622) will not change coverage.
The diff coverage is 92.85%.

@@           Coverage Diff           @@
##           master    #1558   +/-   ##
=======================================
  Coverage   85.52%   85.52%           
=======================================
  Files         128      128           
  Lines        7863     7863           
=======================================
  Hits         6725     6725           
  Misses       1138     1138           
Impacted Files Coverage Δ
src/univariate/discrete/binomial.jl 94.28% <88.88%> (ø)
src/univariate/continuous/uniform.jl 92.20% <100.00%> (ø)
src/univariate/discrete/bernoulli.jl 89.39% <100.00%> (ø)

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 a350622...7699b7b. Read the comment docs.

@matbesancon
Copy link
Member

I agree with this in principal, it was either this solution or a promotion mechanism, but using the specified type param makes more sense when provided

@devmotion devmotion merged commit f889f9e into master May 30, 2022
@devmotion devmotion deleted the dw/fit_bernoulli_binomial branch May 30, 2022 13:18
@gdalle
Copy link

gdalle commented May 30, 2022

Thank you for this @devmotion !

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.

4 participants