Description
The PathAnalyzer function:
Inputs a set of paths to the PathGenerator function PathGenerator (
td_path_generator_mle
) function.Inputs the PathGenerator output to the PathSummarizer function PathSummarizer (
td_path_summarizer_mle
).Inputs the PathSummarizer output to the PathStart function PathStart (
td_path_start_mle
), which outputs, for each parent, all children and the number of times that the user traveled each child.
Usage
td_path_analyzer_mle (
data = NULL,
seq.column = NULL,
count.column = NULL,
hash = FALSE,
delimiter = ",",
data.sequence.column = NULL
)
Arguments
data |
Required Argument. |
seq.column |
Required Argument. |
count.column |
Optional Argument. |
hash |
Optional Argument. |
delimiter |
Optional Argument. |
data.sequence.column |
Optional Argument. |
Value
Function returns an object of class "td_path_analyzer_mle" which is a
named list containing objects of class "tbl_teradata".
Named list members can be referenced directly with the "$" operator
using the following names:
output.table
output
Examples
# Get the current context/connection
con <- td_get_context()$connection
# Load example data.
loadExampleData("pathgenerator_example", "clickstream1")
# Create object(s) of class "tbl_teradata".
clickstream1 <- tbl(con, "clickstream1")
# Example 1 - Use the click stream data to run path analysis functions
td_path_analyzer_mle_out1 <- td_path_analyzer_mle(data = clickstream1,
seq.column = "path",
count.column = "cnt"
)
# Example 2 - Exclude count.column argument, and the function generates the count column
td_path_analyzer_mle_out2 <- td_path_analyzer_mle(data = clickstream1,
seq.column = "path"
)
# Example 3 - Use the output of NPath td_npath_sqle() function as an input.
loadExampleData("npath_example1", "bank_web_clicks2")
# Create object(s) of class "tbl_teradata".
bank_web_clicks2 <- tbl(con, "bank_web_clicks2")
# Execute npath function.
td_npath_out <- td_npath_sqle(
data1=bank_web_clicks2,
data1.partition.column = c("customer_id", "session_id"),
data1.order.column = "datestamp",
mode = "nonoverlapping",
pattern = "A*",
symbols = c("true AS A"),
result = c("ACCUMULATE (page OF A) AS page_path")
);
# This takes the td_npath_out object as input and the count column gets auto-generated
td_path_analyzer_mle_out3 <- td_path_analyzer_mle(data = td_npath_out,
seq.column = "page_path"
)