Description
The DenseSVMTrainer function takes training data in dense format and outputs a
predictive model in binary format, which is the input to the functions
DenseSVMPredictor (td_svm_dense_predict_mle
) and
DenseSVMModelPrinter (td_svm_dense_summary_mle
).
Usage
td_svm_dense_mle (
data = NULL,
sample.id.column = NULL,
attribute.columns = NULL,
kernel.function = "LINEAR",
gamma = 1.0,
constant = 1.0,
degree = 2,
subspace.dimension = 256,
hash.bits = 256,
label.column = NULL,
cost = 1.0,
bias = 0.0,
class.weights = NULL,
max.step = 100,
epsilon = 0.01,
seed = 0,
data.sequence.column = NULL
)
Arguments
data |
Required Argument. |
sample.id.column |
Required Argument. |
attribute.columns |
Required Argument. |
kernel.function |
Optional Argument. |
gamma |
Optional Argument. |
constant |
Optional Argument. |
degree |
Optional Argument. |
subspace.dimension |
Optional Argument. |
hash.bits |
Optional Argument. |
label.column |
Required Argument. |
cost |
Optional Argument. |
bias |
Optional Argument. |
class.weights |
Optional Argument. |
max.step |
Optional Argument. |
epsilon |
Optional Argument. |
seed |
Optional Argument. |
data.sequence.column |
Optional Argument. |
Value
Function returns an object of class "td_svm_dense_mle" which is a
named list containing objects of class "tbl_teradata".
Named list members can be referenced directly with the "$" operator
using following names:
model.table
output
Examples
# Get the current context/connection
con <- td_get_context()$connection
# Load example data.
loadExampleData("svmdense_example", "svm_iris_train")
# Create object(s) of class "tbl_teradata".
svm_iris_train <- tbl(con, "svm_iris_train")
# Example 1 - Linear Model
td_svm_dense_out <- td_svm_dense_mle(data = svm_iris_train,
sample.id.column = "id",
attribute.columns = c('sepal_length', 'sepal_width',
'petal_length', 'petal_width'),
kernel.function = "linear",
label.column = "species",
cost = 1,
bias = 0,
max.step = 100,
seed = 1
)
# Example 2 - Polynomial Model
td_svm_dense_out <- td_svm_dense_mle(data = svm_iris_train,
sample.id.column = "id",
attribute.columns = c('sepal_length', 'sepal_width',
'petal_length', 'petal_width'),
kernel.function = "polynomial",
gamma = 0.1,
degree = 2,
subspace.dimension = 120,
hash.bits = 512,
label.column = "species",
cost = 1,
bias = 0,
max.step = 100,
seed = 1
)
# Example 3 - Radial Basis Model (RBF) Model
td_svm_dense_out <- td_svm_dense_mle(data = svm_iris_train,
sample.id.column = "id",
attribute.columns = c('sepal_length', 'sepal_width',
'petal_length', 'petal_width'),
kernel.function = "rbf",
gamma = 0.1,
subspace.dimension = 120,
hash.bits = 512,
label.column = "species",
cost = 1,
bias = 0,
max.step = 100,
seed = 1
)
# Example 4 - Sigmoid Model
td_svm_dense_out <- td_svm_dense_mle(data = svm_iris_train,
sample.id.column = "id",
attribute.columns = c('sepal_length', 'sepal_width',
'petal_length', 'petal_width'),
kernel.function = "sigmoid",
gamma = 0.1,
subspace.dimension = 120,
hash.bits = 512,
label.column = "species",
cost = 1,
bias = 0,
max.step = 30,
seed = 1
)