Skip to content

Commit

Permalink
use @example instead of jldoctest
Browse files Browse the repository at this point in the history
  • Loading branch information
tiemvanderdeure committed Nov 26, 2024
1 parent 585cbe9 commit 6e38ccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -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],
Expand Down
11 changes: 2 additions & 9 deletions src/mlj_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

```

"""
Expand Down

0 comments on commit 6e38ccc

Please sign in to comment.