Skip to content

Commit fbc7597

Browse files
Minor changes
1 parent a8658da commit fbc7597

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

examples/dataframes.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ iris[!, Not(:class)]
8585

8686
# ╔═╡ 9db64168-338c-4bf7-b430-98c2efd39db3
8787
md"""
88-
## Classifying with XGBoost
88+
## Classifying the Iris dataset with XGBoost
8989
"""
9090

9191
# ╔═╡ cbef1767-4c50-4f40-aa29-e9bddbaeb2a0
@@ -119,11 +119,8 @@ model = xgboost((train[:, Not(:class)], train_labels))
119119
# ╔═╡ e36eecca-feb6-4c76-9a14-0ffb675e904d
120120
predictions = predict(model, test[:, Not(:class)])
121121

122-
# ╔═╡ d0000e98-e712-4769-94b5-dc918637d7d5
123-
rmse(xs, ys) = sqrt(mean((xs - ys) .^ 2))
124-
125122
# ╔═╡ 7557839c-a580-44c3-a135-b9384cff89c3
126-
rmse(encode.(test.class), predictions)
123+
mean(abs2, encode.(test.class) - predictions) # RMSE
127124

128125
# ╔═╡ 73413e5f-5c7f-4955-9acb-f5c5c996a903
129126
count(encode.(test.class) .!= round.(predictions))
@@ -627,7 +624,6 @@ version = "17.4.0+2"
627624
# ╠═d96c37be-da2f-4c0a-93c4-9ebf7f060603
628625
# ╠═1a112052-f7e3-4bc8-bec6-70fcaa28eb1f
629626
# ╠═e36eecca-feb6-4c76-9a14-0ffb675e904d
630-
# ╠═d0000e98-e712-4769-94b5-dc918637d7d5
631627
# ╠═7557839c-a580-44c3-a135-b9384cff89c3
632628
# ╠═73413e5f-5c7f-4955-9acb-f5c5c996a903
633629
# ╠═697135f2-cf29-4769-bb75-0c615d30a2ab

0 commit comments

Comments
 (0)