You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
8<br />
initialized using the function structure(), where all its elements are listed. Note that<br />
the membership of the class penalty must also be given here.<br />
For the fused lasso penalty, things are a little bit more complicated. Since a j , j =<br />
p + 1, . . . , 2p − 1 consists of two non-zero elements we cannot apply getpenmat(). The<br />
first derivatives of the penalty terms are<br />
p ′ λ,j(|ξ j |) =<br />
{<br />
λ 1 1 {ξj ≠0}, j = 1, . . . , p,<br />
λ 2 1 {ξj ≠0}, j = p + 1, . . . , 2p − 1.<br />
This will be returned by the first.derivative() function, see below. A summarized<br />
version of the coefficients is<br />
⎡<br />
⎢<br />
⎣<br />
a 1 a 2 . . . a p a p+1 a p+2 . . . a 2p−1<br />
1 0 . . . 0 −1 0 . . . 0<br />
0 1 . . . 0 1 −1 . . . 0<br />
0 0 . . . 0 0 1 . . . 0<br />
. .<br />
.. . . . . . .. .<br />
0 0 . . . 0 0 0 . . . 0<br />
0 0 . . . 0 0 0 . . . −1<br />
0 0 . . . 1 0 0 . . . 1<br />
⎤<br />
.<br />
⎥<br />
⎦<br />
This (p × (2p − 1))-dimensional matrix will be returned by a.coefs(). So the complete<br />
source code of the fused.lasso object is:<br />
R> fused.lasso