Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example in documentation #4

Closed
gcattan opened this issue Sep 28, 2021 · 1 comment
Closed

Update example in documentation #4

gcattan opened this issue Sep 28, 2021 · 1 comment

Comments

@gcattan
Copy link
Collaborator

gcattan commented Sep 28, 2021

pyRiemann-qiskit: Qiskit wrapper for pyRiemann
=============================================================

.. raw:: html

    <div style="clear: both"></div>
    <div class="container-fluid hidden-xs hidden-sm">
      <div class="row">
       <a href="<link to example>">
         <div class="col-md-3 thumbnail">
           <img src="_images/sphx_glr_plot_single_thumb.png">
         </div>
       </a>
     </div>
   </div>

   <br>

   <div class="container-fluid">
     <div class="row">
       <div class="col-md-9">

.. _api_ref:

=============
API reference
=============

Classification
--------------
.. _classification_api:
.. currentmodule:: pyriemann_qiskit.classification

.. autosummary::
    :toctree: generated/
    :template: class.rst

    QuanticBase
    QuanticSVM
    QuanticVQC
gcattan pushed a commit to gcattan/pyRiemann-qiskit that referenced this issue Oct 12, 2021
sylvchev pushed a commit that referenced this issue Nov 16, 2021
* Quantum classification and example

* add test_classification.py

* flake8

* Revert "remove tests"

This reverts commit d4317c3.

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update tests/test_classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* lighten asserts

* Remove hardcoded values and use explicit names

* Refactor names to be more explicit

* shorten assert using numpy shape function

* Code lisibility (extracting and renaming of const)

* Prefix private method with `_`

* add naming convention for private/public field

* #2 (comment)

* Move quantum init to fit

* add test for sklearn pipeline (get_set params)

* Appli sklearn pattern

* flake8

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Add reference to QSVM and VQC

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* clean up attributes section

* Rename QuanticBase -> QuanticClassifierBase

* Add documentation to public methods

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* low case convention for variable

* - add README in example
- add classification in __init__

* add quantum before q_account_token

* - Use np.atleast_2d for better concision
-  Complete splitTargetAndNonTarget test with test of already vectorized inputs
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* use `ndarray shape (n_trials,)` instead of `ndarray shape (n_trials, 1)`

* Complete documentation on raw and vectorized matrices

* extract test_per parameter

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update tests/test_classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* complete tests with 2d matrices

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* refactor target -> labels WIP

* rename xta, xnt -> x_class1, x_class0

* leftover target -> labels

* Remove support for 3d matrices

* flake8

* use stratify in self_calibration, to avoid situation where the training/testing sets contains only one classes (may happens when covset length is low)

* flake8

* flake8
push base example with toy sets.

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* - Change example sublevel repository
- move reference to Qiskit in mother class

* remove labels

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* clean leftovers after labels refactoring

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* refactor _split_classes

* rename all vect*

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* rename n_trials ->n_sample and n_channels**2 -> n_features

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Leftover in testing workflow

* flake8

* Update tests/test_classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/ERP/README.txt

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/ERP/plot_classify_EEG_quantum.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update tests/test_classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update tests/test_classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* add readme in toys_dataset

* revert score_test

* Update tests/test_classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* cvxpy workaround for pot_classifier_comparison.py

* cvxpy workaround

* complete readme

* add header

* apply reviewer's suggestion to test and score

* remove _process_vector
update quantum example

* flake8

* Update examples/toys_dataset/README.txt

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/toys_dataset/plot_classifier_comparison.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/toys_dataset/plot_classifier_comparison.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/toys_dataset/plot_classifier_comparison.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/ERP/plot_classify_EEG_quantum.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* remove feature_dim tags

* Update tests/test_classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* rename test in lower case
clean parameters inside QuanticVQC

* get_feats

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* flake8

* #4

* clean comments and remove references to covariance matrices

* Update example QSVM vs SVC

* fix bug (disp not definied)

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* remove useless line

* Refactoring of fit/score/predict/.
Removing "run" methods and calling underlying methods.

* update of example (WIP)

* fix predict_proba

* improve image size

* remove errors

* Update examples/toys_dataset/plot_classifier_comparison.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* flake8

* Simple downsampling after projection to tangentspace inspired by electrode selection

* remove unused comment

* revert TgDown

* Add quantum drawbacks

* Clean quantum example

* Update examples/ERP/plot_classify_EEG_quantum.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/ERP/plot_classify_EEG_quantum.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/ERP/plot_classify_EEG_quantum.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* delete test_input

* fix bug: labels should be only 0 or 1

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* #2 (comment)

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* Update examples/ERP/plot_classify_EEG_quantum.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* change SVC hyperparameters for rbf

* flake8

* Update pyriemann_qiskit/classification.py

Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>

* flake8

Co-authored-by: gcattan <gregoire.cattan@ibm.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
@gcattan
Copy link
Collaborator Author

gcattan commented Nov 16, 2021

Closing as this was finally implemented as part of #2:

  • in index.rst

image

  • in api.rst

image

@gcattan gcattan closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant