Skip to content

Fix haddock for negativeBinomial, remove references to original bos repo #217

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

Merged
merged 3 commits into from
Apr 30, 2025

Conversation

jhrcek
Copy link
Contributor

@jhrcek jhrcek commented Apr 10, 2025

No description provided.

@@ -166,14 +166,14 @@ directEntropy d =
dropWhile (>= -m_epsilon) $
[ let x = probability d k in x * log x | k <- [0..]]

-- | Construct negative binomial distribution. Number of failures /r/
-- | Construct negative binomial distribution. Number of successes /r/
Copy link
Contributor Author

@jhrcek jhrcek Apr 10, 2025

Choose a reason for hiding this comment

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

This got me really confused because it's in conflict with the -- ^ Number of successes. on the lines below.

This is even more confusing, because the "output" of the distribution is probability of number of failures before we get r-th success.
But here, r is the (input) parameter of the distribution representing the number of successes that need to occur overall.

@@ -151,7 +151,7 @@ complCumulative (NBD r p) x
| k < 0 = 1
| otherwise = incompleteBeta (fromIntegral (k+1)) r (1 - p)
where
k = (floor x)::Integer
k = floor x :: Integer
Copy link
Contributor Author

@jhrcek jhrcek Apr 10, 2025

Choose a reason for hiding this comment

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

Just an hlint warning fix here. Note that k = floor x :: Integer is already used on line 145 above, so this makes the code a bit more consistent.

@jhrcek jhrcek changed the title Fix haddock for negativeBinomial Fix haddock for negativeBinomial, remove references to original bos repo Apr 10, 2025

* `git clone git://github.com/bos/statistics.git`

There's also a [Mercurial mirror](https://bitbucket.org/bos/statistics):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gives me 404 repository not found

@@ -36,14 +36,16 @@ category: Math, Statistics

extra-source-files:
README.markdown
changelog.md
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixing cabal check warning:

Warning: [doc-place] Please consider moving the file 'changelog.md' from the
'extra-source-files' section of the .cabal file to the section
'extra-doc-files'.

@jhrcek
Copy link
Contributor Author

jhrcek commented Apr 27, 2025

Hello @Shimuuar
could you please take a look at this PR?
Not urgent, I'm just trying to reduce number of unmerged PRs of mine 🙂

@Shimuuar Shimuuar merged commit 97b3e45 into haskell:master Apr 30, 2025
@Shimuuar
Copy link
Collaborator

Thank you, for all boring cleanup work and documentation fixes! PR looks good sorry for the wait

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.

2 participants