| |
Methods defined here:
- __init__(self, data=None, seq_column=None, delimiter=',', data_sequence_column=None, data_order_column=None)
- DESCRIPTION:
The PathGenerator function takes a set of paths and outputs the
sequence and all possible sub-sequences, which can be input to the
function PathSummarizer.
PARAMETERS:
data:
Required Argument.
The name of the teradataml DataFrame containing the input data.
data_order_column:
Optional Argument.
Specifies Order By columns for data.
Values to this argument can be provided as list, if multiple columns
are used for ordering.
Types: str OR list of Strings (str)
seq_column:
Required Argument.
Specifies the name of the input teradataml DataFrame column that
contains the paths.
Types: str
delimiter:
Optional Argument.
Specifies the single-character delimiter that separates symbols in
the path string.
Note: Do not use any of the following characters as delimiter
(they cause the function to fail):
Asterisk (*), Plus (+), Left parenthesis ((), Right parenthesis ()),
Single quotation mark ('), Escaped single quotation mark (\'),
Backslash (\)
Default Value: ","
Types: str
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)
RETURNS:
Instance of PathGenerator.
Output teradataml DataFrames can be accessed using attribute
references, such as PathGeneratorObj.<attribute_name>.
Output teradataml DataFrame attribute name is:
result
RAISES:
TeradataMlException
EXAMPLES:
# Load example data.
load_example_data("pathgenerator", "clickstream1")
# Create teradataml DataFrame objects.
# The table contains clickstream data, where the "path" column
# contains symbols for the pages that the customer clicked.
clickstream1 = DataFrame.from_table("clickstream1")
# Example - Generate path sequences and count for the given clickstream data.
PathGeneratorOut = PathGenerator(data = clickstream1,
seq_column = "path"
)
# Print the results.
print(PathGeneratorOut)
- __repr__(self)
- Returns the string representation for a PathGenerator class instance.
- get_build_time(self)
- Function to return the build time of the algorithm in seconds.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
- get_prediction_type(self)
- Function to return the Prediction type of the algorithm.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
- get_target_column(self)
- Function to return the Target Column of the algorithm.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
- show_query(self)
- Function to return the underlying SQL query.
When model object is created using retrieve_model(), then None is returned.
|