-
Notifications
You must be signed in to change notification settings - Fork 431
Chernoff distribution #695
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
Conversation
|
|
Thanks Douglas.
Ok, I'll make those changes when I get a chance. Will take a little
while. Meanwhile, should I cancel the pull request?
Joris
…On Wed, Dec 13, 2017 at 4:35 PM, Douglas Bates ***@***.***> wrote:
-
It looks as if you are using an airyprime function in chernoff_p. If
so it would be better to see if you can get the value from a function in
the SpecialFunctions package
<https://github.com/JuliaMath/SpecialFunctions.jl>, which is already
being used by this package.
-
the standard indentation in Julia packages is four spaces
-
generally we would add unit tests (in the test subdirectory) of the
various functions when adding a distribution.
-
note the style of documentation in other source files. The quoted
blocks (blocks beginning and ending with lines consisting only of triple
double-quote characters) are incorporated into the package documentation.
-
Julia has a cube-root function, cbrt
-
checks for x == 0 can be written iszero(x)
-
I am happy to respond to questions, via email if you wish, on how to
change this PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#695 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APtv5qnIaWEWlRsl9VCY5XtTailaDVTiks5tAEM2gaJpZM4RBKiW>
.
|
|
No need to cancel the pull request. You can just push your changes to this branch as you make them and the pull request will be updated. |
|
As an aside, the airyprime references are simply constants that I
precomputed using the SpecialFunctions package to improve computation
speed. There is no computation of airy functions or their derivatives.
…On Wed, Dec 13, 2017 at 4:35 PM, Douglas Bates ***@***.***> wrote:
-
It looks as if you are using an airyprime function in chernoff_p. If
so it would be better to see if you can get the value from a function in
the SpecialFunctions package
<https://github.com/JuliaMath/SpecialFunctions.jl>, which is already
being used by this package.
-
the standard indentation in Julia packages is four spaces
-
generally we would add unit tests (in the test subdirectory) of the
various functions when adding a distribution.
-
note the style of documentation in other source files. The quoted
blocks (blocks beginning and ending with lines consisting only of triple
double-quote characters) are incorporated into the package documentation.
-
Julia has a cube-root function, cbrt
-
checks for x == 0 can be written iszero(x)
-
I am happy to respond to questions, via email if you wish, on how to
change this PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#695 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APtv5qnIaWEWlRsl9VCY5XtTailaDVTiks5tAEM2gaJpZM4RBKiW>
.
|
|
Ok, I have uploaded my changes. There are significant changes to the
chernoff.jl source file, I've added a chernoff.jl test file, and made
changes to src/univariates.jl, test/runtests.jl, and src/Distributions.jl .
Pkg.test("Distributions") runs fine. I've incorporated all suggested
changes.
The only trouble I had was with uploading / the github system. I ended up
using the web interface to make changes, which is suboptimal since it is
more likely that I'll make a mistake. I'm not sure what went wrong
…On Wed, Dec 13, 2017 at 4:45 PM, Alex Arslan ***@***.***> wrote:
No need to cancel the pull request. You can just push your changes to this
branch as you make them and the pull request will be updated.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#695 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APtv5neOTAWe1zOmNJrORgcrijByVKcuks5tAEWHgaJpZM4RBKiW>
.
|
src/samplers/categorical.jl
Outdated
| struct AliasTable <: Sampleable{Univariate,Discrete} | ||
| accept::Vector{Float64} | ||
| alias::Vector{Int} | ||
| isampler::SamplerRangeInt{Int,UInt} |
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.
Both of these blocks will need to be terminated with end
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.
Thanks. Still doesn't compile in v0.7 since it still wants to know the definition of RangeGeneratorInt{Int,UInt} in v0.7, which makes sense. Clearly have to call it a day. (Just wanted to make a cheap change to see if there were other issues.)
|
The code compiles fine on 0.6. It fails on nightly due to an issue unrelated to the Distributions package. What, if anything, should I do now? |
|
@NittanyLion it seems this PR has unfortunately been forgotten for a while, would you mine merging master to update and fix conflicts? |
|
bumping this, we need to close or finish it |
|
Ok, will do when I get a chance. Hope to have time around Christmas.
…On Sun, Nov 4, 2018, 11:14 AM Mathieu Besançon ***@***.*** wrote:
bumping this, we need to close or finish it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#695 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APtv5tVRACPO3JN5sBVbwTlvQqCvBfggks5urxJUgaJpZM4RBKiW>
.
|
|
ping @NittanyLion |
|
Can I carry forward this PR? Looks like a lot of work has already been done, it would be a waste of human effort to let all of this go in vain! |
|
Yes, please do :) |
|
On a first glance, the code seems badly formated, and there have been un-necessary |
|
Both are ok. If it's just about formatting and imports, starting from this
base seems reasonable.
…On Wed, Mar 6, 2019, 12:53 Koustav Chowdhury ***@***.***> wrote:
On a first glance, the code seems badly formated, and there have been
un-necessary imports. Will try to go through the code, and start working
on a fresh PR. Is that alright?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#695 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHRRsuG7pe4cJC_s5I5aJV9m5LwRw8sdks5vT6w8gaJpZM4RBKiW>
.
|
|
But I can't commit on this branch, can I? I don't have the write-access |
|
Well, I am unable to write to this PR, I tried but it returns |
|
You can fork the PR itself |
|
Maybe not optimal, but what I do is: |
|
Well, I was doing by that method only, but it's returning 403. :( |
|
Ok, I get you. I'll |
|
Closing this in favour of #840 |
I've added code to compute the Chernoff distribution; see chernoff.jl header for references.
Since this is my first submission, I'm sure that there are a number of infelicities in terms of integration and such. Please advise.