JuliaAI / MLJTuning.jl

Hyperparameter optimization algorithms for use in the MLJ machine learning framework
MIT License
66 stars 12 forks source link

delete multiple inclusion of same file #79

Closed OkonSamuel closed 4 years ago

OkonSamuel commented 4 years ago

This PR

  1. deletes multiple inclusion of some files in at MLJTuning/src/MLJTuning.jl
  2. changes type annotation of next field in ExplicitState struct. i.e
    
    struct ExplicitState{R,N}
    range::R # a model-generating iterator
    next::Union{Nothing, N} # to hold output of `iterate(range)`
    end

ExplicitState(r::R, ::Nothing) where R = ExplicitState{R,Nothing}(r,nothing) ExplictState(r::R, n::N) where {R,N} = ExplicitState{R,Union{Nothing,N}}(r,n)

was replaced by
```julia
struct ExplicitState{R, N}
    range::R # a model-generating iterator
    next::N # to hold output of `iterate(range)`
end

ExplictState(r::R, n::N) where {R,N} = ExplicitState{R, Union{Nothing, N}}(r, n)

This was done becase ExplicitState is an immutable struct and Union{Nothing, Nothing}==Nothing

@ablaom. You could merge this and tag a new release if your satisfied with the second change.

ablaom commented 4 years ago

Awesome. Thanks for diagnosing this @OkonSamuel