View source: R/vlmc_trim_cpp.R
trim.vlmc_cpp | R Documentation |
This function returns a trimmed context tree from which match positions have been removed.
## S3 method for class 'vlmc_cpp'
trim(ct, ...)
ct |
a VLMC. |
... |
additional arguments for the trim function. |
Trimming in the C++ backend is done directly in the Rcpp
managed memory and
cannot be detected at R level using e.g. utils::object.size()
.
a trimmed VLMC
## VLMC trimming is generally useless unless match positions were kept
pc <- powerconsumption[powerconsumption$week %in% 5:6, ]
dts <- cut(pc$active_power, breaks = 4)
model <- vlmc(dts, backend = "C++", keep_match = TRUE)
model <- trim(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.