Hi,
On Tue, Mar 27, 2012 at 10:35 AM, yx78 wrote:
> In the package lasso2, there is a Prostate Data. To find coefficients in the
> prostate cancer example we could impose L1 constraint on the parameters.
>
> code is:
> data(Prostate)
> p.mean <- apply(Prostate, 5,mean)
> pros <- sweep(Prostate,
Inline:
On Tue, Mar 27, 2012 at 10:00 AM, Weidong Gu wrote:
> Hi,
>
> your code has errors: apply function only has 1 or 2 as margin.
FALSE. Please re-read the Help files. It works as expected with
arbitrary higher dim arrays.
-- Bert
>
> bound is used as turning parameter for summation of a
Hi,
your code has errors: apply function only has 1 or 2 as margin.
bound is used as turning parameter for summation of absolute
coefficients. lasso runs on a grid of the turning parameter for
varying strength of shrinkage. so each turning value may yield
different sets of coefficients and values
In the package lasso2, there is a Prostate Data. To find coefficients in the
prostate cancer example we could impose L1 constraint on the parameters.
code is:
data(Prostate)
p.mean <- apply(Prostate, 5,mean)
pros <- sweep(Prostate, 5, p.mean, "-")
p.std <- apply(pros, 5, var)
pros <- swe
4 matches
Mail list logo