Context Tree Weighting (CTW) algorithm
Computes the prior predictive likelihood of the data.
CTW(input_data, depth, beta = NULL)
input_data |
the sequence to be analysed. The sequence needs to be a "character" object. See the examples section of the BCT/kBCT functions on how to transform any dataset to a "character" object. |
depth |
maximum memory length. |
beta |
hyper-parameter of the model prior. Takes values between 0 and 1. If not initialised in the call function, the default value is 1-2-m+1, where m is the size of the alphabet; for more information see Kontoyiannis et al. (2020). |
returns the natural logarithm of the prior predictive likelihood of the data.
# For the gene_s dataset with a maximum depth of 10 (with dafault value of beta): CTW(gene_s, 10) # For custom beta (e.g. 0.8): CTW(gene_s, 10, 0.8)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.