Skip to main content

Neuro-fPCA-fMRI

https://img.shields.io/pypi/v/neuro-fpca-fmri.svg Documentation Status Updates

Full Documentation

Overview

This module implements a functional principal component analysis (fPCA) pipeline designed for fMRI data. The overall procedure involves the following steps:

  1. Data Loading and Preprocessing

    The 4D fMRI image and an associated 3D binary mask are loaded. The mask extracts voxel-specific time series, and the time axis is defined based on the number of timepoints.

  2. B-Spline Basis Construction

    A set of B-spline basis functions is generated to represent smooth temporal dynamics. Each voxel’s time series is approximated as a linear combination of these basis functions.

  3. Penalty Matrix Construction

    A penalty matrix is computed to ensure smoothness of the estimated coefficients. This penalty is defined via an integral involving products of derivatives (typically the second derivative) of the basis functions.

  4. Regularized Spline Regression

    Each voxel time series is approximated by a spline expansion. The coefficients are estimated via a regularized regression problem, and a generalized cross-validation (GCV) criterion selects a voxel-specific regularization parameter (\(\lambda\)).

  5. Functional Principal Component Analysis

    PCA is performed on the coefficient matrix. Multiplying eigenfunctions by coefficients yields voxel-specific importance scores mapped back to brain images, while the basis applied to each eigenfunction gives the temporal dynamics curve shared across voxels.

Output

For each eigenfunction, the following figures are generated:

  • Voxel importance maps

    Voxel importance map
  • Intensity plot

    Temporal intensity plot
  • Signal intensity of best-scoring voxel

    Best voxel fit

Mathematical background

This program implements the methodology from:

Roberto Viviani, Georg Grön and Manfred Spitzer. Functional Principal Component Analysis of fMRI Data.

Full mathematical derivation is available here: Detailed Math Docs

Credits

This package was created using Cookiecutter and the audreyr/cookiecutter-pypackage template.

License

  • Free software: GNU GPLv3

Author

Refael Kohen <refael.kohen@gmail.com> (Yaniv Assaf Lab, Tel Aviv University).

Metadata

Release files for Neuro-fPCA-fMRI 0.0.33

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Neuro-fPCA-fMRI 0.0.33
File Size Uploaded Provenance Actions
neuro_fpca_fmri-0.0.33.tar.gz 10.0 MB Without provenance Details for neuro_fpca_fmri-0.0.33.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Neuro-fPCA-fMRI 0.0.33
File Interpreter ABI Platform Actions
neuro_fpca_fmri-0.0.33-py3-none-any.whl Python 3 none any Details for neuro_fpca_fmri-0.0.33-py3-none-any.whl

Total release size: 10.2 MB

Release files / neuro_fpca_fmri-0.0.33.tar.gz

Download URL neuro_fpca_fmri-0.0.33.tar.gz
Size 10.0 MB
Tags Source
SHA-256 checksum
How to use checksums
d3936e8f48b747fa310f454fc8fbd47931cb346ba144cf5976d6de9b1e3dcb9d
BLAKE2b-256 checksum
How to use checksums
6378f0f5d413bb3d21fbe8847b8ff9cf113cc89b5b4e8d3dc04b4f981c4bdea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Release files / neuro_fpca_fmri-0.0.33-py3-none-any.whl

Download URL neuro_fpca_fmri-0.0.33-py3-none-any.whl
Size 172.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d81e8a38c9c071d3e4a5279a463fdfb281a8e14d526e6aa79c10609bd99f7244
BLAKE2b-256 checksum
How to use checksums
4311631d5e4d27b3d6ef63e23d401cf833ea1772a25c48fece8b3e6c89321e1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Security for Neuro-fPCA-fMRI 0.0.33

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.33 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page