|
| 1 | +\documentclass[a4paper]{article} |
| 2 | +\usepackage[utf8]{inputenc} |
| 3 | +\usepackage[T1]{fontenc} |
| 4 | +\usepackage{graphicx} |
| 5 | +\usepackage{hyperref} |
| 6 | + |
| 7 | +\begin{document} |
| 8 | + |
| 9 | +\noindent \textbf{Title} |
| 10 | + |
| 11 | +\medskip |
| 12 | + |
| 13 | +\noindent Nilearn: Machine learning and statistics for fMRI in Python |
| 14 | + |
| 15 | +\bigskip |
| 16 | + |
| 17 | +\noindent \textbf{Authors} |
| 18 | + |
| 19 | +\medskip |
| 20 | + |
| 21 | +\noindent Nicolas Gensollen, Thomas Bazeille, Kshitij Chawla, Jerome-Alexis Chevalier, Kamalaker Dadi, Jérôme Dockès, Elizabeth DuPre, Daniel Gomez, Chris Gorgolewski, Alexandre Gramfort, Julia M Huntenburg, Eric Larson, Robert Luke, Chris Markiewicz, Binh Nguyen, Ana Luísa Pinho, Sylvain Takerkart, Bertrand Thirion, Taylor Tsalo, Gaël Varoquaux |
| 22 | + |
| 23 | +\bigskip |
| 24 | + |
| 25 | +\noindent \textbf{Introduction} |
| 26 | + |
| 27 | +\medskip |
| 28 | + |
| 29 | +\noindent Efficient and reproducible science depends on a strong software ecosystem \cite{Poldrack2019}. We present here Nilearn, a Python package empowering the neuroimaging community by enabling fast and easy statistical learning on fMRI data: \url{https://nilearn.github.io}. It has been under continuous development for close to 10 years and just reached its 0.7 release. It is now part of the neuroimaging tools ecosystem with approximately 700 stars, 400 forks, and 135 contributors on GitHub, as well as more than 200 discussions on the forum Neurostars. |
| 30 | + |
| 31 | +\medskip |
| 32 | + |
| 33 | +\noindent Nilearn provides efficient and reliable implementations of machine learning methods tailored to the needs of the neuroimaging community. It builds upon a Python "data science ecosystem" of packages such as numpy \cite{VanDerWalt2011}, scipy \cite{Oliphant2007}, scikit-learn \cite{Pedregosa2011}, and pandas \cite{McKinney2010}, that are extensively used, tested and optimized by a large scientific and industrial community. This makes it easy to use for a broad spectrum of researchers who are familiar with the Python ecosystem. Specifically, Nilearn provides methods for decoding functional connectivity analysis, and statistical parametric mapping. It also includes datasets for teaching, and interactive visualization of brain images and connectomes. |
| 34 | + |
| 35 | +\bigskip |
| 36 | + |
| 37 | +\noindent \textbf{Methods} |
| 38 | + |
| 39 | +\medskip |
| 40 | + |
| 41 | +\noindent Nilearn is a community-led open-source project, developed and used by researchers in neuroimaging and machine-learning. It strives to be easy to use with simple code and focuses only on reliable and well-established methods. User guides provide an introduction to machine learning and statistics for fMRI with examples showcasing all functionalities. Tutorials and coding sprints are also organized regularly to engage the neuroimaging community. |
| 42 | + |
| 43 | +\medskip |
| 44 | + |
| 45 | +\noindent Nilearn uses industry-standard methods for software development: source code is version controlled, functions are covered by unit tests that are run in a Continuous Integration framework, and several reviewers check every contribution. These best practices allow to incorporate contributions from around the world while preserving the quality and reliability of the code. |
| 46 | + |
| 47 | +\bigskip |
| 48 | + |
| 49 | +\noindent \textbf{Results} |
| 50 | + |
| 51 | +\medskip |
| 52 | + |
| 53 | +\noindent Nilearn is widely used and covers many of the analysis needs for neuroimaging: |
| 54 | + |
| 55 | +\begin{itemize} |
| 56 | + \item Manipulation of brain images and basic signal processing; |
| 57 | + \item Supervised learning and decoding; |
| 58 | + \item Functional connectivity and decomposition methods; |
| 59 | + \item Plotting; |
| 60 | + \item Projection of volumetric data to surfaces; |
| 61 | + \item General Linear Model-based analysis and statistical testing; |
| 62 | + \item Model selection and validation, parallelism, and caching. |
| 63 | +\end{itemize} |
| 64 | + |
| 65 | +\noindent In its 0.7 release, Nilearn includes in a new glm module with all the functionalities of its previous sister’s project Nistats. This enables fitting mass univariate linear models in a consistent pipeline with simpler dependencies. |
| 66 | + |
| 67 | +\medskip |
| 68 | + |
| 69 | +\noindent A new Decoder object was also added to ease classification and regression tasks in a decoding pipeline. It implements a model selection scheme that averages the best models within a cross validation loop. These objects are tailored for usability and provide for example a direct interface with Nifti files on disk. In addition, the decoder objects pipeline have been extended with one fast clustering step at the beginning (yielding an implicit spatial regularization) and aggregates a high number of estimators trained on various splits of the training set. This returns a state-of-the-art decoding pipeline at a low computational cost (see fig. \ref{fig:figure_1}). |
| 70 | + |
| 71 | +\medskip |
| 72 | + |
| 73 | +\noindent Nilearn is also extensively used for its plotting capabilities (see fig. \ref{fig:figure_2}). New plotting functions have been added and enable, for example, plotting contours of regions of interest on surfaces, visualizing events file, or generating carpet plots for visualizing global patterns in 4D functional data over time. |
| 74 | + |
| 75 | +\bigskip |
| 76 | + |
| 77 | +\noindent \textbf{Conclusion} |
| 78 | + |
| 79 | +\medskip |
| 80 | + |
| 81 | +\noindent By following industry-standard methods and making analysis pipelines documented, version controlled, peer-reviewed, and shared, Nilearn targets the reproducibility crisis of neuroimaging by enabling researchers to produce pipelines that are intelligible, reproducible, and that can be extended to novel datasets. |
| 82 | + |
| 83 | +\newpage |
| 84 | + |
| 85 | + |
| 86 | +\begin{figure}[htp] |
| 87 | + \centering |
| 88 | + \includegraphics[scale=.8]{./figure_1} |
| 89 | + \caption{Example of loading data, fitting a decoder, and plotting the resulting statistical map in a few lines of Python code.} |
| 90 | + \label{fig:figure_1} |
| 91 | +\end{figure} |
| 92 | + |
| 93 | +\begin{figure}[hbp] |
| 94 | + \centering |
| 95 | + \includegraphics[scale=.8]{./figure_2} |
| 96 | + \caption{Example of surface based first level analysis.} |
| 97 | + \label{fig:figure_2} |
| 98 | +\end{figure} |
| 99 | + |
| 100 | +\newpage |
| 101 | + |
| 102 | +\bibliographystyle{plain} |
| 103 | +\bibliography{bibliography} |
| 104 | + |
| 105 | +\end{document} |
0 commit comments