User:Kms91/sandbox

=Multivoxel pattern analysis= Multivoxel pattern analysis (MVPA), sometimes referred to as multivariate pattern analysis, is a new method of analysis for functional magnetic resonance imaging (fMRI) data which is becoming increasingly popular in the research community. The key feature of MVPA in contrast to other techniques is its ability to evaluate patterns of activity across numerous voxels (volumetric pixels). By using a pattern-oriented (multivariate) approach rather than a single-voxel (univariate) approach, researchers are able to overcome certain methodological restraints and investigate new phenomenon.

Procedure
Before MVPA can be performed, the data must be preprocessed to address motion, head positioning, noise in the data, slice timing inequality, and any other external sources of variability.

Feature selection
The first step is to determine which voxels comprise the region of interest (ROI). Localizer tasks are commonly used to isolate the ROI. In these tasks, participants are presented with stimuli or engage in behaviours that produce the same activation as the experimental task. For example, if the experimental task involves interacting with an object, the localizer should use the same object and involve reaching without grasping, reaching with grasping, and reaching with grasping and action. The activation from these three tasks could then be used to isolate the regions involved in each element of the experimental task, which would allow for isolating the ROI.

Pattern assembly
Following feature selection, the data from the ROI at specified time points (each trial) is sorted into discrete patterns of activation, which are specified by the researcher (for example, trial one is a face, trial two a tool, and so on). Changes in the fMRI BOLD signal lag several seconds behind the task (see haemodynamic response) so the time points must be slightly delayed. Additionally, time with fMRI data can only be considered in time intervals equal to the time required to collect each volume - around two second intervals.

Classifier training
In this stage, an algorithm learns to differentiate the patterns of activation in the ROI. Weighted sums of activation across voxels are calculated and then passed on to a classifier, which creates a threshold for identification of the pattern. Classifier training uses the majority of trial repetitions rather than the entire dataset. The purpose of withholding a subset of the data during classifier training is to have untrained data to later test the classifier with. Typically, one of the following linear classifiers is used: It can also be valid to use a non-linear classifier, but this is not as common. Criticisms of studies using MVPA tend to focus on the classifier selected or how the classifier was used.
 * Correlation-based classifiers
 * Neural networks without a hidden layer
 * Linear discriminant analysis
 * Linear support vector machines
 * Gaussian naïve bayes classifers

Generalization testing
In the final step, the classifier is tested using the untrained subset of data to determine if the algorithm can accurately discern the patterns of activation in the ROI. The "correct" classification is based on the classifications set out by the researcher (an example of supervised learning). The result is a series of computer-generated classifications. High accuracy in these classifications implies that the experimental conditions produced significantly different patterns of activation at the particular ROI. Accuracy is not the only measure of interest. The pattern of activation itself could be the final measure of interest.

Applications
The advent of MVPA has made a variety of new research topics possible. In general, these topics can be categorized as: Several groups have released computational toolboxes to facilitate the use of MVPA. These toolboxes are typically designed for platforms like Matlab and Python.
 * Classification
 * Comparisons of the patterns of activity in specified regions of cortex that are produced under various circumstances
 * For example, when viewing faces, cats, man-made objects, or static
 * "Mind reading"
 * Using a classifier to make inferences about the internal state
 * For example, accurately predicting which of two simultaneously presented gratings or motion directions is being attended to
 * Medical
 * Pattern analysis has neurodiagnostic potential
 * For example, identifying Alzheimer's disease, autism , and Huntington's disease
 * Voxel contents and function
 * It was once the case that when a voxel was highly activated by multiple contrasts, it could be interpreted as either coding for a common computational process or containing functionally independent populations of neurons With MVPA, it is possible to accurately examine covariations to determine which interpretation is more likely correct.

Limitations
While MVPA is a very powerful tool, it is not without fault. The main issues surrounding the use of MVPA are: An alternative to MVPA is fMRI Adaptation, which has a different set of limitations that may be better suited to some projects.
 * Requires that each category be explicitly described. In reality, there is essentially no limit to the number of categories (thoughts, perceptions, sensations, etc.) which may be present. MVPA is not well suited to studies with large numbers of categories.
 * Multiple patterns occurring simultaneously can be extremely difficult to interpret.
 * "Mind Reading" predictions require extensive training material.
 * The process is lengthy and complicated.
 * The outcome is biased by the researcher's category assignments during pattern assembly. As a result, a condition pairing which contains two very similar patterns may be overlooked if the conditions were assigned to different categories.
 * There are relatively few publications using MVPA, which complicates the research process when using MVPA. However, use of MVPA is becoming increasingly common.

Comparison to single-voxel analysis
Single-voxel analysis and MVPA, the two types of techniques for fMRI BOLD signal analysis, are fundamentally different. Single-voxel analysis quite often involves spatial and temporal smoothing, and views voxels in isolation (univariate). In contrast, MVPA involves no smoothing and views voxels in the context of a pattern of activity (multivariate). There exist differences in the methodologies, statistics, and goals of these approaches. The general advantages and disadvantages to using MVPA over single-voxel analysis are summarized below :


 * Advantages
 * Using multiple voxels reduces the influence of noise in the data
 * Absence of smoothing increases sensitivity and preserves fine-grained spatial patterns
 * Fewer volumes required
 * Can easily include a classifier prediction
 * Facilitates research of larger regions and circuits


 * Disadvantages
 * Absence of smoothing maintains more noise in the data
 * Lengthier and more complicated analysis
 * Not nearly as well established

It is sensible to use single-voxel analysis for cases which do not require pattern analysis. Using MVPA in these cases would cause unnecessary delays and complication. Relating findings to prior research is also much easier when using single-voxel analysis due to the volume of existing research that has used single-voxel analysis.

Representational similarity analysis
Representational similarity analysis (RSA), not to be mistaken with representational difference analysis, is a new form of MVPA. There are two defining characteristics of RSA. First, there is no classifier or prediction (categories are not declared). Second, RSA is not specific to fMRI or even to functional neuroimaging. RSA combines the core of MVPA with matrix similarity and cluster analysis. The product is a pattern analysis technique that can relate functional information across nearly all modalities (fMRI, EEG, MEG, computational models, and more). All conditions are considered in isolation and assigned to categories (clusters), which are automatically generated based on relative similarities.

Procedure

 * 1) Like MVPA, RSA with fMRI data begins with preprocessing, feature selection, pattern assembly, and the calculation of weighted sums of activation across voxels. This step varies across modalities.
 * 2) Next, dissimilarities are calculated (one minus the correlation) for each pairing of conditions and entered into a representational dissimilarity matrix. The representational dissimilarity matrix will contain values between zero (entirely similar) and one (entirely dissimilar), and is often represented with colour (for example, green to red). Representational similarity matrices may also be used so it is crucial to state or check which is in use.
 * 3) Dissimilarities are used in a cluster analysis to produce categories based exclusively on patterns of activation.
 * 4) Results are tested using randomization and bootstrap techniques.
 * 5) The representational dissimilarity matrix can be compared to one or more predicted result patterns generated by theories (see below).
 * 6) Results can be represented in a number of ways (see next section).

Visual representations of data
The output of RSA is often quite extensive, variable, and can be inherently difficult to interpret so it is crucial that the data be represented in way that is easy to read. Some visual representations will lend better to certain datasets than others. Overall, there is no "best" or "standard" representation at this point in time. The figures presented all depict the same hypothetical dataset. Some common representations are summarized below:


 * Representational dissimilarity and similarity matrices
 * Representational dissimilarity matrices are N-by-N arrays, where N is equal to the number of conditions and each cell contains a number (0 to 1) or colour indicating the similarity or dissimilarity between the two conditions. To switch between similarity and dissimilarity, simply set each value equal to one minus its current value. The data is mirrored across a diagonal axis meaning that half is redundant. For this reason, some choose to only include half of the matrix cut along the diagonal. Representational dissimilarity matrices tend to work best for medium to large numbers of conditions.


 * Similarity-graph icon
 * Icons representing each condition are connected by lines. The length of the lines indicate the similarity between the conditions (see graphlets) Similarity-graph icon often lends well to very small numbers of conditions.


 * Multidimensional scaling
 * In multidimensional scaling, each condition is plotted along multiple dimensions (usually at 2D or 3D, see figure) and distance between condition indicates similarity. These representations were first applied to fMRI data in 1998, before the development of either MVPA or RSA. Multidimensional scaling's uses have extend beyond visual representations. Multidimensional scaling tends to work best for medium to large numbers of conditions.


 * Dendrograms
 * Dendrograms are hierarchical plots illustrating similarity through height of connections, which is calculated through hierarchical clustering. These are similar to the plots frequently used in phylogenetics. Dendrograms are well suited to low to medium numbers of conditions.


 * Mapping across cortex
 * If there are very few conditions or if the data is presented on a computer, the actual activation pattern across the cortex can be displayed for each category. Pycortex WebGL MRI Viewer is an example of this representation technique and additionally includes a semantic space (visualization of clustering).

Applications
RSA differs from MVPA in that it doesn't assign conditions to categories and it uses an abstract dissimilarity measure.

By not assigning conditions, fewer biases are introduced and fewer methodological restraints are imposed, which makes research involving large numbers of conditions and involving conditions for which categories cannot be assigned more feasible. Additionally, basing categorization exclusively on observed patterns can reveal unexpected similarities. These unexpected results may challenge existing theories or generate novel theories. Multiple theories can easily be compared to a single RSA dataset and quantitatively evaluated relative to one another.

Using an abstract dissimilarity measure allows any modality that can produce this measure to be compared. For example, it is possible to compare output from a computer model with actual human data using RSA. This narrows the gap between connectionist models and functional neuroimaging. It has also been possible to relate region-specific data between species. For example, inferior temporal lobe data has been compared between humans and monkeys. Similarly, it should be possible to relate single-cell data from animal models to fMRI data from humans.

Limitations
Relative to MVPA, RSA is more complicated to use, requires more time to run, and can require more computing power. Depending on the machine and amount of information, RSA scripts may be required to run overnight to process a single participant's data. Additionally, the meaning of similar activation patterns in a particular region between seemingly unrelated stimuli can be difficult to interpret. Even fewer studies have used RSA than have used MVPA. The use of dissimilarity matrices rather than similarity matrices is a likely source of confusion. RSA is an extremely new technique and so should be used and interpreted with caution.

Future directions
MVPA is becoming an increasingly common practice and is contributing to advances in the understanding of regional functioning, neural circuits, and regional activation patterns. This highly advanced technique represents a part of the increasing presence of computers in cognitive science. As computers and algorithms advance, MVPA may become a real time analysis. This could allow for biofeedback breakthroughs such as controlling robotic limbs with natural patterns of thought.