Skip to content

Commit

Permalink
Merge pull request #162 from alan-turing-institute/dev
Browse files Browse the repository at this point in the history
For 0.10.1 release
  • Loading branch information
ablaom authored Jan 15, 2020
2 parents 1d229db + 879b743 commit 1044035
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 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.10.0"
version = "0.10.1"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down
3 changes: 2 additions & 1 deletion src/one_dimensional_range_methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ range constructor, in the case of a `NominalRange`.
iterator(r::ParamRange, n::Integer, rng::AbstractRNG) =
StatsBase.sample(rng, iterator(r, n), n, replace=false)

iterator(r::NominalRange, n::Integer) = collect(r.values[1:n])
iterator(r::NominalRange, n::Integer) =
collect(r.values[1:min(n, length(r.values))])
iterator(r::NominalRange) = collect(r.values)
iterator(r::NominalRange, rng::AbstractRNG) =
iterator(r, length(r.values), rng)
Expand Down
10 changes: 7 additions & 3 deletions src/resampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,6 @@ mutable struct Resampler{S,M<:Supervised} <: Supervised
repeats::Int
end

MLJBase.package_name(::Type{<:Resampler}) = "MLJBase"
MLJBase.is_wrapper(::Type{<:Resampler}) = true
MLJBase.supports_weights(::Type{<:Resampler{<:Any,M}}) where M =
supports_weights(M)
Expand Down Expand Up @@ -782,8 +781,13 @@ function MLJBase.update(resampler::Resampler{Holdout},

end

MLJBase.input_scitype(::Type{<:Resampler{S,M}}) where {S,M} = MLJBase.input_scitype(M)
MLJBase.target_scitype(::Type{<:Resampler{S,M}}) where {S,M} = MLJBase.target_scitype(M)
MLJBase.input_scitype(::Type{<:Resampler{S,M}}) where {S,M} =
MLJBase.input_scitype(M)
MLJBase.target_scitype(::Type{<:Resampler{S,M}}) where {S,M} =
MLJBase.target_scitype(M)
MLJBase.package_name(::Type{<:Resampler}) = "MLJBase"

MLJBase.load_path(::Type{<:Resampler}) = "MLJBase.Resampler"

evaluate(resampler::Resampler, fitresult) = fitresult

Expand Down

0 comments on commit 1044035

Please sign in to comment.