Learn R Programming

LPCM (version 0.43)

lpc.spline: Representing local principal curves through a cubic spline.

Description

Fis a natural cubic spline component-wise through the series of local centers of mass. This provides a continuous parametrization in terms of arc length distance, which can be used to compute a projection index for the original or new data points.

Usage

lpc.spline(lpcobject, optimize = TRUE, compute.Rc=FALSE,
     project=FALSE, ...)

Arguments

lpcobject
Object of class lpc.
optimize
Boolean. If TRUE, optimize is used to find the point on the curve with minimum distance. Otherwise, data points are only projected onto the closest knot.
compute.Rc
Boolean. If TRUE, the goodness-of-fit measure $R_C$ suggested in [1] is computed and returned (using the scaled data, if scaled=TRUE in lpcobject).
project
Boolean. If TRUE, projections onto curve are computed.
...
Additional arguments to be passed to lpc.project.spline

Value

  • knots.piLPC parameters (in cubic spline parametrization) at position of the knots of the spline function (these are not identical to the LPC mass points!)
  • knots.coordsCoordinates of the spline knots.
  • closest.piParameter of the projected data points.
  • closest.coordsCoordinates of projected data points.
  • closest.distEuclidean distance between original and projected data point.
  • closest.branchID Number of the branch on which the data point was projected (the IDs are given in the output of function lpc).
  • RcValue of $R_C$.
  • projectrepeats the input value of project.
  • lpcobjectreturns the provided object lpcobject.
  • splinefunreturns the cubic spline function (generated by lpc.splinefun).

Warning

Careful with options project and compute.Rc - they can take rather long if the data set is large!

Details

See reference [2].

References

[1] Einbeck, J., Tutz, G., and Evers, L. (2005). Local principal curves. Statistics and Computing 15, 301-313.

[2] Einbeck, J., Evers, L. & Hinchliff, K. (2010): Data compression and regression based on local principal curves. In A. Fink, B. Lausen, W. Seidel, and A. Ultsch (Eds), Advances in Data Analysis, Data Handling, and Business Intelligence, Heidelberg, pp. 701--712, Springer.

See Also

lpc

Examples

Run this code
data(gvessel)
gvessel.lpc <- lpc(gvessel[,c(2,4,5)],   h=0.11,  x0=c(35, 1870, 6.3))
gvessel.spline  <- lpc.spline(gvessel.lpc)
plot(gvessel.spline)

Run the code above in your browser using DataLab