Skip to content

Commit

Permalink
Merge pull request #439 from alan-turing-institute/dev
Browse files Browse the repository at this point in the history
For a 0.15.4 release
  • Loading branch information
ablaom authored Nov 4, 2020
2 parents c58bcfc + 68c14a7 commit 23407a4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 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.15.3"
version = "0.15.4"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand Down
3 changes: 1 addition & 2 deletions src/machines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,7 @@ keyword | values | default
`format` | `:julia_serialize`, `:BSON` | `:julia_serialize`
`compression` | `:gzip`, `:none` | `:none`
See (see
[https://github.com/invenia/JLSO.jl](https://github.com/invenia/JLSO.jl)
See [https://github.com/invenia/JLSO.jl](https://github.com/invenia/JLSO.jl)
for details.
Any additional keyword arguments are passed to model-specific
Expand Down
7 changes: 5 additions & 2 deletions src/measures/continuous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@ metadata_measure(LogCosh;
supports_weights = false,
docstring = "log cosh loss; aliases: `log_cosh`.")

function (log_cosh::LogCosh)(ŷ::Vec{<:Real}, y::Vec{<:Real})
_softplus(x::T) where T<:Real = x > zero(T) ? x + log1p(exp(-x)) : log1p(exp(x))
_log_cosh(x::T) where T<:Real = x + _softplus(-2x) - log(convert(T, 2))

function (log_cosh::LogCosh)(ŷ::Vec{<:T}, y::Vec{<:T}) where T <:Real
check_dimensions(ŷ, y)
return log.(cosh.(ŷ-y))
return _log_cosh.(ŷ - y)
end
2 changes: 1 addition & 1 deletion src/resampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ function MLJBase.update(resampler::Resampler{Holdout},
_acceleration,
false)

report = NamedTuple
report = NamedTuple()

return fitresult, cache, report

Expand Down

0 comments on commit 23407a4

Please sign in to comment.