Skip to content

Commit

Permalink
add note on factor levels for classification
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Wright committed Dec 1, 2015
1 parent 9e3d770 commit 9c93cf8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ranger-r-package/ranger/R/predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ predict.ranger.forest <- function(object, data, predict.all = FALSE,
}

##' Prediction with new data and a saved forest from Ranger.
##'
##' For classification and predict.all = TRUE, a matrix of factor levels is returned.
##' To retrieve the corresponding factor levels, use rf$forest$levels, if rf is the ranger object.
##'
##' @title Ranger prediction
##' @param object Ranger \code{ranger} object.
Expand Down
4 changes: 4 additions & 0 deletions ranger-r-package/ranger/man/predict.ranger.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Object of class \code{ranger.prediction} with elements
\description{
Prediction with new data and a saved forest from Ranger.
}
\details{
For classification and predict.all = TRUE, a matrix of factor levels is returned.
To retrieve the corresponding factor levels, use rf$forest$levels, if rf is the ranger object.
}
\author{
Marvin N. Wright
}
Expand Down

0 comments on commit 9c93cf8

Please sign in to comment.