Description Usage Arguments Value Author(s) Examples
View source: R/lesymap.predict.R
Uses an existing lesyamp object output from your analysis to predict new cases.
1 2 | lesymap.predict(lsm, lesions.list, binaryCheck = TRUE, showInfo = TRUE,
...)
|
lsm |
object of class lesymap from previous analysis |
lesions.list |
list of antsImages, or a vector of filenames, or a single antsImage with 4 dimensions. |
binaryCheck |
logical (default=FALSE), make sure the lesion matrix is 0/1. This will help if lesion maps are drawn in MRIcron or other software which label lesioned voxel with value 255. |
showInfo |
logical (default=TRUE), display time-stamped info messages |
... |
other arguments for flexible calling from other functions. |
Vector of predicted values:
behavior.scaled
- scaled values as predicted by the model
behavior.raw
- descaled raw values
Dorian Pustina
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | {
## Not run:
lesydata = file.path(find.package('LESYMAP'),'extdata')
filenames = Sys.glob(file.path(lesydata, 'lesions', 'Subject*.nii.gz'))
behavior = Sys.glob(file.path(lesydata, 'behavior', 'behavior.txt'))
lesions = imageFileNames2ImageList(filenames)
behav = read.table(behavior)$V1 * 1000
train = 1:100
test = 101:131
lsm = lesymap(lesions[train], behav[train], method='sccan',
sparseness=0.2, validateSparseness=F)
predbehav = lesymap.predict(lsm, lesions[test])
## End(Not run)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.