tno.quantum.ml.classifiers.vc


Nametno.quantum.ml.classifiers.vc JSON
Version 2.0.2 PyPI version JSON
download
home_pagehttps://tno.nl
SummaryQuantum VC module
upload_time2023-07-06 12:31:40
maintainerTNO Quantum
docs_urlNone
authorTNO Quantum
requires_python
licenseApache License, Version 2.0
keywords tno quantum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TNO Quantum: Variational classifier

TNO Quantum provides generic software components aimed at facilitating the development
of quantum applications.

The `tno.quantum.ml.classifiers.vc` package provides a `VariationalClassifier` class, which has been implemented 
in accordance with the
[scikit-learn estimator API](https://scikit-learn.org/stable/developers/develop.html).
This means that the classifier can be used as any other (binary and multiclass)
scikit-learn classifier and combined with transforms through
[Pipelines](https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html).
In addition, the `VariationalClassifier` makes use of
[PyTorch](https://pytorch.org/docs/stable/tensors.html) tensors, optimizers, and loss
functions.

*Limitations in (end-)use: the content of this software package may solely be used for applications that comply with international export control laws.*

## Documentation

Documentation of the `tno.quantum.ml.classifiers.vc` package can be found [here](https://tno-quantum.github.io/ml.classifiers.vc/).


## Install

Easily install the `tno.quantum.ml.classifiers.vc` package using pip:

```console
$ python -m pip install tno.quantum.ml.classifiers.vc
```

If you wish to run the tests you can use:
```console
$ python -m pip install 'tno.quantum.ml.classifiers.vc[tests]'
```

## Example

Here's an example of how the `VariationalClassifier` class can be used for
classification based on the
[Iris dataset](https://en.wikipedia.org/wiki/Iris_flower_data_set):
Note that `tno.quantum.ml.datasets` is required for this example.

```python
from tno.quantum.ml.classifiers.vc import VariationalClassifier
from tno.quantum.ml.datasets import get_iris_dataset

X_training, y_training, X_validation, y_validation = get_iris_dataset()
vc = VariationalClassifier()
vc = vc.fit(X_training, y_training)
predictions_validation = vc.predict(X_validation)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://tno.nl",
    "name": "tno.quantum.ml.classifiers.vc",
    "maintainer": "TNO Quantum",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "tnoquantum@tno.nl",
    "keywords": "TNO,Quantum",
    "author": "TNO Quantum",
    "author_email": "tnoquantum@tno.nl",
    "download_url": "https://files.pythonhosted.org/packages/29/f5/b2afb8b3ebe18975fd170bdc17f222a149f69c1facfc6fbac0485acbed78/tno.quantum.ml.classifiers.vc-2.0.2.tar.gz",
    "platform": "any",
    "description": "# TNO Quantum: Variational classifier\r\n\r\nTNO Quantum provides generic software components aimed at facilitating the development\r\nof quantum applications.\r\n\r\nThe `tno.quantum.ml.classifiers.vc` package provides a `VariationalClassifier` class, which has been implemented \r\nin accordance with the\r\n[scikit-learn estimator API](https://scikit-learn.org/stable/developers/develop.html).\r\nThis means that the classifier can be used as any other (binary and multiclass)\r\nscikit-learn classifier and combined with transforms through\r\n[Pipelines](https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html).\r\nIn addition, the `VariationalClassifier` makes use of\r\n[PyTorch](https://pytorch.org/docs/stable/tensors.html) tensors, optimizers, and loss\r\nfunctions.\r\n\r\n*Limitations in (end-)use: the content of this software package may solely be used for applications that comply with international export control laws.*\r\n\r\n## Documentation\r\n\r\nDocumentation of the `tno.quantum.ml.classifiers.vc` package can be found [here](https://tno-quantum.github.io/ml.classifiers.vc/).\r\n\r\n\r\n## Install\r\n\r\nEasily install the `tno.quantum.ml.classifiers.vc` package using pip:\r\n\r\n```console\r\n$ python -m pip install tno.quantum.ml.classifiers.vc\r\n```\r\n\r\nIf you wish to run the tests you can use:\r\n```console\r\n$ python -m pip install 'tno.quantum.ml.classifiers.vc[tests]'\r\n```\r\n\r\n## Example\r\n\r\nHere's an example of how the `VariationalClassifier` class can be used for\r\nclassification based on the\r\n[Iris dataset](https://en.wikipedia.org/wiki/Iris_flower_data_set):\r\nNote that `tno.quantum.ml.datasets` is required for this example.\r\n\r\n```python\r\nfrom tno.quantum.ml.classifiers.vc import VariationalClassifier\r\nfrom tno.quantum.ml.datasets import get_iris_dataset\r\n\r\nX_training, y_training, X_validation, y_validation = get_iris_dataset()\r\nvc = VariationalClassifier()\r\nvc = vc.fit(X_training, y_training)\r\npredictions_validation = vc.predict(X_validation)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Quantum VC module",
    "version": "2.0.2",
    "project_urls": {
        "Documentation": "https://tno-quantum.github.io/ml.classifiers.vc/",
        "Download": "https://pypi.org/project/tno.quantum.ml.classifiers.vc/#files",
        "Homepage": "https://tno.nl",
        "Source Code": "https://github.com/TNO-Quantum/ml.classifiers.vc"
    },
    "split_keywords": [
        "tno",
        "quantum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22799f294f49a640cd6254d43e41dc330719ff16fb488eecc9a58d99feb71ec3",
                "md5": "9f3363e0f6f1267349a92b235014d7d6",
                "sha256": "7b8b021a6bb640ec06d2ac04d58acfda7b0f00c639780fe5648384f16e077e62"
            },
            "downloads": -1,
            "filename": "tno.quantum.ml.classifiers.vc-2.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f3363e0f6f1267349a92b235014d7d6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18834,
            "upload_time": "2023-07-06T12:31:38",
            "upload_time_iso_8601": "2023-07-06T12:31:38.548635Z",
            "url": "https://files.pythonhosted.org/packages/22/79/9f294f49a640cd6254d43e41dc330719ff16fb488eecc9a58d99feb71ec3/tno.quantum.ml.classifiers.vc-2.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "29f5b2afb8b3ebe18975fd170bdc17f222a149f69c1facfc6fbac0485acbed78",
                "md5": "f2edda4cfb5f82711b444e8611237533",
                "sha256": "b478d02e5fcdba87cb60cddd307100bbe05e32a12903931664abf1978d5cdbb9"
            },
            "downloads": -1,
            "filename": "tno.quantum.ml.classifiers.vc-2.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f2edda4cfb5f82711b444e8611237533",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17172,
            "upload_time": "2023-07-06T12:31:40",
            "upload_time_iso_8601": "2023-07-06T12:31:40.333093Z",
            "url": "https://files.pythonhosted.org/packages/29/f5/b2afb8b3ebe18975fd170bdc17f222a149f69c1facfc6fbac0485acbed78/tno.quantum.ml.classifiers.vc-2.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-06 12:31:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TNO-Quantum",
    "github_project": "ml.classifiers.vc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tno.quantum.ml.classifiers.vc"
}
        
Elapsed time: 0.09054s