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

Teradata® R Package Function Reference

Product
Teradata R Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-02-28
dita:id
B700-4007
lifecycle
previous
Product Category
Teradata Vantage

Description

The SVMSparseSummary (td_svm_sparse_summary_mle) 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
  )

Arguments

object

Required Argument.
The model table generated by td_svm_sparse_mle function.

data

Required Argument.
It should be the training dataset, otherwise the result may be incomplete.

attribute.column

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

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

Value

Function returns an object of class "td_svm_sparse_summary_mle" which is a named list containing Teradata tbl object.
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 remote tibble objects.
    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
                                                    )