Skip to content

Commit

Permalink
Use RulesClassifier to fix @load
Browse files Browse the repository at this point in the history
  • Loading branch information
rikhuijzer committed Oct 10, 2023
1 parent 5c87eda commit b1a8cfa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/src/basic-example.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.28
# v0.19.29

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -91,16 +91,21 @@ Next, we can load the model that we want to use.
Since Haberman's outcome column (`survival`) contains 0's and 1's, we use the `StableRulesClassifier`.
We can make the `StableRulesClassifier` symbol available via MLJ's `@load`:
```julia
StableRulesClassifier = @load StableRulesClassifier pkg="SIRUS"
RulesClassifier = @load StableRulesClassifier pkg="SIRUS"
```
or directly via
```julia
using SIRUS: StableRulesClassifier
RulesClassifier = StableRulesClassifier
```
"""

# ╔═╡ 9a34a577-e69e-4c99-a564-46ab0672168b
# Don't run this line if you used `@load StableRulesClassifier pkg="SIRUS"`.
RulesClassifier = StableRulesClassifier;

# ╔═╡ ccce5f3e-e396-4765-bf5f-6f79e905aca8
model = StableRulesClassifier(; rng=StableRNG(1), q=4, max_depth=2, max_rules=8);
model = RulesClassifier(; rng=StableRNG(1), q=4, max_depth=2, max_rules=8);

# ╔═╡ 97c9ea2a-2897-472b-b15e-215f40049cf5
md"""
Expand Down Expand Up @@ -195,6 +200,7 @@ evaluate(model, X, y; resampling, measure=auc)
# ╠═e037d952-e489-41b6-afc9-317a8c17e6c4
# ╠═2f921f63-5148-4726-9839-c84217f60e0b
# ╠═a1764625-4b7a-42f3-9e61-3d26122d86da
# ╠═9a34a577-e69e-4c99-a564-46ab0672168b
# ╠═ccce5f3e-e396-4765-bf5f-6f79e905aca8
# ╠═97c9ea2a-2897-472b-b15e-215f40049cf5
# ╠═b1281f29-61d7-4c43-960c-e516464ea213
Expand Down

0 comments on commit b1a8cfa

Please sign in to comment.