Description Usage Arguments Details Value Author(s) References See Also Examples

Compute the "Relaxed Lasso" solution with minimal cross-validated L2-loss.

1 |

`X` |
as in function |

`Y` |
as in function |

`K` |
Number of folds. Defaults to 5. |

`phi` |
as in function |

`max.steps` |
as in function |

`fast` |
as in function |

`keep.data` |
as in function |

`warn` |
as in function |

The plot method is not useful for result of `cvrelaxo`

(as no path of solutions exists).

An object of class `relaxo`

, for which print and predict methods exist

Nicolai Meinshausen [email protected]

N. Meinshausen, "Relaxed Lasso", Computational Statistics and Data Analysis, to appear. http://www.stat.berkeley.edu/~nicolai

See also `relaxo`

for computation of the entire solution path

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
data(diabetes)
## Center and scale variables
x <- scale(diabetes$x)
y <- scale(diabetes$y)
## Compute "Relaxed Lasso" solution and plot results
object <- relaxo(x,y)
plot(object)
## Compute cross-validated solution with optimal
## predictive performance and print relaxation parameter phi and
## penalty parameter lambda of the found solution
cvobject <- cvrelaxo(x,y)
print(cvobject$phi)
print(cvobject$lambda)
## Compute fitted values and plot them versus actual values
fitted.values <- predict(cvobject)
plot(fitted.values,y)
abline(c(0,1))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.