Teradata R Package Function Reference | 17.00 - 17.00 - SVMSparseSummary - Teradata R Package

Teradata® R Package Function Reference

prodname
Teradata R Package
vrm_release
17.00
created_date
September 2020
category
Programming Reference
featnum
B700-4007-090K

Description

The SVMSparseSummary function takes the training data and the model generated by the function SparseSVMTrainer (td_svm_sparse_mle) and displays specified information.

Usage

  td_svm_sparse_summary_mle (
      object = NULL,
      data = NULL,
      attribute.column = 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_sparse_mle.
This argument can accept either a tbl_teradata or an object of "td_svm_sparse_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 the name of the tbl_teradata that contains the training samples.

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.column

Required Argument.
Specifies the name of the input tbl_teradata column that contains the attribute names.
Types: character

summary

Optional Argument.
Specifies whether the output is a summary of the model. If FALSE, the output is 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_sparse_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("svm_sparse_summary_example", "svm_iris_input_train")

    # Create object(s) of class "tbl_teradata".
    svm_iris_input_train <- tbl(con, "svm_iris_input_train")

    # Example 1 - Get the summary of the SVM Sparse model.

    # Create the model
    svm_train <- td_svm_sparse_mle(data = svm_iris_input_train,
                                   sample.id.column = 'id',
                                   attribute.column = 'attribute',
                                   value.column = 'value1',
                                   label.column = 'species',
                                   max.step = 150,
                                   seed = 0
                                   )

    # Get the summary of the model.
    sparse_summary_out <- td_svm_sparse_summary_mle(data = svm_iris_input_train,
                                                    object = svm_train,
                                                    attribute.column = "attribute",
                                                    summary = FALSE
                                                    )