create learned tesselation of feature space after PC transformation
1 2 3 4 5 6 
formula 
standard formula, typically of the form "y~." where y denotes the class label variable to be predicted by all remaining features in the input data frame 
data 
a data.frame instance 
learnerSchema 
an instance of 
trainInds 
integer vector of rows of 
... 
additional parameters for use with 
dropIntercept 
logical indicating whether to include column of 1s among feature columnvectors 
ngpts 
number of equispaced points along the range of each input feature to use in forming a grid in feature space 
predExtras 
a list with named elements giving binding to extra parameters needed
to predict labels for the learner in use. For example, with

predWrapper 
Sometimes a function call is needed to extract the predicted
labels from the RObject applied to the 
instance of projectedLearnerclass
VJ Carey <stvjc@channing.harvard.edu>
none.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  library(mlbench)
# demostrate with 3 dimensional hypercube problem
kk = mlbench.hypercube()
colnames(kk$x) = c("f1", "f2", "f3")
hcu = data.frame(cl=kk$classes, kk$x)
library(MLInterfaces)
set.seed(1234)
sam = sample(1:nrow(kk$x), size=nrow(kk$x)/2)
ldap = projectLearnerToGrid(cl~., data=hcu, ldaI,
sam, predWrapper=function(x)x$class)
plot(ldap)
confuMat(ldap@fittedLearner)
nnetp = projectLearnerToGrid(cl~., data=hcu, nnetI, sam, size=2,
decay=.01, predExtras=list(type="class"))
plot(nnetp)
confuMat(nnetp@fittedLearner)
if (require(rgl) && interactive()) {
learnerIn3D(nnetp)
## customising the rgl plot
learnerIn3D(nnetp, size = 10, alpha = 0.1)
}

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.