Skip to content
Prev 327175 / 398502 Next

How to search for a sequence(and its combination) inside a vector?

C W
Hi, John
I am doing sparsity recovery from glmnet.

Elements 1, 2, 3 of the repeating sequence are the nonzero elements.
But it's not always recovered.

How my original data frame looks like
i             x
2   1  0.0869399788
3   2 -0.0994713934
4   3  0.0720312837
5   4  0.0075392684
6   5  0.0130364386
7   6  0.0238318855
8   7 -0.0152197121
9   8  0.0097389626
10 13  0.0005068968
12  1  0.0679442455
13  2 -0.0647438953
14  3  0.0656297104
15  5  0.0003406059
16  7  0.0241146788
17  8  0.0093850612


I trimmed out the data column, only grabbing the index.

-M
On Sat, Jul 20, 2013 at 1:50 PM, C W <tmrsg11 at gmail.com> wrote: