lesymap.predict.Rd
Uses an existing lesyamp object output from your analysis to predict new cases.
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
{ if (FALSE) { 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]) } }