| |
Methods defined here:
- __init__(self, object=None, data=None, attribute_column=None, summary=False, data_sequence_column=None, object_sequence_column=None, data_order_column=None, object_order_column=None)
- DESCRIPTION:
The SVMSparseSummary function takes the training data and the model
generated by the function SVMSparse and displays specified
information.
PARAMETERS:
object:
Required Argument.
Specifies the teradataml DataFrame containing the model
data generated by SVMSparse or instance of SVMSparse,
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.
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_column:
Required Argument.
Specifies the name of the input teradataml DataFrame column that
contains the attribute names.
Types: str
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: 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 SVMSparseSummary.
Output teradataml DataFrames can be accessed using attribute
references, such as SVMSparseSummaryObj.<attribute_name>.
Output teradataml DataFrame attribute name is:
result
RAISES:
TeradataMlException
EXAMPLES:
# Load the data to run the example.
load_example_data("SVMSparseSummary","svm_iris_input_train")
# Create teradataml DataFrame
svm_iris_input_train = DataFrame.from_table("svm_iris_input_train")
# Create SparseSVMTrainer object
svm_train = SVMSparse(data=svm_iris_input_train,
sample_id_column='id',
attribute_column='attribute',
label_column='species',
value_column='value1',
max_step=150,
seed=0,
)
# Example 1
# Instance of SVMTrainer is passed as input to object argument
svm_sparse_summary_out1 = SVMSparseSummary(data=svm_iris_input_train,
object=svm_train,
attribute_column='attribute',
summary=False)
# Print the result DataFrame
print(svm_sparse_summary_out1.result)
# Example 2
# teradataml DataFrame containing the model data generated by SVMSparse is passed as input to object argument
svm_sparse_summary_out2 = SVMSparseSummary(data = svm_iris_input_train,
object = svm_train.model_table,
attribute_column = "attribute",
summary = False
)
# Print the result DataFrame
print(svm_sparse_summary_out2)
- __repr__(self)
- Returns the string representation for a SVMSparseSummary class instance.
|