Function used to optimize SCCAN sparseness for lesion to symptom mapping.

optimize_SCCANsparseness(lesmat, behavior, mask, nFolds = 4,
  sparsenessPenalty = 0.03, lowerSparseness = -0.9,
  upperSparseness = 0.9, tol = 0.03, justValidate = FALSE,
  cvRepetitions = ifelse(length(behavior) <= 30, 6,
  ifelse(length(behavior) <= 40, 5, ifelse(length(behavior) <= 50, 4, 3))),
  showInfo = TRUE, directionalSCCAN = TRUE, mycoption = 1,
  robust = 1, sparseness = NA, nvecs = 1, cthresh = 150,
  its = 30, npermsSCCAN = 0, smooth = 0.4,
  sparseness.behav = -0.99, maxBased = FALSE, ...)

Arguments

lesmat

lesion matrix

behavior

behavior vector

mask

antsImage mask

nFolds

how many folds to use

sparsenessPenalty

penalty term

lowerSparseness

minimum searched sparseness

upperSparseness

maximum searched sparseness

tol

tolerance value, see optimize() in R

justValidate

just check the CV of provided sparseness

cvRepetitions

number of cross-validations at each sparseness value. Dynamically set depending on sample size: <=30 to 6 reps, <=40 to 5 reps, <=50 to 4 reps, > 50 to 3 reps.

showInfo

logical (default=TRUE) display messages

directionalSCCAN

(default=TRUE) switching to FALSE will switch sparseness range in the positive side, 0.005 to 0.9

mycoption

standard SCCAN parameter

robust

standard SCCAN parameter

sparseness

standard SCCAN parameter

nvecs

standard SCCAN parameter

cthresh

standard SCCAN parameter

its

standard SCCAN parameter

npermsSCCAN

SCCAN permutations

smooth

standard SCCAN parameter

sparseness.behav

what sparsness to use for behavior

maxBased

standard SCCAN parameter

...

other arguments received from lesymap or lsm_sccan.

Value

List with:
minimum - best sparseness value
objective - minimum value of objective function
CVcorrelation - cross-validated correlation of optimal sparness