Skip to content

Commit e81cebc

Browse files
authored
Merge pull request #943 from JuliaAI/dev
For a 1.0.1 release - Take II
2 parents 5facf00 + f6b7b16 commit e81cebc

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

src/machines.jl

+12-14
Original file line numberDiff line numberDiff line change
@@ -788,18 +788,17 @@ Return the learned parameters for a machine `mach` that has been
788788
789789
This is a named tuple and human-readable if possible.
790790
791-
If `mach` is a machine for a composite model, such as a model
792-
constructed using `@pipeline`, then the returned named tuple has the
793-
composite type's field names as keys. The corresponding value is the
794-
fitted parameters for the machine in the underlying learning network
795-
bound to that model. (If multiple machines share the same model, then the
796-
value is a vector.)
791+
If `mach` is a machine for a composite model, such as a model constructed using the
792+
pipeline syntax `model1 |> model2 |> ...`, then the returned named tuple has the composite
793+
type's field names as keys. The corresponding value is the fitted parameters for the
794+
machine in the underlying learning network bound to that model. (If multiple machines
795+
share the same model, then the value is a vector.)
797796
798797
```julia
799798
using MLJ
800799
@load LogisticClassifier pkg=MLJLinearModels
801800
X, y = @load_crabs;
802-
pipe = @pipeline Standardizer LogisticClassifier
801+
pipe = Standardizer() |> LogisticClassifier()
803802
mach = machine(pipe, X, y) |> fit!
804803
805804
julia> fitted_params(mach).logistic_classifier
@@ -831,18 +830,17 @@ Return the report for a machine `mach` that has been
831830
832831
This is a named tuple and human-readable if possible.
833832
834-
If `mach` is a machine for a composite model, such as a model
835-
constructed using `@pipeline`, then the returned named tuple has the
836-
composite type's field names as keys. The corresponding value is the
837-
report for the machine in the underlying learning network
838-
bound to that model. (If multiple machines share the same model, then the
839-
value is a vector.)
833+
If `mach` is a machine for a composite model, such as a model constructed using the
834+
pipeline syntax `model1 |> model2 |> ...`, then the returned named tuple has the composite
835+
type's field names as keys. The corresponding value is the report for the machine in the
836+
underlying learning network bound to that model. (If multiple machines share the same
837+
model, then the value is a vector.)
840838
841839
```julia
842840
using MLJ
843841
@load LinearBinaryClassifier pkg=GLM
844842
X, y = @load_crabs;
845-
pipe = @pipeline Standardizer LinearBinaryClassifier
843+
pipe = Standardizer() |> LinearBinaryClassifier()
846844
mach = machine(pipe, X, y) |> fit!
847845
848846
julia> report(mach).linear_binary_classifier

src/resampling.jl

-6
Original file line numberDiff line numberDiff line change
@@ -557,12 +557,6 @@ end
557557
round3(x) = x
558558
round3(x::AbstractFloat) = round(x, sigdigits=3)
559559

560-
_short(v) = v
561-
_short(v::Vector{<:Real}) = MLJBase.short_string(v)
562-
_short(v::Vector) = string("[", join(_short.(v), ", "), "]")
563-
_short(::Missing) = missing
564-
565-
566560
const SE_FACTOR = 1.96 # For a 95% confidence interval.
567561

568562
_standard_error(v::AbstractVector{<:Real}) = SE_FACTOR*std(v) / sqrt(length(v) - 1)

src/sources.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The calling behaviour of a `Source` object is this:
4545
Xs(rows=r) = selectrows(X, r) # eg, X[r,:] for a DataFrame
4646
Xs(Xnew) = Xnew
4747
48-
See also: [`@from_network`](@ref), [`sources`](@ref),
48+
See also: [`MLJBase.prefit`](@ref), [`sources`](@ref),
4949
[`origins`](@ref), [`node`](@ref).
5050
5151
"""

0 commit comments

Comments
 (0)