-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
@zackchase @madjam @bhavinthaker review |
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.
Looks good @asmushetzel . Few minor formatting suggestions.
src/operator/tensor/sample_op.cc
Outdated
.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). |
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.
alpha -> alpha
beta -> beta
So that we are following a consistent formatting for these distribution parameters.
src/operator/tensor/sample_op.cc
Outdated
.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). |
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.
lambda -> lambda
src/operator/tensor/sample_op.cc
Outdated
.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). |
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.
same here.
src/operator/tensor/sample_op.cc
Outdated
.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). |
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.
k -> k
p -> p
src/operator/tensor/sample_op.cc
Outdated
.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 |
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.
mu, alpha, 1/k and k
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.
Incorporated the suggested improvements.
Tremendous! Thank you! |
* documentation changes for random sampling operators * added myself to contributor list * lint fixes * used italic font for variables according to review comment
* documentation changes for random sampling operators * added myself to contributor list * lint fixes * used italic font for variables according to review comment
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