lesymap.predict: Prediction of new cases from lesymap output

Description Usage Arguments Value Author(s) Examples

View source: R/lesymap.predict.R

Description

Uses an existing lesyamp object output from your analysis to predict new cases.

Usage

1
2
lesymap.predict(lsm, lesions.list, binaryCheck = TRUE, showInfo = TRUE,
  ...)

Arguments

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.

Value

Vector of predicted values:

Author(s)

Dorian Pustina

Examples

 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)
}

neuroconductor-releases/LESYMAP documentation built on Nov. 13, 2020, 11:28 p.m.