Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Doc sample change #6094

Merged
merged 7 commits into from
May 4, 2017
Merged

Doc sample change #6094

merged 7 commits into from
May 4, 2017

Conversation

asmushetzel
Copy link
Contributor

Revised documentation including providing examples in response to issue #6000 for following operators:

random_uniform
random_normal
random_gamma
random_exponential
random_poisson
random_negative_binomial
random_generalized_negative_binomial

sample_uniform
sample_normal
sample_gamma
sample_exponential
sample_poisson
sample_negative_binomial
sample_generalized_negative_binomial

Screenshots attached
screen shot 2017-05-03 at 10 46 21 pm
screen shot 2017-05-03 at 10 46 30 pm
screen shot 2017-05-03 at 10 46 40 pm
screen shot 2017-05-03 at 10 46 48 pm
screen shot 2017-05-03 at 10 46 54 pm
screen shot 2017-05-03 at 10 47 01 pm
screen shot 2017-05-03 at 10 47 07 pm
screen shot 2017-05-03 at 10 47 28 pm
screen shot 2017-05-03 at 10 47 34 pm
screen shot 2017-05-03 at 10 47 38 pm
screen shot 2017-05-03 at 10 47 43 pm
screen shot 2017-05-03 at 10 47 48 pm
screen shot 2017-05-03 at 10 47 54 pm
screen shot 2017-05-03 at 10 47 59 pm
screen shot 2017-05-03 at 10 48 24 pm

@nswamy
Copy link
Member

nswamy commented May 3, 2017

@zackchase @madjam @bhavinthaker review

@madjam madjam added the Doc label May 4, 2017
Copy link
Contributor

@madjam madjam left a comment

Choose a reason for hiding this comment

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

Looks good @asmushetzel . Few minor formatting suggestions.

.describe("Sample a gamma distribution")
.describe(R"code(Draw random samples from a gamma distribution.

Samples are distributed according to a gamma distribution parametrized by alpha (shape) and beta (scale).
Copy link
Contributor

Choose a reason for hiding this comment

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

alpha -> alpha
beta -> beta

So that we are following a consistent formatting for these distribution parameters.

.describe("Sample an exponential distribution")
.describe(R"code(Draw random samples from an exponential distribution.

Samples are distributed according to an exponential distribution parametrized by lambda (rate).
Copy link
Contributor

Choose a reason for hiding this comment

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

lambda -> lambda

.describe("Sample a Poisson distribution")
.describe(R"code(Draw random samples from a Poisson distribution.

Samples are distributed according to a Poisson distribution parametrized by lambda (rate).
Copy link
Contributor

Choose a reason for hiding this comment

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

same here.

.describe(R"code(Draw random samples from a negative binomial distribution.

Samples are distributed according to a negative binomial distribution parametrized by
k (limit of unsuccessful experiments) and p (failure probability in each experiment).
Copy link
Contributor

Choose a reason for hiding this comment

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

k -> k
p -> p

.describe(R"code(Draw random samples from a generalized negative binomial distribution.

Samples are distributed according to a generalized negative binomial distribution parametrized by
mu (mean) and alpha (dispersion). alpha is defined as 1/k where k is the failure limit of the
Copy link
Contributor

Choose a reason for hiding this comment

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

mu, alpha, 1/k and k

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Incorporated the suggested improvements.

@madjam madjam merged commit 400498d into apache:master May 4, 2017
@domdivakaruni
Copy link
Contributor

Tremendous! Thank you!

rishita pushed a commit to rishita/mxnet that referenced this pull request May 10, 2017
* documentation changes for random sampling operators

* added myself to contributor list

* lint fixes

* used italic font for variables according to review comment
Guneet-Dhillon pushed a commit to Guneet-Dhillon/mxnet that referenced this pull request Sep 13, 2017
* documentation changes for random sampling operators

* added myself to contributor list

* lint fixes

* used italic font for variables according to review comment
@asmushetzel asmushetzel deleted the doc_sample_change branch October 29, 2017 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants