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

Teradata® Python Package Function Reference

Product
Teradata Python Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-07-17
lifecycle
previous
Product Category
Teradata Vantage

 
teradataml.analytics.mle.SVMDenseSummary = class SVMDenseSummary(builtins.object)
     Methods defined here:
__init__(self, object=None, data=None, attribute_columns=None, summary=False, data_sequence_column=None, object_sequence_column=None, data_order_column=None, object_order_column=None)
DESCRIPTION:
    SVMDenseSummary extracts readable information from the model
    produced by SVMDense. The function can display either a
    summary of the model training results or a teradataml DataFrame
    containing the weights for each attribute.
 
 
PARAMETERS:
    object:
        Required Argument.
        Specifies the teradataml DataFrame containing the model
        data generated by SVMDense or instance of SVMDense,
        which contains the model.
 
    object_order_column:
        Optional Argument.
        Specifies Order By columns for object.
        Values to this argument can be provided as a list, if multiple
        columns are used for ordering.
        Types: str OR list of Strings (str)
 
    data:
        Required Argument.
        Specifies the teradataml DataFrame containing the input test data.
        It should be the training dataset, 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 list, if multiple
        columns are used for ordering.
        Types: str OR list of Strings (str)
 
    attribute_columns:
        Required Argument.
        Specifies the input teradataml DataFrame columns that contain the
        attributes of the test samples. Attribute columns must be
        numeric (int, real, bigint,smallint, or float).
        Python teradataml DataFrame column types accepted: (int, float, long).
        Types: str OR list of Strings (str)
 
    summary:
        Optional Argument.
        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: bool
 
    data_sequence_column:
        Optional Argument.
        Specifies the list 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: str OR list of Strings (str)
 
    object_sequence_column:
        Optional Argument.
        Specifies the list 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: str OR list of Strings (str)
 
RETURNS:
    Instance of SVMDenseSummary.
    Output teradataml DataFrames can be accessed using attribute
    references, such as SVMDenseSummaryObj.<attribute_name>.
    Output teradataml DataFrame attribute name is:
        result
 
 
RAISES:
    TeradataMlException
 
 
EXAMPLES:
    
    # Load the data to run the example.
    load_example_data("svmdense","nb_iris_input_train")
    
    # Create teradataml DataFrame
    nb_iris_input_train = DataFrame.from_table("nb_iris_input_train")
 
    # Generate Radial Basis Model (RBF) Model
    densesvm_iris_rbf_model = SVMDense(data = nb_iris_input_train,
                                         sample_id_column = "id",
                                         attribute_columns = ['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.0,
                                         bias = 0.0,
                                         max_step = 100,
                                         seed = 1
                                         )
 
    # Example 1 - Display the model parameters (weights, attributes etc).
    svm_dense_summary_out1 = SVMDenseSummary(object = densesvm_iris_rbf_model,
                                             data = nb_iris_input_train,
                                             attribute_columns=['sepal_length', 'sepal_width' , 'petal_length' , 'petal_width'],
                                             summary = False
                                             )
    
 
    # Print the result DataFrame
    print(svm_dense_summary_out1)
__repr__(self)
Returns the string representation for a SVMDenseSummary class instance.