Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

laplacian

create penalty object for two-dimensional smoothing.


Description

Creates a penalty matrix for use by gen.ridge for two-dimensional smoothing.

Usage

laplacian(size, compose)
laplacian(size = 16, compose = FALSE)

Arguments

size

dimension of the image is size x size; default is 16.

compose

default is compose=FALSE, which means the penalty is returned as an eigen-decomposition. If compose=TRUE, a penalty matrix is returned.

Details

Formulas are used to construct a laplacian for smoothing a square image.

Value

If compose=FALSE, an eigen-decomposition object is returned. The vectors component is a size^2 x size^2 orthogonal matrix, and the $values component is a size^2 vector of non-negative eigen-values. If compose=TRUE, these are multiplied together to form a single matrix.

Author(s)

Trevor Hastie <hastie@stanford.edu

References

Here we follow very closely the material on page 635 in JASA 1991 of O'Sullivan's article on discretized Laplacian Smoothing

See Also


mda

Mixture and Flexible Discriminant Analysis

v0.5-2
GPL-2
Authors
S original by Trevor Hastie & Robert Tibshirani. Original R port by Friedrich Leisch, Kurt Hornik and Brian D. Ripley. Balasubramanian Narasimhan has contributed to the upgrading of the code.
Initial release
2020-06-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.