Neurocaps

Latest version: v0.21.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 18 of 19

0.9.5

🚀 New/Added
- Added ability to create custom colormaps with `CAP.caps2surf` by simply using the cmap parameter with matplotlibs
`LinearSegmentedColormap` with the `cmap` kwarg. An example of its use can be seen in demo.ipynb and the in the README.
- Added `surface` **kwargs to `CAP.caps2surf` to use "inflated" or "veryinflated" for the surface plots.

0.9.4.post1

💻 Metadata
- Update some metadata on PyPi

0.9.4

♻ Changed

- Improvements to docstrings in all methods in neurocaps.
- Restricts scikit-learn to version 1.4.0 and above.
- Reduced the number of default `confound_names` in the `TimeseriesExtractor` class that will be used if `use_confounds`
is True but no `confound_names` are specified. The new defaults are listed below. The previous default included
nonlinear motion parameters.
- Use default of "run-0" instead of "run-1" for the subkey in the `TimeseriesExtractor.subject_timeseries` for files
processed with `TimeseriesExtractor.get_bold` that do not have a run ID due to only being a single run in the dataset.

python
if high_pass:
confound_names = [
"trans_x",
"trans_x_derivative1",
"trans_y",
"trans_y_derivative1",
"trans_z",
"trans_z_derivative1",
"rot_x",
"rot_x_derivative1",
"rot_y",
"rot_y_derivative1",
"rot_z",
"rot_z_derivative1",
]
else:
confound_names = [
"cosine*",
"trans_x",
"trans_x_derivative1",
"trans_y",
"trans_y_derivative1",
"trans_z",
"trans_z_derivative1",
"rot_x",
"rot_x_derivative1",
"rot_y",
"rot_y_derivative1",
"rot_z",
"rot_z_derivative1",
"a_comp_cor_00",
"a_comp_cor_01",
"a_comp_cor_02",
"a_comp_cor_03",
"a_comp_cor_04",
"a_comp_cor_05",
]

0.9.3

🚀 New/Added
- Supports nilearns versions 0.10.1, 0.10.2, 0.10.4, and above (does not include 0.10.3).

♻ Changed
- Renamed `CAP.visualize_caps` to `CAP.caps2plot` for naming consistency with other methods for visualization in
the `CAP` class.

0.9.2

🚀 New/Added
- Added ability to create correlation matrices of CAPs with `CAP.caps2corr`.
- Added more **kwargs to `CAP.caps2surf`. Refer to the docstring to see optional **kwargs.

🐛 Fixes
- Use the `KMeans.labels_` attribute for scikit's KMeans instead of using the `KMeans.predict` on the same dataframe
used to generate the model. It is unecessary since `KMeans.predict` will produce the same labels already stored in
`KMeans.labels_`. These labels are used for silhouette method.

♻ Changed
- Minor aesthetic changes to some plots in the `CAP` class such as changing "CAPS" in the title of `CAP.caps2corr`
to "CAPs".

0.9.1

🚀 New/Added
- Ability to specify resolution for Schaefer parcellation.
- Ability to use spatial smoothing during timeseries extraction.
- Ability to save elbow plots.
- Add additional parameters - `fslr_density` and `method` to the `CAP.caps2surf` method to modify interpolation
methods from MNI152 to surface space.
- Increased number of parameters to use with scikit's `KMeans`, which is used in `CAP.get_caps`.

♻ Changed
- In, `CAP.calculate_metrics` nans where used to signify the abscense of a CAP, this has been replaced with 0. Now
for persistence, counts, and temporal fraction, 0 signifies the absence of a CAP. For transition frequency, 0 means no
transition between CAPs.

🐛 Fixes
- Fix for AAL surface plotting for `CAP.caps2surf`. Changed how CAPs are projected onto surface plotting by
extracting the actual sorted labels from the atlas instead of assuming the parcellation labels goes from 1 to n.
The function still assumes that 0 is the background label; however, this fixes the issue for parcellations that don't
go from 0 to 1 and go from 0 with the first parcellation label after zero starting at 2000 for instance.

Page 18 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.