Significance Weighted Principal Component Analysis (SWPCA) is a technique (1) developed to parse out the influence of a categorical variable that introduces variability in a certain dataset. This was originally intended to remove acquisition site variance in neuroimaging databases.

Download the code in: Python github icon


To use the script to remove, navigate to the download dir, load the library (import swpca) into your environment and execute this command using the current dataset and acquisition site variables:

import swpca
dataset_rect,weights,A =swpca.swpca(dataset, site)

It will return the rectified dataset, to be used in subsequent analysis.

Algorithm Pipeline and Context

The main use of the SWPCA algorithm is within the context of common neuroimaging analysis, such as Voxel Based Morphometry (VBM) or a classification analysis. It is a preprocessing step, and as such, it is used just after any other preprocessing steps (such as normalization, etc), and before any further analysis. It provides rectified maps with the influence of the categorical variables removed, therefore decreasing the occurrence of false positives.

SWPCA pipeline
Schema of the SWPCA pipeline

  1. Francisco Jesús Martinez-Murcia et al. On the brain structure heterogeneity of autism: Parsing out acquisition site effects with significance-weighted principal component analysis Human Brain Mapping, Access online. 2016.http://dx.doi.org/10.1002/hbm.23449

Publicado por fjmartinezmurcia

Ingeniero de Telecomunicación y Doctor en Tecnologías de la Información y las Comunicaciones por la Universidad de Granada. Investigador Juan de la Cierva en la Universidad de Málaga, especializado en procesamiento y análisis de señales e imágenes médicas cerebrales. Finalista en Famelab 2018 y ganador de 3-Minute Thesis granada 2017. Músico y friki sin remedio.