Commit Graph

13 Commits

Author SHA1 Message Date
argusdusty
1dd194f95b stat/distuv: correct Gamma Mode doc comment 2024-06-12 18:09:49 +09:30
argusdusty
35bb474ac5 stat/distuv: correct Gamma Mode() and LogProb(0)/Prob(0) for alpha <= 1 2024-06-12 18:09:49 +09:30
Dan Kortschak
5f0141ca4c all: run gofmt and generate all packages
Changes made in dsp/fourier/internal/fftpack break the formatting used
there, so these are reverted. There will be complaints in CI.

[git-generate]
gofmt -w .
go generate gonum.org/v1/gonum/blas
go generate gonum.org/v1/gonum/blas/gonum
go generate gonum.org/v1/gonum/unit
go generate gonum.org/v1/gonum/unit/constant
go generate gonum.org/v1/gonum/graph/formats/dot
go generate gonum.org/v1/gonum/graph/formats/rdf
go generate gonum.org/v1/gonum/stat/card

git checkout -- dsp/fourier/internal/fftpack
2022-08-06 07:05:17 +09:30
Mark Canning
abbcebec78 stat/distuv: improve Gamma.Rand performances for 0.2 <= alpha < 1
The paper cited in the comment for the a > 1 (now a >= smallAlphaThresh) case mentions this approach as a small note on the final page, so there is no need to update the comments.

I also looked into numpy's logic for this case, but a) couldn't determine a source for it, except for what appears to be a more complex variant (Algorithm GS), and b) it's slightly slower than this method, at least for a >= 0.2.

benchstat:

```
name              old time/op  new time/op  delta
GammaRand/case_0  89.4ns ± 5%  90.2ns ± 3%     ~     (p=0.084 n=20+20)
GammaRand/case_1   212ns ± 3%   101ns ± 5%  -52.28%  (p=0.000 n=20+20)
GammaRand/case_2  25.4ns ± 3%  25.3ns ± 4%     ~     (p=0.369 n=20+20)
GammaRand/case_3  48.6ns ± 6%  48.8ns ± 6%     ~     (p=0.702 n=20+20)
GammaRand/case_4  47.1ns ± 6%  47.6ns ± 3%     ~     (p=0.147 n=20+20)
```
2020-09-18 14:34:07 +02:00
Mark Canning
8c7eded4eb stat/distuv: improve Gamma.Rand performances 2020-09-17 10:27:47 +02:00
Roman Werpachowski
ccd21328c4 stat/distuv: Provide full test coverage for Gamma distribution and small fixes (#1357)
stat/distuv: provide full test coverage for Gamma distribution and small fixes

* Removed redundant calculations in the small alpha version of Rand.
* Lowered the threshold for small alpha to 0.2 in accordance with
  https://www4.stat.ncsu.edu/~rmartin/Codes/rgamss.R.
* Added the option to pass integration bounds to PDF normalisation check.
* Other small fixes.
2020-06-16 01:26:05 +01:00
Brendan Tracey
32493fb130 mathext: Rename GammaInc and friends to GammaIncReg (#782)
Fixes #470.
2019-01-05 09:43:13 +00:00
Dan Kortschak
4eed5b6553 all: replace publicly facing *rand.Rand with rand.Source 2018-05-03 07:40:18 +09:30
Brendan Tracey
12862f70a9 stat/all: Change all Source to Src (#355)
* stat/all: Change all Source to Src

Fixes original gonum/stat #147
2017-12-19 05:53:59 -07:00
kortschak
fa0c5aa7bc all: use golang.org/x/exp/rand instead of math/rand 2017-11-17 11:52:34 +10:30
kortschak
805531d142 all: change capitalization of gonum in license header 2017-11-02 06:54:08 +10:30
Brendan Tracey
d33397aa65 all: change import paths 2017-05-23 00:03:03 -06:00
Brendan Tracey
61c782d390 stat: imported stat as a subtree 2017-05-23 00:02:52 -06:00