Learn R Programming

mixvlmc (version 0.2.1)

trim: Trim a context tree

Description

This function returns a trimmed context tree from which match positions have been removed.

Usage

trim(ct, ...)

Value

a trimmed context tree.

Arguments

ct

a context tree.

...

additional arguments for the trim function.

Examples

Run this code
## context tree trimming
dts <- sample(as.factor(c("A", "B", "C")), 1000, replace = TRUE)
dts_tree <- ctx_tree(dts, max_depth = 10, min_size = 5, keep_position = TRUE)
print(object.size(dts_tree))
dts_tree <- trim(dts_tree)
print(object.size(dts_tree))

Run the code above in your browser using DataLab