Skip to main content

Statistical learning for neuroimaging in Python

Project description

Pypi Package PyPI - Python Version Github Actions Build Status Coverage Status Azure Build Status

nilearn

Nilearn enables approachable and versatile analyses of brain volumes. It provides statistical and machine-learning tools, with instructive documentation & friendly community.

It supports general linear model (GLM) based analysis and leverages the scikit-learn Python toolbox for multivariate statistics with applications such as predictive modelling, classification, decoding, or connectivity analysis.

Install

Latest release

1. Setup a virtual environment

We recommend that you install nilearn in a virtual Python environment, either managed with the standard library venv or with conda (see miniconda for instance). Either way, create and activate a new python environment.

With venv:

python3 -m venv /<path_to_new_env>
source /<path_to_new_env>/bin/activate

Windows users should change the last line to \<path_to_new_env>\Scripts\activate.bat in order to activate their virtual environment.

With conda:

conda create -n nilearn python=3.9
conda activate nilearn

2. Install nilearn with pip

Execute the following command in the command prompt / terminal in the proper python environment:

python -m pip install -U nilearn

Development version

Please find all development setup instructions in the contribution guide.

Check installation

Try importing nilearn in a python / iPython session:

import nilearn

If no error is raised, you have installed nilearn correctly.

Office Hours

The Nilearn team organizes regular online office hours to answer questions, discuss feature requests, or have any Nilearn-related discussions. Nilearn office hours occur every Friday from 4pm to 5pm UTC, and we make sure that at least one member of the core-developer team is available. These events are held on our on Discord server and are fully open, anyone is welcome to join! For more information and ways to engage with the Nilearn team see How to get help.

Dependencies

The required dependencies to use the software are listed in the file nilearn/setup.cfg.

If you are using nilearn plotting functionalities or running the examples, matplotlib >= 3.0 is required.

Some plotting functions in Nilearn support both matplotlib and plotly as plotting engines. In order to use the plotly engine in these functions, you will need to install both plotly and kaleido, which can both be installed with pip and anaconda.

If you want to run the tests, you need pytest >= 3.9 and pytest-cov for coverage reporting.

Development

Detailed instructions on how to contribute are available at http://nilearn.github.io/stable/development.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nilearn-0.10.0.tar.gz (13.1 MB view details)

Uploaded Source

Built Distribution

nilearn-0.10.0-py3-none-any.whl (9.6 MB view details)

Uploaded Python 3

File details

Details for the file nilearn-0.10.0.tar.gz.

File metadata

  • Download URL: nilearn-0.10.0.tar.gz
  • Upload date:
  • Size: 13.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for nilearn-0.10.0.tar.gz
Algorithm Hash digest
SHA256 cc7f1068e038076527ead1bd363436f88f5e8d21e8bb57b323b30b926fc7553a
MD5 fed3f5cd1fb370598565febaae47b0d5
BLAKE2b-256 6a9b9489fddd02f77f4c1465c708381a151ea822b92c5cd776971694c42903eb

See more details on using hashes here.

File details

Details for the file nilearn-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: nilearn-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for nilearn-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a78df43e0d9dcea18ac3bc2e56e0683c7bfd98cd2dd17e1e134f3003ce464868
MD5 0be233bfee4f52b34c54e34eb2ec0562
BLAKE2b-256 2c39ff1a661c569f01dee8a9c8a1a5887655dbaf28d14dd28e62b0d03b47baf8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page