ppclp2D: 2D prbabilistic principal curve with length penalty

Description Usage Arguments Examples

View source: R/ppclp.R

Description

This function applies the probabilistic principal curve algorithm with length penalty

Usage

1
2
ppclp2D(x, y, x_fix, y_fix, K = 50, degree_free = 10, lambda = 0.5,
  T = 100)

Arguments

x

The coordinate of the x axis

y

The coordinate of the y axis

x_fix

The cordinate of the starting point of the curve

y_fix

The coordinate of the ending point of the curve

K

the number of knots of the curve

degree_free

the degree of freedom of the B spline

lambda

The magnitude value added to the length penalty

T

The total number of iterations to do the EM algorithm

Examples

1
2
3
4
data("threeExample")
tmpCurve = ppclp2D(threeExample$x, threeExample$y, threeExample$xFix, threeExample$yFix)
plot(threeExample$x, threeExample$y, xlim = c(0,1), ylim = c(0,1), pch = 16, cex = 0.8)
lines(tmpCurve$xFit, tmpCurve$yFit, type = "l", col = "red", lwd = 5)

CHuanSite/ppclp documentation built on May 8, 2021, 3:21 a.m.