Description
The PathStart function takes output of the function PathSummarizer
(td_path_summarizer
) function and returns, for
each parent in the input tbl_teradata, the parent and children and
the number of times that each of its subsequences was traveled.
Usage
td_path_start_mle (
object = NULL,
count.column = NULL,
delimiter = ",",
parent.column = NULL,
partition.names = NULL,
node.column = NULL,
object.sequence.column = NULL,
object.partition.column = NULL,
object.order.column = NULL
)
Arguments
object |
Required Argument. |
object.partition.column |
Required Argument. |
object.order.column |
Optional Argument. |
count.column |
Required Argument. |
delimiter |
Optional Argument. |
parent.column |
Required Argument. |
partition.names |
Required Argument. |
node.column |
Required Argument. |
object.sequence.column |
Optional Argument. |
Value
Function returns an object of class "td_path_start_mle" which is a
named list containing object of class "tbl_teradata".
Named list member can be referenced directly with the "$" operator
using the name: result.
Examples
# Get the current context/connection
con <- td_get_context()$connection
# Load example data.
loadExampleData("pathgenerator_example", "clickstream1")
# Create remote tibble objects.
# The table contains clickstream data, where the "path" column
# contains symbols for the pages that the customer clicked.
clickstream1 <- tbl(con, "clickstream1")
# Example 1 - td_path_start_mle() uses the output of td_path_summarizer_mle().
td_path_generator_out <- td_path_generator_mle(data = clickstream1,
seq.column = "path"
)
td_path_summarizer_out <- td_path_summarizer_mle(object = td_path_generator_out,
object.partition.column = c('prefix'),
seq.column = 'sequence',
partition.names = 'prefix',
prefix.column = 'prefix'
)
td_path_start_out1 <- td_path_start_mle(object = td_path_summarizer_out,
object.partition.column = c('parent'),
node.column = 'node',
parent.column = 'parent',
count.column = 'cnt',
partition.names = 'partitioned'
)
# Example 2 - Alternatively, use a persisted output of path summarizer
td_path_summarizer_out %>% extract2(1) %>%
copy_to(con, df = ., name = "td_path_summarizer_table", overwrite = TRUE)
td_path_start_out2 <- td_path_start_mle(object = tbl(con, "td_path_summarizer_table"),
object.partition.column = c('parent'),
node.column = 'node',
parent.column = 'parent',
count.column = 'cnt',
partition.names = 'partitioned'
)