| preformat {Rborist} | R Documentation |
Preformatting for Training with Warm Starts
Description
Presorts and formats training frame into a form suitable for
subsequent training by rfArb caller or rfTrain
command. Wraps this form to spare unnecessary recomputation when
iteratively retraining, for example, under parameter sweep.
Usage
## Default S3 method:
preformat(x,
verbose=FALSE,
...)
Arguments
x |
the design frame expressed as either a |
verbose |
indicates whether to output progress of preformatting. |
... |
unused. |
Value
an object of class Deframe consisting of:
-
rleFramerun-length encoded representation of classRLEFrameconsisting of:-
rankedFramerun-length encoded representation of classRankedFrameconsisting of:-
nRowthe number of observations encoded. -
runValthe run-length encoded values. -
runRowthe corresponding row indices. -
rleHeightthe number of encodings, per predictor. -
topIdxthe accumulated end index, per predictor.
-
-
numRankedpacked representation of sorted numerical values of classNumRankedconsisting of:-
numValdistinct numerical values. -
numHeightvalue offset per predictor.
-
-
facRankedpacked representation of sorted factor values of classFacRankedconsisting of:-
facValdistinct factor values, zero-based. -
facHeightvalue offset per predictor.
-
-
-
nRowthe number of training observations. -
signaturean object of typeSignatureconsisting of:-
predFormpredictor class names. -
levelper-predictor levels, regardless whether realized. -
factorper-predictor realized levels. -
colNamespredictor names. -
rowNamesobservation names.
-
Author(s)
Mark Seligman at Suiji.
Examples
## Not run:
data(iris)
pt <- preformat(iris[,-5])
ppTry <- seq(0.2, 0.5, by= 0.3/10)
nIter <- length(ppTry)
rsq <- numeric(nIter)
for (i in 1:nIter) {
rb <- Rborist(pt, iris[,5], predProb=ppTry[i])
rsq[i] = rb$validiation$rsq
}
## End(Not run)