From 6e38ccc4b45f7248818301b044ec18beeded5957 Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Tue, 26 Nov 2024 16:09:43 +0100 Subject: [PATCH] use @example instead of jldoctest --- docs/make.jl | 2 +- src/mlj_interface.jl | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index cc3684e..234e065 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,7 +1,7 @@ using Maxnet using Documenter -DocMeta.setdocmeta!(Maxnet, :DocTestSetup, :(using Maxnet; using MLJBase: Multiclass); recursive=true) +DocMeta.setdocmeta!(Maxnet, :DocTestSetup, :(using Maxnet); recursive=true) makedocs(; modules=[Maxnet], diff --git a/src/mlj_interface.jl b/src/mlj_interface.jl index 68f701e..e081801 100644 --- a/src/mlj_interface.jl +++ b/src/mlj_interface.jl @@ -50,21 +50,14 @@ The keywords `link`, and `clamp` are passed to [`predict`](@ref), while all othe See the documentation of these functions for the meaning of these parameters and their defaults. # Example -```jldoctest +```@example using MLJBase p_a, env = Maxnet.bradypus() mach = machine(MaxnetBinaryClassifier(features = "lqp"), env, categorical(p_a), scitype_check_level = 0) fit!(mach, verbosity = 0) yhat = MLJBase.predict(mach, env) -yhat[1:5] -# output -5-element UnivariateFiniteVector{Multiclass{2}, Bool, UInt32, Float64}: - UnivariateFinite{Multiclass{2}}(false=>0.812, true=>0.188) - UnivariateFinite{Multiclass{2}}(false=>0.811, true=>0.189) - UnivariateFinite{Multiclass{2}}(false=>0.501, true=>0.499) - UnivariateFinite{Multiclass{2}}(false=>0.811, true=>0.189) - UnivariateFinite{Multiclass{2}}(false=>0.752, true=>0.248) + ``` """