random forest model trained with vwnrfs with certain
number of features.
x
a list of lists. Each list contains the list of feature
images required to predict a response or an image. The features
must be the same used during training. I.e., if you train on
T1 and T2 images, those should be the same features used for
prediction, in the same exact order for each subject.
labelmasks
a list of masks where each mask defines the space
to predict from. These can be individual masks for each subject
(i.e., custom brain masks) or a single antsImage that will be used
for all subjects.
rad
vector of dimensionality d define the neighborhood radius.
Must be the same radius with which the model was trained, i.e.,
c(1,1,1)
asFactors
boolean - treat the y entries as factors. If this is
true, the prediction will be a classification, and the output will
produce images. If this is false, the prediction will be a regression,
and the output will produce a single response value.
voxchunk
value of maximal voxels to predict at once. This value
is used to split the prediction into smaller chunks such that memory
requirements do not become too big.
reduceFactor
value of resolution reduction (i.e., for 1mm voxels
and reduceFactor=3) the model will be trained on ~3mm images.
Value
list a 2-list with the rf model, training vector, feature matrix
and the random mask
# NOT RUN {## Do not run## vwnrfs.predict(rfm, x=x, labelmasks=labelmasks,## rad=rad, asFactors=TRUE, voxchunk=voxchunk,## reduceFactor = mr)mask<-makeImage( c(10,10), 0 )## End do not run# }