48 lines
1.5 KiB
R
48 lines
1.5 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/vimp.R
|
|
\name{vimp}
|
|
\alias{vimp}
|
|
\title{Variable Importance}
|
|
\usage{
|
|
vimp(forest, newData = NULL, randomSeed = NULL, type = c("mean", "z",
|
|
"raw"), events = NULL, time = NULL, censoringDistribution = NULL,
|
|
eventWeights = NULL)
|
|
}
|
|
\arguments{
|
|
\item{forest}{The forest that was trained.}
|
|
|
|
\item{newData}{A test set of the data if available. If not, then out of bag
|
|
errors will be attempted on the training set.}
|
|
|
|
\item{randomSeed}{The source of randomness used to permute the values. Can be
|
|
left blank.}
|
|
|
|
\item{events}{If using competing risks forest, the events that the error
|
|
measure used for VIMP should be calculated on.}
|
|
|
|
\item{time}{If using competing risks forest, the upper bound of the
|
|
integrated Brier score.}
|
|
|
|
\item{censoringDistribution}{(Optional) If using competing risks forest, the
|
|
censoring distribution. See \code{\link{integratedBrierScore} for details.}}
|
|
|
|
\item{eventWeights}{(Optional) If using competing risks forest, weights to be
|
|
applied to the error for each of the \code{events}.}
|
|
}
|
|
\value{
|
|
A named numeric vector of importance values.
|
|
}
|
|
\description{
|
|
Calculate variable importance by recording the increase in error when a given
|
|
predictor is randomly permuted. Regression forests uses mean squared error;
|
|
competing risks uses integrated Brier score.
|
|
}
|
|
\examples{
|
|
data(wihs)
|
|
|
|
forest <- train(CR_Response(status, time) ~ ., wihs,
|
|
ntree = 100, numberOfSplits = 0, mtry=3, nodeSize = 5)
|
|
|
|
vimp(forest, events = 1:2, time = 8.0)
|
|
|
|
}
|