Support vector machines in R: Finding the equation of a hyper plane (in 6 dimensions) and showing it's correct lin.6d&lt;-read.csv(&quot;D:/Documents/Linear-6d.csv&quot;, header=TRUE)

View(lin.6d)

plot(lin.6d,col = ifelse(lin.6d$Class == 1, &quot;red&quot;,&quot;blue&quot;)) 

library(e1071) # Package for Support Vector Machines

svm.lin.6d &lt;- svm(Class ~ ., data = lin.6d, type = &quot;C-classification&quot;, kernel = &quot;linear&quot;, cost = 10, scale = FALSE)
print(svm.lin.6d)

tuned &lt;- tune(svm, Class ~., data = lin.6d, kernel = &quot;linear&quot;, ranges = list(cost=c(0.001,0.01,.1,1,10,100))) # Will show the optimal cost parameter
summary(tuned) # Optimal cost parameter is 10

# Find parameters of hyperplane (wx+c=0)
w &lt;- t(svm.lin.6d$coefs) %*% svm.lin.6d$SV # In essence this finds the hyper plane that separates our points
c &lt;- -svm.lin.6d$rho

The above code takes the data from an excel file &quot;lin.6d&quot; which contains vector points &quot;X1,X2,X3,X4,X5,X6&quot; and &quot;Class:-1,1&quot;. So each vector point has a class 1 or -1.
I have plotted the data and colour coded each point depending on it's class (Blue if the point if it's class is -1, red otherwise).
I then used the svm function to obtain the coefficients of the hyperplane where:
w is the set of coefficients (W1,W2,...,W6) and c is the intercept.
hence I got an answer:
w=(0.02433109, 0.02803587, -0.02332039, -0.000118514, -0.009224677, -0.02626795)
c= 0.1712391
where wx+c=0 is the equation of the hyperplane separating the classes of the points.
My question is:
How do I know if this is the correct answer? How do I create a visual plot to show this can be represented as a line separating the classes?
I over complicated the answer I was looking for. If you have the equation of the hyperplane, you can test it against each point in the dataset. If all points of class 1 are ALL (above or below) the intercept and the converse is true for all points of class -1. Then the hyperplane separates the two classes