Saturday, 15 January 2011

r - predict.lars command for lasso regression: what are the "s" and "p" parameters? -


help (predict.lars) in

We can read that the parameter s < / Code> is "value value, or vectors, indexing the path. Its value depends on mode = argument. According to the default (mode =" step "), the values ​​should be placed between 0 and p (E.g., one step 1.3 means the method between steps 1 and 2.) "

What is the meaning of" indexing the route "? In addition, the value of s should be between 1 and p , but what is p ? The parameter p has not been used elsewhere.

I know that this is original, but there is no question, so about the predict.lars .

It is easiest to use mode = "ideal" Options. In this case, s should only have L1-Regulating Coefficient ( \ lambda ). mode =

to understand

A problem that LARS can solve is L1-regulated resistance problem: min || Y-Xw || ^ 2 + \ lambda | W | , where y are output, the X is a matrix of input vectors, and w are the regression weights.

A simplified explanation of how LARS works is that it solves the regression of this problem by adding or removing the dimension from the weight vector.

Each of these greedy steps can be interpreted as a solution to the L1 regular problem with the decreasing values ​​of \ lambda . These steps are known as sequence paths.

Therefore, to solve the \ lambda provided by the user, the LARS path is given, as long as you input the next element \ lambda , Then you take a partial phase ( \ lambda decreases linearly between each step).

No comments:

Post a Comment