CoSMoMVPA functions  header signature files¶
All functions 

find permutation so that values in two inputs are matched 

find the features that show the most variance between classes 

average subsets of samples by unique combinations of sample attributes 

subsample a dataset to have an equal number of samples for each target 

balances a partition so that each target occurs equally often in each training and test chunk 

returns the cartesian product with all combinations of the input 

Check consistency of a dataset. 

Checks whether a certain external toolbox exists, or list citation info 

check that a neighborhood is kosher 

check whether partitions are balanced and not doubledippy 

assigns chunks that are as balanced as possible based on targets. 

knearest neighbor classifier 

linear discriminant analysis classifier  without prior 

libsvmbased SVM classifier 

svm classifier wrapper (around fitcsvm) 

svm classifier wrapper (around svmtrain/svmclassify) 

SVM multiclassifier using matlab’s SVM implementation 

meta classifier that uses feature selection on the training data 

naive bayes classifier 

nearest neighbor classifier 

classifier wrapper that uses either matlab’s or libsvm’s SVM. 

define neighborhood suitable for clusterbased analysis 

fast depthfirst clustering based on equal values of neighbors 

return a struc with configuration settings, or store such settings 

Returns a confusion matrix 

Converts between cell, matrix and struct representations of neighborhoods 

Computes correlation  faster than than matlab’s “corr” for Pearson. 

Computes a splithalf correlation measure 

cross neighborhoods along dataset dimensions 

performs crossvalidation using a classifier 

performs crossvalidation using a classifier 

Slice a dataset by features (columns) [deprecated] 

Slice a dataset by samples (rows) [deprecated] 

find dimension attribute in dataset 

measure generalization across pairwise combinations over time (or any other dimension) 

insert a dataset dimension 

return a mask indicating match of dataset dimensions with values 

prune dataset dimension values that are not used after slicing 

remove a dataset dimension 

rename dimension attribute name 

slice and prune a dataset with dimension attributes [deprecated] 

move a dataset dimension from samples to features or vice versa 

list files recursively in a directory 

display the input as a string representation 

Compute a dissimilarity matrix measure 

apply DISTATIS measure to each feature 

find local extrema in a dataset using a neighborhood 

flattens an arbitrary array to a dataset structure 

convert xform code between numeric and string in fmri dataset 

load an fmri volumetric dataset 

deoblique a dataset 

get orientation of a dataset 

Change the orientation of an fmri dataset 

apply a function to unique combinations of .sa or .fa values 

Compute partitioning scheme based on dataset with independent samples 

index unique (combinations of) elements 

compute neighborhoods stretching intervals 

compares two input for equality with NaNs considered being equal 

checks the presence of (possibly nested) fieldnames in a struct 

give temporary filename that does not exist when this function is called 

maps a dataset structure to a NIFTI, AFNI, or BV structure or file 

maps a dataset to a FieldTrip or EEGlab structure or file 

maps a dataset structure to AFNI/SUMA NIML dset or BV SMP file 

normalize dataset either by estimating or applying estimated parameters 

find intersection mask across a set of datasets 

returns a mask indicating matching occurences in two arrays or cells relative to the second array 

General cluster measure 

correct baseline of MEEG dataset 

determine neighborhood of channels in MEEG dataset 

find neighbors of MEEG channels 

return channel types and optionally a feature mask matching a type 

Returns a dataset structure based on MEEG data 

finds an MEEG channel layout associated with a dataset 

return supported MEEG channel layouts 

Read FieldTrip layout 

return mapping from MEEG sensor types to sensor layouts 

return supported MEEG acquisition systems and their channel labels 

meta classifier that uses feature selection on the training data [deprecated] 

compute randomeffect cluster statistics corrected for multiple comparisons 

compute phase statistics based on Monte Carlo simulation 

Run (fast) Naive Bayes classifier searchlight with crossvalidation 

partitions for into nchoosek(n,k) parititions with optional grouping schemas. 

partitions a neighborhood in a cell with (smaller) neigborhoods 

generates an nfold partition scheme 

normalize dataset either by estimating or applying estimated parameters 

compute inverse normal cumulative distribution function 

notify that a test in the test suite is skipped 

generates an oddeven partition scheme 

compute overlap between vectors or cellstrings in two cells 

get number of processes available from Matlab parallel processing pool 

applies a function to elements in a cell in parallel 

Principal Component Analysis 

compute pairwise distance between samples in a matrix 

compute phase inter trial coherence 

Compute phase perturbation, or opposition sum or product phase statistic 

Plots a set of slices from a dataset, nifti image, or 3D data array 

helper function to publish example scripts (for developers) 

generate uniform pseudorandom numbers, optionally using a seed value 

provides randomized target labels 

generate random permutation of integers 

remove ‘useless’ (constant and/or nonfinite) samples or features 

run unit and documentation tests 

sample without replacement from subsets of integers in balanced manner 

Generic searchlight function returns a map of results computed at each searchlight location 

set the matlab path for CoSMoMVPA 

Shows a progress bar, and time elapsed and expected to complete. 

return neighborhood where each feature is only neighbor of itself 

Notify that test in the test suite is skipped if no external is present 

Slice a dataset by samples (the default) or features 

computes sub index offsets for voxels in a sphere 

computes neighbors for a spherical searchlight 

splits a dataset by unique values in (a) sample or feature attribute(s). 

converts pairwise distances between matrix and vector form 

stacks multiple datasets to yield a single dataset 

compute ttest or Ftest (ANOVA) statistic 

Convert statcode for different analysis packages 

joins strings using a delimeter string 

splits a string based on another delimeter string 

joins values in structs or keyvalue pairs 

Returns a dataset structure based on surface mesh data 

neighborhood definition for surfacebased searchlight 

generate synthetic dataset 

find values in left or right tail of a vector or string 

measure correlation with target dissimilarity matrix 

Compute ranks for the input along the specified dimension 

print or return ASCII contents of a file 

unflattens a dataset from 2 to (1+K) dimensions. 

convert to and from spatial (x,y,z) coordinates 

convert between volumetric (fmri) and gridbased (meeg source) dataset 

show a warning message; by default just once for each message 

Given multiple predictions, get indices that were predicted most often. 

GUIbased ‘wizard’ to set CoSMoMVPA configuration file 

return system, toolbox and externals information 