View source: R/segmentation_useful_functions.R
calculate_exact_changepoint_posterior | R Documentation |
This function calculates the exact posterior for a sequence with a single change-point.
calculate_exact_changepoint_posterior(input_data, depth, alphabet)
input_data |
the sequence to be analysed. |
depth |
maximum memory length. |
alphabet |
symbols appearing in the sequence. |
empirical posterior of the change-points locations.
infer_unknown_changepoints
# Use the first 300 samples of the simian_40 dataset. # Run the function with 1 change-point, a maximum depth of 2 and the ["a", "c", "g", "t"] alphabet. res <- calculate_exact_changepoint_posterior(substr(simian_40, 1, 300), 2, c("acgt"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.