Description Usage Arguments Details Value Constraints Examples
svm
is used to train a support vector machine. It can be used to
carry out general classification.
1 |
formula |
a symbolic description of the model to be fit. |
data |
an FLTable wide or deep containing the variables in the model. |
kernel |
the kernel used in training and predicting, different kernel types are: |
cost |
cost of constraints violation |
degree |
parameter needed for kernel of type polynomial. |
The wrapper overloads svm and implicitly calls DB-Lytix svm function.
svm
returns a FLSVM class object which replicates equivalent R output
from svm
in e1071 package.
All values in FLtable should be numeric, maximum number of observations in the dataset can be 2000 and maximum number of independent columns can be 500. The class variable is binary, with value either -1 or 1 only.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #Linear Kernel
FLtbl <- FLTable(getTestTableName("tblSVMLinSepMultiDim"),
"OBSID", whereconditions= "OBSID>307")
FLmodel <- svm(DEP~., data = FLtbl, fetchID = TRUE,
kernel = "linear")
FLPredict <- predict(FLmodel)
print(FLmodel)
#polynomial Kernel
FLtbl <- FLTable(getTestTableName("tblSVMDense"),
"OBSID", whereconditions = "OBSID>307")
FLmodel <- svm(DEP~., data = FLtbl, fetchID = TRUE,
kernel = "polynomial")
FLPredict <- predict(FLmodel)
print(FLmodel)
#Gaussian Kernel
FLtbl <- FLTable(getTestTableName("tblSVMDense"),
"OBSID", whereconditions = "OBSID>307")
FLmodel <- svm(DEP~., data = FLtbl, fetchID = TRUE,
kernel = "radial")
FLPredict <- predict(FLmodel)
print(FLmodel)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.