Skip to content

Commit a64d1eb

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5c854ee commit a64d1eb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/support-vector-machine/script.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ model = svmtrain(kernelmatrix(k, x_train), y_train; kernel=LIBSVM.Kernel.Precomp
4444
y_pred, _ = svmpredict(model, kernelmatrix(k, x_train, x_test));
4545

4646
# Compute prediction on a grid:
47-
plot(lim=extrema(test_range))
47+
plot(; lim=extrema(test_range))
4848
contourf!(test_range, test_range, y_pred; levels=1, color=cgrad(:redsblues), alpha=0.7)
49-
scatter!(X[y_train.==-1, 1], X[y_train.==-1, 2]; color=:red, label="class 1", widen=false)
50-
scatter!(X[y_train.==+1, 1], X[y_train.==+1, 2]; color=:blue, label="class 2", widen=false)
49+
scatter!(
50+
X[y_train .== -1, 1], X[y_train .== -1, 2]; color=:red, label="class 1", widen=false
51+
)
52+
scatter!(
53+
X[y_train .== +1, 1], X[y_train .== +1, 2]; color=:blue, label="class 2", widen=false
54+
)

0 commit comments

Comments
 (0)