powered by
Generates data points from a two- or higher-dimensional Twin Peaks manifold.
twinPeaks(Ns, h = 1) hyperTwinPeaks(Ns, n, h = 1)
number of data points.
dimension of the (hyper) plane from which the peaks stand out. For twinPeaks n is 2.
twinPeaks
n
height of the peaks.
A n+1-dimensional data set, where the last dimension represents the height of the points.
n+1
The height of the points is computed as \(\prod_1^n \sin(x_i)\), where \(x_1,...,x_n\) are the coordinates of the point in the (hyper) plane.
# NOT RUN { datap <- twinPeaks(400) par(mfrow = c(1, 3)) plot(datap[,1], datap[,3]) plot(datap[,2], datap[,3]) plot(datap[,1], datap[,2]) # }
Run the code above in your browser using DataLab