Skip to content

Commit

Permalink
Merge pull request #884 from JuliaAI/dev
Browse files Browse the repository at this point in the history
For a 0.21.6 release
  • Loading branch information
ablaom authored Feb 27, 2023
2 parents c51e789 + 8d2b4a7 commit c4d6309
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJBase"
uuid = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
authors = ["Anthony D. Blaom <[email protected]>"]
version = "0.21.5"
version = "0.21.6"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down
2 changes: 1 addition & 1 deletion src/composition/learning_networks/signatures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const DOC_NETWORK_INTERFACES =
Here `yhat`, `Xsmall`, `W` and `loss_node` are nodes in the network.
The keys of the signature are always one of the following:
The keys of the learning network interface always one of the following:
- The name of an operation, such as `:predict`, `:predict_mode`, `:transform`,
`:inverse_transform`. See "Operation keys" below.
Expand Down
10 changes: 5 additions & 5 deletions test/hyperparam/one_dimensional_range_methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using Statistics
using StableRNGs

rng = StableRNG(66600099)
stable_rng() = StableRNG(123)

const Dist = Distributions

Expand Down Expand Up @@ -182,17 +183,16 @@ end
origin=5, unit=1) # origin and unit not relevant here
s = MLJBase.sampler(r, Dist.Normal())

Random.seed!(1);
v = rand(s, 1000)
rng = stable_rng()
v = rand(rng, s, 1000)
@test all(x >= 0.2 for x in v)
@test abs(minimum(v)/0.2 - 1) <= 0.02

rng = _default_rng(1);
rng = stable_rng()
@test rand(rng, s, 1000) == v

q = quantile(v, 0.0:0.1:1.0)
Random.seed!(1);
v2 = filter(x -> x>=0.2, rand(Dist.Normal(), 3000))[1:1000]
v2 = filter(x -> x>=0.2, rand(stable_rng(), Dist.Normal(), 3000))[1:1000]
q2 = quantile(v2, 0.0:0.1:1.0)
@test all(x -> x1.0, q ./ q2)
end
Expand Down

0 comments on commit c4d6309

Please sign in to comment.