Skip to content

Commit 9397bf7

Browse files
Update examples/support-vector-machine/script.jl
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 1c71067 commit 9397bf7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/support-vector-machine/script.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ y_pred, _ = svmpredict(model, kernelmatrix(k, x_train, x_test));
4949

5050
# We can see that the kernelized, non-linear classification successfully separates the two classes in the training data:
5151
plot(; xlim=extrema(test_range), ylim=extrema(test_range), aspect_ratio=1)
52-
contourf!(test_range, test_range, y_pred; levels=1, color=cgrad(:redsblues), alpha=0.7, colorbar_title="prediction")
52+
contourf!(
53+
test_range,
54+
test_range,
55+
y_pred;
56+
levels=1,
57+
color=cgrad(:redsblues),
58+
alpha=0.7,
59+
colorbar_title="prediction",
60+
)
5361
scatter!(X1[:, 1], X1[:, 2]; color=:red, label="training data: class –1")
5462
scatter!(X2[:, 1], X2[:, 2]; color=:blue, label="training data: class 1")

0 commit comments

Comments
 (0)