Skip to main content

A package for the Helstrom Quantum Centroid classifier

Project description

Helstrom Quantum Centroid Classifier

The Helstrom Quantum Centroid (HQC) classifier is a quantum-inspired supervised classification approach for data with binary classes (ie. data with 2 classes only). By quantum-inspired, we mean a classification process which employs and exploits Quantum Theory.

It is inspired by the quantum Helstrom observable which acts on the distinguishability between quantum patterns rather than classical patterns of a dataset.

The HQC classifier is based on research undertaken by Giuseppe Sergioli, Roberto Giuntini and Hector Freytes, in their paper:

Sergioli G, Giuntini R, Freytes H (2019) A new quantum approach to binary classification. PLoS ONE 14(5): e0216224.
https://doi.org/10.1371/journal.pone.0216224

In this Python package, the classical dataset is encoded into quantum densities using the inverse of the standard stereographic projection encoding method.

This Python package includes the option to vary two parameters that are used to optimize the performance of the HQC classifier. First, there is an option to rescale the dataset. Second, there is an option to choose the number of copies to take for the quantum densities. These two parameters are used in combination together to fine tune and optimize the accuracy of the HQC classifier to a given dataset.

It is shown in the paper by Sergioli G, Giuntini R and Freytes H that the HQC classifier, on average, outperforms a variety of commonly used classifiers over 14 real-world and artificial datasets. A summary of the performances of the different classifiers examined are shown in the table below:

Rank Classifier Average Success Rate (%)
1 HelstromQuantumCentroid4 72.8
2 HelstromQuantumCentroid3 65.13
3 GaussianNB 58
4 HelstromQuantumCentroid2 57.07
5 HelstromQuantumCentroid1 56.6
5 QuadraticDiscriminantAnalysis 56.6
6 GradientBoostingClassifier 52.73
7 ExtreTreesClassifier 51.93
8 KNeighborsClassifier 51.47
9 NearestCentroid 49.13
10 RandomForestClassifier 45.87
11 QuantumNearestMeanCentroid 43.93
12 AdaBoostClassifier 42.93
13 LinearDiscriminantAnalysis 42
14 LogisticRegression 36.4
15 BernoulliNB 17.4

Average success rate is the average of the number of datasets where the specified classifier outperforms the other classifiers over 14 real-world and artificial datasets.

HelstromQuantumCentroidn is the HQC classifier corresponding to the n number of copies to take for the quantum densities.

Source Code

The Python package's source code for the HQC classifier is available here: https://github.com/leockl/helstrom-quantum-centroid-classifier/blob/master/HQC/HQC.py

Documentation

The documentation, including how to install the Python package, how to use the Python package and how the HQC classifier algorithm works, are available here: https://helstrom-quantum-centroid-classifier.readthedocs.io/en/latest/

License

This Python package is licensed under the BSD 3-Clause License, available here: https://github.com/leockl/helstrom-quantum-centroid-classifier/blob/master/LICENSE

References

Sergioli G, Giuntini R, Freytes H (2019) A new quantum approach to binary classification. PLoS ONE 14(5): e0216224. https://doi.org/10.1371/journal.pone.0216224

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

HQC-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

HQC-0.1.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file HQC-0.1.1.tar.gz.

File metadata

  • Download URL: HQC-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for HQC-0.1.1.tar.gz
Algorithm Hash digest
SHA256 32f86afe665640436cfa22654b642f4913dbfa7ff1a88b8cf07aecae20bc61e9
MD5 9440d0a3315f51007fe3ae823d5fefa1
BLAKE2b-256 a60b810a9e586305be1cd48e73a0a1aa0ecba9228b2433c52e6e0a163c52be15

See more details on using hashes here.

File details

Details for the file HQC-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: HQC-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for HQC-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e53c06c9bd465119314ee0768d4e605268d524fd6d1daf9305e931216db33f55
MD5 c2091c4bffb7d519bfdd2d63bd27515e
BLAKE2b-256 bb85bfb3f4b45fe92d08cfe6a1121373443321f4b4c033dda8fd292b6980426a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page