Skip to content

Commit

Permalink
Replace == with ≈ in README for consistency (#131)
Browse files Browse the repository at this point in the history
* fix for #129

* fixed a value in the README
  • Loading branch information
torfjelde committed Aug 19, 2020
1 parent 290c4ad commit 3a2b1e4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ julia> dist = Beta(2, 2)
Beta{Float64}=2.0, β=2.0)

julia> x = rand(dist)

0.7472542331020509

julia> y = link(dist, x)
Expand All @@ -62,9 +61,9 @@ julia> y = link(dist, x)

```julia
julia> z = invlink(dist, y)
0.6543406780096065
0.7472542331020509

julia> x == z
julia> x z
true
```

Expand Down Expand Up @@ -118,10 +117,10 @@ julia> y = b(x)
-0.5369949942509267
```

In this case we see that `bijector(d::Distribution)` returns the corresponding constrained-to-unconstrained bijection for `Beta`, which indeed is a `Logit` with `a = 0.0` and `b = 1.0`. The resulting `Logit <: Bijector` has a method `(b::Logit)(x)` defined, allowing us to call it just like any other function. Comparing with the above example, `b(x) == link(dist, x)`. Just to convince ourselves:
In this case we see that `bijector(d::Distribution)` returns the corresponding constrained-to-unconstrained bijection for `Beta`, which indeed is a `Logit` with `a = 0.0` and `b = 1.0`. The resulting `Logit <: Bijector` has a method `(b::Logit)(x)` defined, allowing us to call it just like any other function. Comparing with the above example, `b(x) link(dist, x)`. Just to convince ourselves:

```julia
julia> b(x) == link(dist, x)
julia> b(x) link(dist, x)
true
```

Expand All @@ -136,7 +135,7 @@ Inverse{Logit{Float64},0}(Logit{Float64}(0.0, 1.0))
julia> b⁻¹(y)
0.3688868996596376

julia> b⁻¹(y) == invlink(dist, y)
julia> b⁻¹(y) invlink(dist, y)
true
```

Expand Down

0 comments on commit 3a2b1e4

Please sign in to comment.