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 from_tau and to_tau functions to continuous module #113

Merged
merged 3 commits into from
Nov 25, 2022

Conversation

aleicazatti
Copy link
Collaborator

@aleicazatti aleicazatti commented Nov 25, 2022

To define both functions only once in the library, close #112.

@aleicazatti aleicazatti changed the title Add _from_tau and _to_tau to Continouos base class Add _from_tau and _to_tau to Continuous base class Nov 25, 2022
@aloctavodia
Copy link
Contributor

I think the functions should be inside the continuous module, instead of being part of the base class. Mostly because not all continuous distributions need those methods.

@aleicazatti aleicazatti changed the title Add _from_tau and _to_tau to Continuous base class Add TauSigma base class for tau sigma interconversion Nov 25, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #113 (b843666) into main (498fee8) will decrease coverage by 0.20%.
The diff coverage is 84.61%.

@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
- Coverage   77.38%   77.17%   -0.21%     
==========================================
  Files          16       16              
  Lines        1835     1827       -8     
==========================================
- Hits         1420     1410      -10     
- Misses        415      417       +2     
Impacted Files Coverage Δ
preliz/distributions/continuous.py 97.89% <84.61%> (-0.27%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -16,6 +16,26 @@
eps = np.finfo(float).eps


class TauSigma:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to define a class, just define the two functions and call them from within each distribution you need to.

@aleicazatti aleicazatti changed the title Add TauSigma base class for tau sigma interconversion Add from_tau and to_tau functions to continuous module, close #112 Nov 25, 2022
@aleicazatti aleicazatti changed the title Add from_tau and to_tau functions to continuous module, close #112 Add from_tau and to_tau functions to continuous module Nov 25, 2022
@aloctavodia aloctavodia merged commit b499065 into arviz-devs:main Nov 25, 2022
@aleicazatti aleicazatti deleted the FromTauToTau branch November 25, 2022 20:11
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.

Define _from_tau and _to_tau only once
3 participants