lesymap.predict: Prediction of new cases from lesymap output

View source: R/lesymap.predict.R

lesymap.predictR Documentation

Prediction of new cases from lesymap output

Description

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

Usage

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:

  • behavior.scaled - scaled values as predicted by the model

  • behavior.raw - descaled raw values

Author(s)

Dorian Pustina

Examples

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


dorianps/LESYMAP documentation built on June 1, 2024, 2:12 a.m.