I don't know enough about the work to give a complete answer, but the number in detail[2,]
is one of the numbers denoted $a_{p,q}$ or $b_{q+1,r}$ on page 17 of the paper. I am not sure which, but you should be able to find out by working through an example.
To get this, you can look at the reconstr.bu
function, which reconstructs the original signal from the output of the best.unbal.haar.bu
function. Say that your signal is x
and y = best.unbal.haar.bu(x)
. Then the source code of reconstr.bu
shows how x
is recovered from y$smooth
and y$detail
function (buh.bu)
{
y <- buh.bu
n <- dim(y$detail)[2] + 1
x <- y$smooth
detail <- y$detail
for (i in 1:(n - 1)) {
ind <- round(detail[1, n - i])
x[(ind + 2):n] <- x[(ind + 1):(n - 1)]
new.left <- detail[2, n - i] * x[ind] + sqrt(1 - detail[2,
n - i]^2) * detail[3, n - i]
new.right <- sqrt(1 - detail[2, n - i]^2) * x[ind] -
detail[2, n - i] * detail[3, n - i]
x[ind] <- new.left
x[ind + 1] <- new.right
}
return(x)
}
You can see where detail[2, n - i]
enters into the code, and its clear that one of detail[2, n - i]
and sqrt(1 - detail[2, n - i]^2)
is $a_{p,q}$ and the other is $b_{q+1,r}$. Only one of them needs to be stored in y
because the sum of their squares is $1$. (See 2(b) on p17 of the paper.) The columns of y$detail
are the detail filters into which the signal x
is broken. The signal can be completely recovered from this set of detail filters.
I hope this is of some help. I made it an answer because it's too long to be a comment.