How can I build SVM for a 3D dataset (with x, y, z coordinates)?
I can display 3D data with scatterplot3d(data), but how does it work when using svm results?
Edit: copy from comment to response. This should have been edited by OP:
3 data set
data[1:10,1], data[1:10,2] and data[1:10,3] represent genuine data.
data[11:15,1], data[11:15,2] and data[11:15,3] represent userA data.
data[16:20,1], data[16:20,2] and data[16:20,3] represent userB data.
Then I do SVM with:
labels <- matrix( c(rep(1,10), rep(-1, 10)) )
svp <- ksvm(data,labels, type="C-svc" , kernel='rbfdot', C=0.4,
kpar=list(sigma=0.2))
Then I have a data test with:
dataTest[1,1], dataTest[1,2], dataTest[1,3]
predLabels = predict(svp,dataTest)
Editor's Note: The last bit looks a bit odd with only three data points.