Skip to content

Commit

Permalink
[DOC] Mention classification type in plot_haxby_glm_decoding.py (#4122)
Browse files Browse the repository at this point in the history
* Mention classification type in plot_haxby_glm_decoding.py

Addresses issue: #4109

* Update examples/02_decoding/plot_haxby_glm_decoding.py

Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>

* Update examples/02_decoding/plot_haxby_glm_decoding.py

Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>

* Update latest.rst

* Update CITATION.cff

* Update doc/changes/latest.rst

---------

Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>
  • Loading branch information
TamerGezici and ymzayek committed Dec 8, 2023
1 parent 3ac5ebc commit dec5a0c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -701,3 +701,7 @@ authors:
family-names: Nájera
website: https://github.com/Titan-C
affiliation: Checkmk
- given-names: Tamer
family-names: Gezici
website: https://github.com/TamerGezici
affiliation: Bilkent University
1 change: 1 addition & 0 deletions doc/changes/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Enhancements
- :bdg-primary:`Code` Add ``two_sided`` option for :class:`~nilearn.image.binarize_img` (:gh:`4121` by `Steven Meisler`_).
- :bdg-dark:`Code` :meth:`~maskers.NiftiLabelsMasker.generate_report` now uses appropriate cut coordinates when functional image is provided (:gh:`4099` by `Yasmin Mzayek`_ and `Nicolas Gensollen`_).
- :bdg-info:`Plotting` When plotting thresholded statistical maps with a colorbar, the threshold value(s) will now be displayed as tick labels on the colorbar (:gh:`#2833` by `Nicolas Gensollen`_).
- :bdg-primary:`Doc` Mention the classification type (all-vs-one) in :ref:`sphx_glr_auto_examples_02_decoding_plot_haxby_glm_decoding.py` (:gh:`4122` by `Tamer Gezici`_).

Changes
-------
Expand Down
4 changes: 3 additions & 1 deletion examples/02_decoding/plot_haxby_glm_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
=========================================================
Full step-by-step example of fitting a :term:`GLM`
to perform a decoding experiment.
to perform a decoding experiment. In this decoding analysis,
we will be doing a one-vs-all classification.
We use the data from one subject of the Haxby dataset.
More specifically:
Expand Down Expand Up @@ -177,6 +178,7 @@
decoder.fit(z_maps, conditions_label, groups=session_label)

# Return the corresponding mean prediction accuracy compared to chance
# for classifying one-vs-all items.

classification_accuracy = np.mean(list(decoder.cv_scores_.values()))
chance_level = 1.0 / len(np.unique(conditions))
Expand Down

0 comments on commit dec5a0c

Please sign in to comment.