Skip to content

Commit

Permalink
Merge pull request #943 from JuliaAI/dev
Browse files Browse the repository at this point in the history
For a 1.0.1 release - Take II
  • Loading branch information
ablaom authored Sep 27, 2023
2 parents 5facf00 + f6b7b16 commit e81cebc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 deletions.
26 changes: 12 additions & 14 deletions src/machines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -788,18 +788,17 @@ Return the learned parameters for a machine `mach` that has been
This is a named tuple and human-readable if possible.
If `mach` is a machine for a composite model, such as a model
constructed using `@pipeline`, then the returned named tuple has the
composite type's field names as keys. The corresponding value is the
fitted parameters for the machine in the underlying learning network
bound to that model. (If multiple machines share the same model, then the
value is a vector.)
If `mach` is a machine for a composite model, such as a model constructed using the
pipeline syntax `model1 |> model2 |> ...`, then the returned named tuple has the composite
type's field names as keys. The corresponding value is the fitted parameters for the
machine in the underlying learning network bound to that model. (If multiple machines
share the same model, then the value is a vector.)
```julia
using MLJ
@load LogisticClassifier pkg=MLJLinearModels
X, y = @load_crabs;
pipe = @pipeline Standardizer LogisticClassifier
pipe = Standardizer() |> LogisticClassifier()
mach = machine(pipe, X, y) |> fit!
julia> fitted_params(mach).logistic_classifier
Expand Down Expand Up @@ -831,18 +830,17 @@ Return the report for a machine `mach` that has been
This is a named tuple and human-readable if possible.
If `mach` is a machine for a composite model, such as a model
constructed using `@pipeline`, then the returned named tuple has the
composite type's field names as keys. The corresponding value is the
report for the machine in the underlying learning network
bound to that model. (If multiple machines share the same model, then the
value is a vector.)
If `mach` is a machine for a composite model, such as a model constructed using the
pipeline syntax `model1 |> model2 |> ...`, then the returned named tuple has the composite
type's field names as keys. The corresponding value is the report for the machine in the
underlying learning network bound to that model. (If multiple machines share the same
model, then the value is a vector.)
```julia
using MLJ
@load LinearBinaryClassifier pkg=GLM
X, y = @load_crabs;
pipe = @pipeline Standardizer LinearBinaryClassifier
pipe = Standardizer() |> LinearBinaryClassifier()
mach = machine(pipe, X, y) |> fit!
julia> report(mach).linear_binary_classifier
Expand Down
6 changes: 0 additions & 6 deletions src/resampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,6 @@ end
round3(x) = x
round3(x::AbstractFloat) = round(x, sigdigits=3)

_short(v) = v
_short(v::Vector{<:Real}) = MLJBase.short_string(v)
_short(v::Vector) = string("[", join(_short.(v), ", "), "]")
_short(::Missing) = missing


const SE_FACTOR = 1.96 # For a 95% confidence interval.

_standard_error(v::AbstractVector{<:Real}) = SE_FACTOR*std(v) / sqrt(length(v) - 1)
Expand Down
2 changes: 1 addition & 1 deletion src/sources.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The calling behaviour of a `Source` object is this:
Xs(rows=r) = selectrows(X, r) # eg, X[r,:] for a DataFrame
Xs(Xnew) = Xnew
See also: [`@from_network`](@ref), [`sources`](@ref),
See also: [`MLJBase.prefit`](@ref), [`sources`](@ref),
[`origins`](@ref), [`node`](@ref).
"""
Expand Down

0 comments on commit e81cebc

Please sign in to comment.