Displaying 2 results from an estimated 2 matches for "reshef".
2011 May 29
1
Fitting spline using Pspline
Hey all,
I seem to be having trouble fitting a spline to a large set of data using
PSpline. It seems to work fine for a data set of size n=4476, but not for
anything larger (say, n=4477). For example:
THIS WORKS:
-----------------------------
random = array(0,c(4476,2))
random[,1] = runif(4476,0,1)
random[,2] = runif(4476,0,1)
random = random[order(random[,1]),]
plot(random[,1],random[,2])
2011 May 19
2
Problem with Princurve
Hey all,
I can't seem to get the princurve package to produce correct results, even
in the simplest cases. For example, if you just generate a 1 period
noiseless sine wave, and ask for the principal curve and plot, the returned
curve is clearly wrong (doesn't follow the sine wave). Here's my code:
library(princurve)
x <- runif(1000,0,2*pi); x <- cbind(x/(2*pi), sin(x))
fit1