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
WIP - triangular distribution #1646
WIP - triangular distribution #1646
Conversation
Where's the tests? - Adding WIP to flag this as it needs a test to be added. |
tt.log(2 * (value - lower) / ((upper - lower) * (c - lower))), | ||
tt.switch(alltrue_elemwise([value == c]), tt.log(2 / (upper - lower)), | ||
tt.switch(alltrue_elemwise([c < value, value <= upper]), | ||
tt.log(2 * (upper - value) / ((upper - lower) * (upper - c))), np.inf))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New new-line.
|
||
|
||
class Triangular(Continuous): | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc-string could be improved, see the other doc-strings that include the support of the parameters as well a latex string of the math.
@springcoil sorry, i am new in helping in this repository. What are the tests that should be included? where do i find them and how do i run them? |
hey @jimenofonseca -- check out To run the tests, you can either use docker (see docs!), or assuming everything is where it should be, |
@ColCarroll thanks, the test runs now, I hope this is the way to use it. please check it out. @twiecki I am not used to Latec and the structure of the PyMC3 documentation . Would you mind improving the Doc-string? |
@@ -24,6 +24,7 @@ | |||
from .continuous import ExGaussian | |||
from .continuous import VonMises | |||
from .continuous import SkewNormal | |||
from .continuous import Triangular |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll need to add 'Triangular'
to the __all__
list in this file as well -- should fix the test error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!, thank you
@jimenofonseca I resolved a merge conflict, make sure to pull. |
@ColCarroll @twiecki so i guess it is ready now? :-) |
thanks @jimenofonseca! |
Hmm, maybe I'm writing too late. I see there is no transform for Triangular distribution, Is it ok? |
@ferrine you're right, good catch. |
Docstring can be better also |
@jimenofonseca can you add those? |
Sorry, what is transform of Triangular?
On 25 Jan 2017, at 22:57, Thomas Wiecki <notifications@github.com<mailto:notifications@github.com>> wrote:
@jimenofonseca<https://github.com/JIMENOFONSECA> can you add those?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1646 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AIjrgn59hzGpyYX4uWUzgwbhH8LSd2qxks5rV2GqgaJpZM4LcZws>.
|
@jimenofonseca I thing the same as for Uniform will fit there |
You mean the doc string?, if so i do not do latec and will need somebody to contribute this part i can provide the equations in python language..
On 25 Jan 2017, at 23:12, Maxim Kochurov <notifications@github.com<mailto:notifications@github.com>> wrote:
@jimenofonseca<https://github.com/JIMENOFONSECA> I thing the same as for Uniform<https://github.com/architecture-building-systems/pymc3/blob/833d1cb45df6a113c757d3a0ba27a5559b39eb67/pymc3/distributions/continuous.py#L105> will fit there
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1646 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AIjrgpAX7BApypWitfNA7YK0bG0VB4Dwks5rV2ZvgaJpZM4LcZws>.
|
OK, but please add the transform, which you can gather from the Uniform.
…On Jan 26, 2017 1:39 AM, "JIMENOFONSECA" ***@***.***> wrote:
You mean the doc string?, if so i do not do latec and will need somebody
to contribute this part i can provide the equations in python language..
On 25 Jan 2017, at 23:12, Maxim Kochurov ***@***.***<mailto:
***@***.***>> wrote:
@jimenofonseca<https://github.com/JIMENOFONSECA> I thing the same as for
Uniform<https://github.com/architecture-building-systems/pymc3/blob/
833d1cb/pymc3/
distributions/continuous.py#L105> will fit there
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://github.com/
pymc-devs/pymc#1646#issuecomment-275133615>, or mute the thread<
https://github.com/notifications/unsubscribe-auth/
AIjrgpAX7BApypWitfNA7YK0bG0VB4Dwks5rV2ZvgaJpZM4LcZws>.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1646 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AApJmLKnGREPiPxYHaOMy21rLJ9FRQnLks5rV-s0gaJpZM4LcZws>
.
|
Hi, If I upgrade Pymc3, can I get Triangular distribution, in it? |
Yes, if you install the master. |
This PR solves issue #1578. Tests in PyMC3 need to pass first.