Description Usage Arguments Value Examples
Computes Dynamic Programming on a numeric vector up to max segements
1 | dynprog_interface(data_vec, max_segments)
|
data_vec |
A numeric data vector size (n) |
max_segments |
The maximum number of segments |
Returns the Loss Matrix as a numeric matrix with the columns as the max segments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | destfile <- "data-for-LOPART-signals.csv.gz"
file.url = paste0(
"https://raw.githubusercontent.com/tdhock/LOPART-paper/master/",
destfile)
if(!file.exists(destfile)){
download.file(file.url, destfile)
}
library(data.table)
zip.dt <- data.table::fread(destfile)
sequence_id <- 20167.22
selected.dt <- zip.dt[sequenceID == sequence_id,]
logratio <- as.numeric(selected.dt[["logratio"]])
max_segments <- 3
dynprog_result <-rpackage2::dynprog_interface(logratio, max_segments)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.