Skip to content

Conversation

@NittanyLion
Copy link

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.

@NittanyLion NittanyLion changed the title Pull request/97213a23 Chernoff distribution Dec 13, 2017
@dmbates
Copy link
Contributor

dmbates commented Dec 13, 2017

  • 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, 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.

@NittanyLion
Copy link
Author

NittanyLion commented Dec 13, 2017 via email

@ararslan
Copy link
Member

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.

@NittanyLion
Copy link
Author

NittanyLion commented Dec 13, 2017 via email

@NittanyLion
Copy link
Author

NittanyLion commented Dec 14, 2017 via email

struct AliasTable <: Sampleable{Univariate,Discrete}
accept::Vector{Float64}
alias::Vector{Int}
isampler::SamplerRangeInt{Int,UInt}
Copy link
Member

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

Copy link
Author

@NittanyLion NittanyLion Dec 15, 2017

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.)

@NittanyLion
Copy link
Author

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?

@matbesancon
Copy link
Member

@NittanyLion it seems this PR has unfortunately been forgotten for a while, would you mine merging master to update and fix conflicts?

@matbesancon matbesancon added the feature: new distribution Feature request for a new distribution label Sep 19, 2018
@matbesancon
Copy link
Member

bumping this, we need to close or finish it

@NittanyLion
Copy link
Author

NittanyLion commented Nov 4, 2018 via email

@matbesancon
Copy link
Member

ping @NittanyLion

@eulerkochy
Copy link
Contributor

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!

@matbesancon
Copy link
Member

Yes, please do :)

@eulerkochy
Copy link
Contributor

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?

@matbesancon
Copy link
Member

matbesancon commented Mar 6, 2019 via email

@eulerkochy
Copy link
Contributor

But I can't commit on this branch, can I? I don't have the write-access

@eulerkochy
Copy link
Contributor

Well, I am unable to write to this PR, I tried but it returns 403, which implies Forbidden error. Guess, I'll make a new PR.

@matbesancon
Copy link
Member

You can fork the PR itself

@matbesancon
Copy link
Member

Maybe not optimal, but what I do is:
On my dev version, add a remote fork with the other person's url
Fetch the branch from this one, and then work from there. Once you're done, you can push the result to another PR

@eulerkochy
Copy link
Contributor

Well, I was doing by that method only, but it's returning 403. :(

@eulerkochy
Copy link
Contributor

eulerkochy commented Mar 6, 2019

Ok, I get you. I'll push the result to a different PR, I was missing that!

@eulerkochy eulerkochy mentioned this pull request Mar 6, 2019
@matbesancon
Copy link
Member

Closing this in favour of #840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: new distribution Feature request for a new distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants