Description Usage Arguments Author(s) References Examples
Main function of DP approach
1 | DPmain(x, y, K)
|
x |
input data x |
y |
input data y |
K |
given number of change-points |
Bingwen Zhang
Bingwen Zhang, Jun Geng and Lifeng Lai, Detecting changes in regression models via sparse group lasso, http://users.wpi.edu/~bzhang/icassp_v1.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, y, K)
{
n <- dim(x)[1]
p <- dim(x)[2]
c1 <- computeC(x, y, n, p)
sol <- DPSol(x, y, n, p, K + 1, c1)
predictedAlpha <- PrintAlpha(x, y, sol)
return(list(Sol = sol, AlphaHat <- predictedAlpha))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.