guy33 wrote:
>
> As suggested above, specifying useful starting points definitely helps in
> the case of:
>
> x <- seq(0,2*pi, length=1000)
> x <- cbind(x/(2*pi), sin(x))
> fit1 <- principal.curve(x, plot = TRUE, trace = TRUE, maxit = 100, start =
>
As suggested above, specifying useful starting points definitely helps in the
case of:
x <- seq(0,2*pi, length=1000)
x <- cbind(x/(2*pi), sin(x))
fit1 <- principal.curve(x, plot = TRUE, trace = TRUE, maxit = 100, start =
cbind(sort(x[,1]), rep(1, nrow(x
Interestingly, I find that if you sim
ooth.spline:
x=array(0,1000)
y=array(0,1000)
for (i in 1:1000){
x[i] = i/1000
y[i] = (x[i]*(1-x[i]))^.5 * sin(2*pi*(1.05/(x[i]+.05)))
}
plot(x,y)
fit = sm.spline(x, y, norder=2, cv=FALSE)
lines(fit$x,fit$y)
fit2 = smooth.spline(x, y, cv=FALSE)
lines(fit2$x,fit2$y)
What do you make
know if this is just a limitation, or am I missing something.
The dataset I'd like to run it on contains n=6000. If it is a limitation,
does anyone know of any other ways to do this that would accommodate a
larger dataset (ideally with generalized cross validation)?
Thanks!
-guy33
--
View
Here's my code:
library(princurve)
x <- runif(1000,0,2*pi); x <- cbind(x/(2*pi), sin(x))
fit1 <- principal.curve(x, plot = TRUE)
Anyone have any suggestions? If you run this code, do you get the correct
principal curve?
Any help would be really appreciated!
-guy33
--
View this m
5 matches
Mail list logo