pp {cepp} | R Documentation |
Creates the projection pursuit function.
Description
These functions encapsulate everything, that is, the data, the benchmark and the index parameters, needed to compute the projection index.
Usage
pp(r = 0.8, n, data, oth, k)
Arguments
r |
The radius multiplier. Values between 0.5 and 3 seem to work well. |
n |
Number of Monte-Carlo Evaluations to approximate the integral. Values as low as 25 can be used. |
data |
The data for which structure needs to be found. |
oth |
The benchmark dataset. |
k |
The target dimension. |
Details
pp
is for projection pursuit.
Value
The actual index function, which takes a single matrix argument, and returns the index value for that projection.
Author(s)
Mohit Dayal
Examples
##Exploring structure in the RANDU data
##Or using the MINSTD generator
randu <- as.matrix(randu)
randtoolbox::setSeed(570)
w <- randtoolbox::congruRand(1200)
dim(w) <- c(3, 400)
w <- t(w)
m <- 'geodesic'
a <- 0.50
ranif1 <- pp(r=1, n=50, data=randu, oth=w, k=2)
set.seed(50)
F1 <- basis_random(3)
o1 <- optim(par=F1, fn=ranif1, gr=basis_nearby(), method='SANN',
control=list(fnscale=-1, maxit=100, trace=1))
plot(randu %*% o1$par)
##How accurate are the values?
ranif1hi <- pp(r=1, n=500, data=randu, oth=w, k=2)
ranif1hi(o1$par)
[Package cepp version 1.7 Index]