Skip to content

Commit 9f424b6

Browse files
committed
Rel 0.1.0 - Renamed from PSIS.jl
1 parent d7b7d15 commit 9f424b6

8 files changed

Lines changed: 19 additions & 16 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PSIS.jl: Pareto smoothed importance sampling.
1+
# ParetoSmoothedImportanceSampling.jl
22

33
| **Project Status** | **Build Status** |
44
|:-------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
@@ -10,17 +10,17 @@
1010
This package implements model comparison methods as used and explained in StatisticalRethinking (chapter 7).
1111

1212
The most important methods are *Pareto smoothed importance sampling* (PSIS) and
13-
PSIS leave-one-out cross-validation based on the [Matlab package called `PSIS` by Aki Vehtari](https://github.com/avehtari/PSIS.git).
13+
PSIS leave-one-out cross-validation based on the [Matlab package called `PSIS` by Aki Vehtari](https://github.com/avehtari/PSIS.git). The Julia translation has been done by @alvaro1101 (on Github).
1414

15-
The Julia translation has been done by @alvaro1101 (on Github). Updates for Julia v1+, the new Pkg ecosystem and the inclusion of WAIC and pk utilities have been done by Rob J Goedman.
15+
Updates for Julia v1+, the new Pkg ecosystem and the addition of WAIC and pk utilities have been done by Rob J Goedman.
1616

17-
The intention is that PSIS.jl will become part of the [StatisticalRethinking.jl](https://github.com/StatisticalRethinkingJulia/StatisticalRethinking.jl).
17+
ParetoSmoothedImportanceSampling.jl will become part of the [StatisticalRethinking.jl](https://github.com/StatisticalRethinkingJulia/StatisticalRethinking.jl).
1818

1919
### Installation
2020

21-
Once registered, PSIS.jl can be installed with:
21+
Once registered, ParetoSmoothedImportanceSampling.jl can be installed with:
2222
```
23-
Pkg.dev("PSIS")
23+
Pkg.dev("ParetoSmoothedImportanceSampling")
2424
```
2525
Usually I have only a few packages `permanently` installed, e.g.:
2626
```
@@ -79,8 +79,8 @@ The corresponding R code can be found in [R package called
7979
Technometrics, 51:3, 316-325, DOI: 10.1198/tech.2009.08017
8080

8181

82-
[CI-build]: https://github.com/goedman/PSIS.jl/workflows/CI/badge.svg?branch=master
82+
[CI-build]: https://github.com/StatisticalRethinkingJulia/ParetoSmoothedImportanceSampling.jl/workflows/CI/badge.svg?branch=master
8383

84-
[issues-url]: https://github.com/goedman/PSIS.jl/issues
84+
[issues-url]: https://github.com/StatisticalRethinkingJulia/ParetoSmoothedImportanceSampling.jl/issues
8585

8686
[project-status-img]: https://img.shields.io/badge/lifecycle-wip-orange.svg

examples/arsenic/demo_wells.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using StatisticalRethinking
22
using JSON
33
using StanSample
4-
using PSIS
4+
using ParetoSmoothedImportanceSampling
55
#using Statistics
66
using Printf
77
#using StatsPlots
@@ -104,7 +104,9 @@ for cvi in 1:10
104104
nt3 = read_samples(sm3)
105105
# Compute LOO and standard error
106106
log_likt = nt3.log_likt'
107-
kfcvs[cvitst[cvi]] = PSIS.logsumexp(log_likt) .- log(size(log_likt, 1))
107+
n_sam, n_obs = size(log_lik)
108+
kfcvs[cvitst[cvi]] =
109+
reshape(logsumexp(log_likt .- log(n_sam); dims=1), n_obs)
108110
end
109111
end
110112

examples/cars_waic/cars.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using StatisticalRethinking, StanSample, PSIS, RDatasets
1+
using StatisticalRethinking, StanSample
2+
using ParetoSmoothedImportanceSampling, RDatasets
23

34
df = RDatasets.dataset("datasets", "cars")
45

examples/roaches/roaches.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using StatisticalRethinking, StanSample, PSIS
2-
using Printf
1+
using StatisticalRethinking, StanSample
2+
using Printf, ParetoSmoothedImportanceSampling
33

44
ProjDir = @__DIR__
55

notebooks/cars.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using Markdown
55
using InteractiveUtils
66

77
# ╔═╡ b9fc511c-6007-11eb-0c6b-1f6871a40710
8-
using Pkg, DrWatson, PSIS
8+
using Pkg, DrWatson, ParetoSmoothedImportanceSampling
99

1010
# ╔═╡ 20d3ad36-6008-11eb-2f2a-d379b234b0e9
1111
begin

notebooks/roaches.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using Markdown
55
using InteractiveUtils
66

77
# ╔═╡ dcb4d418-5ec2-11eb-29d8-214f38b4d3ae
8-
using Pkg, DrWatson, PSIS
8+
using Pkg, DrWatson, ParetoSmoothedImportanceSampling
99

1010
# ╔═╡ c9e1486c-5e9f-11eb-08ed-671b762dd075
1111
begin

test/test_demo_wells.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using StatisticalRethinking
22
using JSON
33
using StanSample
4-
using PSIS
4+
using ParetoSmoothedImportanceSampling
55
#using Statistics
66
using Printf
77
#using StatsPlots

0 commit comments

Comments
 (0)