Teradata Package for R Function Reference | 17.00 - SVMDenseSummary - Teradata Package for R - Look here for syntax, methods and examples for the functions included in the Teradata Package for R.

Teradata® Package for R Function Reference

Product
Teradata Package for R
Release Number
17.00
Published
July 2021
Language
English (United States)
Last Update
2023-08-08
dita:id
B700-4007
NMT
no
Product Category
Teradata Vantage
DenseSVMModelPrinter

Description

The DenseSVMModelPrinter function extracts readable information from the model produced by the DenseSVMTrainer (td_svm_dense_mle) function. The function can display either a summary of the model training results or a tbl_teradata containing the weights for each attribute.

Usage

  td_svm_dense_summary_mle (
      object = NULL,
      data = NULL,
      attribute.columns = NULL,
      summary = FALSE,
      data.sequence.column = NULL,
      object.sequence.column = NULL,
      data.order.column = NULL,
      object.order.column = NULL
  )

Arguments

object

Required Argument.
Specifies the model tbl_teradata generated by td_svm_dense_mle.
This argument can accept either a tbl_teradata or an object of "td_svm_dense_mle" class.

object.order.column

Optional Argument.
Specifies Order By columns for "object".
Values to this argument can be provided as a vector, if multiple columns are used for ordering.
Types: character OR vector of Strings (character)

data

Required Argument.
Specifies training dataset input tbl_teradata specified in "data" argument used to produce model by td_svm_dense_mle function, otherwise the result may be incomplete.

data.order.column

Optional Argument.
Specifies Order By columns for "data".
Values to this argument can be provided as a vector, if multiple columns are used for ordering.
Types: character OR vector of Strings (character)

attribute.columns

Required Argument.
Specifies the input tbl_teradata columns from "data" argument that contain the attributes of the test samples. Attribute columns must be numeric (int, real, bigint, smallint, or float).
Types: character OR vector of Strings (character)

summary

Optional Argument.
Specifies whether the function outputs only a summary of the model. If TRUE, the output contains only summary information of the model. If FALSE, the output contains the weight of each attribute in the model.
Default Value: FALSE
Types: logical

data.sequence.column

Optional Argument.
Specifies the vector of column(s) that uniquely identifies each row of the input argument "data". The argument is used to ensure deterministic results for functions which produce results that vary from run to run.
Types: character OR vector of Strings (character)

object.sequence.column

Optional Argument.
Specifies the vector of column(s) that uniquely identifies each row of the input argument "object". The argument is used to ensure deterministic results for functions which produce results that vary from run to run.
Types: character OR vector of Strings (character)

Value

Function returns an object of class "td_svm_dense_summary_mle" which is a named list containing object of class "tbl_teradata".
Named list member can be referenced directly with the "$" operator using name: result.

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")

    # Generate Radial Basis Model (RBF) Model
    densesvm_iris_rbf_model <- 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 1 - Display the model parameters (weights, attributes etc).
    td_svm_dense_summary_out1 <- td_svm_dense_summary_mle(object = densesvm_iris_rbf_model,
                                                data = svm_iris_train,
                                                attribute.columns=c('sepal_length','sepal_width',
                                                                    'petal_length','petal_width'),
                                                summary = FALSE
                                                )

    # Example 2 - outputs only summary of the model.
    td_svm_dense_summary_out2 <- td_svm_dense_summary_mle(object = densesvm_iris_rbf_model,
                                                data = svm_iris_train,
                                                attribute.columns=c('sepal_length','sepal_width',
                                                                    'petal_length','petal_width'),
                                                summary = TRUE
                                                )