Skip to content

Commit d65731f

Browse files
willtebbuttst--
andauthored
Apply suggestions from code review
Co-authored-by: st-- <[email protected]>
1 parent e36d6ad commit d65731f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/support-vector-machine/script.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ y_train = rand([-1, 1], N);
2424
X = Matrix{Float64}(undef, 2, N)
2525
rand!(MvNormal(randn(2), I), view(X, :, y_train .== 1))
2626
rand!(MvNormal(randn(2), I), view(X, :, y_train .== -1));
27-
x_train = ColVecs(X)
27+
x_train = ColVecs(X);
2828

2929
# Create a 2D grid:
3030
test_range = range(floor(Int, minimum(X)), ceil(Int, maximum(X)); length=100)
@@ -39,7 +39,7 @@ k = SqExponentialKernel() ∘ ScaleTransform(2.0)
3939
model = svmtrain(kernelmatrix(k, x_train), y_train; kernel=LIBSVM.Kernel.Precomputed)
4040

4141
# Precomputed matrix for prediction
42-
y_pr, _ = svmpredict(model, kernelmatrix(k, x_train, x_test))
42+
y_pr, _ = svmpredict(model, kernelmatrix(k, x_train, x_test));
4343

4444
# Compute prediction on a grid:
4545
contourf(test_range, test_range, y_pr)

0 commit comments

Comments
 (0)