CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/main/seminar6/extraxct_ica_components.ipynb
Views: 63
Kernel: Python 3 (ipykernel)
In [2]:
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting nilearn
Downloading nilearn-0.9.2-py3-none-any.whl (9.6 MB)
|████████████████████████████████| 9.6 MB 6.8 MB/s
Requirement already satisfied: lxml in /usr/local/lib/python3.7/dist-packages (from nilearn) (4.9.1)
Requirement already satisfied: scikit-learn>=0.22 in /usr/local/lib/python3.7/dist-packages (from nilearn) (1.0.2)
Requirement already satisfied: joblib>=0.15 in /usr/local/lib/python3.7/dist-packages (from nilearn) (1.1.0)
Requirement already satisfied: requests>=2 in /usr/local/lib/python3.7/dist-packages (from nilearn) (2.23.0)
Requirement already satisfied: scipy>=1.5 in /usr/local/lib/python3.7/dist-packages (from nilearn) (1.7.3)
Requirement already satisfied: nibabel>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from nilearn) (3.0.2)
Requirement already satisfied: pandas>=1.0 in /usr/local/lib/python3.7/dist-packages (from nilearn) (1.3.5)
Requirement already satisfied: numpy>=1.18 in /usr/local/lib/python3.7/dist-packages (from nilearn) (1.21.6)
Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.0->nilearn) (2022.2.1)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.0->nilearn) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.7.3->pandas>=1.0->nilearn) (1.15.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn) (1.24.3)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2->nilearn) (2022.6.15)
Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.22->nilearn) (3.1.0)
Installing collected packages: nilearn
Successfully installed nilearn-0.9.2
In [3]:
In [4]:
Mounted at /content/drive
Seminar 6.1 : Extract ICA components from fMRI data
In [28]:
In [29]:
In [30]:
(91, 109, 91, 150)
In [31]:
(91, 109, 91)
In [32]:
<nilearn.plotting.displays._slicers.OrthoSlicer at 0x7f299a08bf50>
In [33]:
/usr/local/lib/python3.7/dist-packages/nilearn/maskers/nifti_masker.py:453: UserWarning: Persisting input arguments took 1.04s to run.
If this happens often in your code, it can cause performance problems
(results will be correct in all cases).
The reason for this is probably some large input arguments for a wrapped
function (e.g. large strings).
THIS IS A JOBLIB ISSUE. If you can, kindly provide the joblib's team with an
example so that they can fix the problem.
imgs, verbose=max(0, self.verbose - 1), **mask_args
/usr/local/lib/python3.7/dist-packages/nilearn/maskers/nifti_masker.py:589: UserWarning: Persisting input arguments took 1.12s to run.
If this happens often in your code, it can cause performance problems
(results will be correct in all cases).
The reason for this is probably some large input arguments for a wrapped
function (e.g. large strings).
THIS IS A JOBLIB ISSUE. If you can, kindly provide the joblib's team with an
example so that they can fix the problem.
dtype=self.dtype,
In [34]:
(150, 551376)
In [35]:
In [36]:
(30, 551376)
In [18]:
In [37]:
(array([1.05000e+02, 1.51400e+03, 4.35170e+04, 2.30037e+05, 2.02732e+05,
4.95990e+04, 1.27720e+04, 6.45600e+03, 3.63400e+03, 1.01000e+03]),
array([-0.0056281 , -0.00426328, -0.00289846, -0.00153365, -0.00016883,
0.00119599, 0.0025608 , 0.00392562, 0.00529044, 0.00665526,
0.00802007]),
<a list of 10 Patch objects>)
In [38]:
In [39]:
(91, 109, 91, 30)
In [40]:
(91, 109, 91)
In [41]:
<nilearn.plotting.displays._slicers.OrthoSlicer at 0x7f2999f30890>
In [25]:
In [27]: