Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CTW

Context Tree Weighting (CTW) algorithm


Description

Computes the prior predictive likelihood of the data.

Usage

CTW(input_data, depth, beta = NULL)

Arguments

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).

Value

returns the natural logarithm of the prior predictive likelihood of the data.

See Also

Examples

# 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)

BCT

Bayesian Context Trees for Discrete Time Series

v1.1
GPL (>= 2)
Authors
Ioannis Papageorgiou, Valentinian Mihai Lungu, Ioannis Kontoyiannis
Initial release
2020-12-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.