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

Minor update to mixture docs. #2786

Merged
merged 1 commit into from
Jan 12, 2018
Merged

Minor update to mixture docs. #2786

merged 1 commit into from
Jan 12, 2018

Conversation

ericmjl
Copy link
Member

@ericmjl ericmjl commented Jan 11, 2018

Just wanted to make it super clear to a user that they only have to pass in sd or tau but not both.

Just wanted to make it super clear to a user that they only have to pass in sd or tau but not both.
@ColCarroll
Copy link
Member

I like this – there are also a few other distributions that are parameterized similarly: Normal, LogNormal, ChiSquared, HalfNormal, StudentT, HalfStudentT, AR, and GaussianRandomWalk, at least (grepping for get_tau_sd), so I might give this a day for anyone else to comment before merging in case there are strong feelings on the wording (I don't know any convention for documenting such either/or variables), and then open an issue to make the same change on those.

@fonnesbeck fonnesbeck merged commit f6d96ff into pymc-devs:master Jan 12, 2018
@ericmjl ericmjl deleted the patch-1 branch January 12, 2018 18:13
@ericmjl
Copy link
Member Author

ericmjl commented Jan 12, 2018

@fonnesbeck if this is okay for wording, I will work on PRs for the other distributions. Please let me know if you prefer an, ahem, alternative parameterization of words. 😄

@fonnesbeck
Copy link
Member

What about blending it with the docstring, such as:

sd : array of floats
        the component standard deviations (only required if tau is not specified)
tau : array of floats
        the component precision (only required if sd is not specified)

To make it more concrete, an Example section could be added to each, along the lines of what is in some other classes:

Examples
--------
with pm.Model():
    x = pm.Normal('x', mu=0, sd=10)

@ericmjl ericmjl mentioned this pull request Jan 12, 2018
7 tasks
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.

3 participants