Skip to content

Commit

Permalink
Set hideall for the basic example noteboko
Browse files Browse the repository at this point in the history
  • Loading branch information
rikhuijzer committed Sep 26, 2023
1 parent a230723 commit 2b13aba
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/src/basic-example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using InteractiveUtils

# ╔═╡ 8ca5e9f4-539c-11ee-0b5a-ab77d2a5bfbf
# ╠═╡ show_logs = false
# hideall
begin
ENV["DATADEPS_ALWAYS_ACCEPT"] = "true"

Expand Down Expand Up @@ -49,7 +50,7 @@ We load it via `DataDeps.jl` so that we can use a checksum for verification and

# ╔═╡ 75550619-b310-4c66-9371-93656f78765c
# ╠═╡ show_logs = false
let
function register_haberman()
name = "Haberman"
message = "Haberman's Survival Data Set"
remote_path = "https://github.com/rikhuijzer/haberman-survival-dataset/releases/download/v1.0.0/haberman.csv"
Expand All @@ -59,21 +60,25 @@ end;

# ╔═╡ 05aaa007-0fe0-44ef-b815-ecf9e5f474f7
md"""
After dataset registration, we can load it into a `DataFrame`:
We can call this registration function and then load the dataset:
"""

# ╔═╡ ac2d7dbc-364f-437f-b66f-8eb288395275
data = let
dir = datadep"Haberman"
path = joinpath(dir, "haberman.csv")
function load_haberman()::DataFrame
register_haberman()
path = joinpath(datadep"Haberman", "haberman.csv")
df = CSV.read(path, DataFrame)
df[!, :survival] = categorical(df.survival)
df
end
end;

# ╔═╡ 08a4ca2b-bc65-4c29-9528-f4789272143a
md"And split it into features (`X`) and outcomes (`y`):"

# ╔═╡ 472a1dd1-dc10-4707-81f8-f2a0b68082fb
# ╠═╡ show_logs = false
data = load_haberman()

# ╔═╡ e037d952-e489-41b6-afc9-317a8c17e6c4
X = select(data, Not(:survival));

Expand Down Expand Up @@ -186,6 +191,7 @@ evaluate(model, X, y; resampling, measure=auc)
# ╠═05aaa007-0fe0-44ef-b815-ecf9e5f474f7
# ╠═ac2d7dbc-364f-437f-b66f-8eb288395275
# ╠═08a4ca2b-bc65-4c29-9528-f4789272143a
# ╠═472a1dd1-dc10-4707-81f8-f2a0b68082fb
# ╠═e037d952-e489-41b6-afc9-317a8c17e6c4
# ╠═2f921f63-5148-4726-9839-c84217f60e0b
# ╠═a1764625-4b7a-42f3-9e61-3d26122d86da
Expand Down

0 comments on commit 2b13aba

Please sign in to comment.