forked from neurodata/SPORF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackPredict.Rd
More file actions
31 lines (27 loc) · 970 Bytes
/
PackPredict.Rd
File metadata and controls
31 lines (27 loc) · 970 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PackPredict.R
\name{PackPredict}
\alias{PackPredict}
\title{Compute class predictions for each observation in X}
\usage{
PackPredict(X, num.cores = 1)
}
\arguments{
\item{X}{an n by d numeric matrix (preferable) or data frame. The rows correspond to observations and columns correspond to features of a test set, which should be different from the training set.}
\item{num.cores}{the number of cores to use while predicting. (num.cores=0)}
}
\value{
predictions an n length vector of prediction class numbers
}
\description{
Predicts the classification of samples using a trained forest.
}
\examples{
library(rerf)
trainIdx <- c(1:40, 51:90, 101:140)
X <- as.matrix(iris[, 1:4])
Y <- as.numeric(iris[, 5])
paramList <- list(p = ncol(X), d = ceiling(sqrt(ncol(X))))
forest <- RerF(X, Y, FUN = RandMatRF, paramList = paramList, rfPack = TRUE, num.cores = 1)
predictions <- PackPredict(X)
}