Skip to main content
. Author manuscript; available in PMC: 2022 Oct 5.
Published in final edited form as: Nat Protoc. 2020 Mar 18;15(4):1399–1435. doi: 10.1038/s41596-019-0289-5

Table 3 |.

Key functions in the CanlabCore MATLAB toolbox used in the protocol

Function Description Used in…
filenames Lists file names that match a specific pattern in a directory Step 1A; Step 8
fmri_data Loads images into the object or creates an empty fmri_data object Step 1A; Step 5; Step 7C; Step 8; Step 11A
apply_mask Masks an image with a defined mask or calculates pattern expression values Step 1A; Step 9
predict Trains and evaluates predictive models and performs cross-validation and bootstrap tests Step 1A; Step 2; Step 6; Step 7A
roc_plot Calculates accuracy, sensitivity and specificity and visualizes the ROC curve Step 3; Step 7C; Step 10; Step 12
threshold Applies a statistically valid threshold to the images with statistical test results Step 7A
orthviews Displays the image data stored in CANlab tools Step 7A; Step 7B
write Writes data stored in the fmri_data or statistic_image objects into a NIfTI (.nii) or Analyze (.img) file Step 7A; Step 7B
svm_rfe Performs recursive feature elimination with support vector machines Step 7B
canlab_pattern_similarity Calculates similarity between each column in a data matrix and a vector of pattern weights Step 11A