vwnrfs.predict.Rd
Takes a model created with vwnrfs and builds a prediction based on similar features used to train vwnrfs
vwnrfs.predict(
rfm,
x,
labelmasks,
rad = NA,
asFactors = TRUE,
voxchunk = 30000,
reduceFactor = 1
)
random forest model trained with vwnrfs with certain number of features.
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.
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.
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)
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.
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.
value of resolution reduction (i.e., for 1mm voxels and reduceFactor=3) the model will be trained on ~3mm images.
list a 2-list with the rf model, training vector, feature matrix and the random mask
## 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