CQU is a Classical and Quantum Machine Learning Library that is built on top of Qiskit and PyTorch, giving easy access to both classical and quantum machine learning algorithms through simple interfaces. It is designed to be easy to use and to be easily extensible, including a Preprocessor class that allows for easy integration of new data preprocessing techniques.
Project description
CQU - Classical And Quantum ML
cqu is a classical and quantum machine learning library that can be used to quickly and easily reap benefits of both classical and quantum machine learning algorithms!
- Example usage
from cqu.preprocessing import Preprocessor, MissingValueStrategies
from cqu.quantum_embedding import QuantumClassifier
pp = Preprocessor("path/to/dataset")
strategies = {
'v3': MissingValueStrategies.FILL_MEDIAN,
'time': MissingValueStrategies.FILL_NOCB,
'class': MissingValueStrategies.DROP_ROWS
}
pp.clean_missing(strategies)
dataset = pp.dataframe[['v3', 'v10', 'v11', 'class']]
qc = QuantumClassifier()
qc.train(dataset, "class")
test_df = pd.DataFrame(np.random.rand(5))
prediction = qc.predict(test_df).flatten()
if prediction[0] == 1:
print("Prediction: Fraud")
else:
print("Prediction: Non-fraud")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cqu-0.1.1.tar.gz.
File metadata
- Download URL: cqu-0.1.1.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1a13aa20c7a6a90b8fb2329b570dfaa11ab52d1a5878858eb0c4c463db67d84
|
|
| MD5 |
c8e40846b64cc4c6a4221f2c7df7ca09
|
|
| BLAKE2b-256 |
32f2e539c48fe05c9570102269882915de1b2b6d7fbfb14858a95ac43ec6a933
|
File details
Details for the file cqu-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cqu-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c08824b38d5ab0c302d3f774412d6d48fa30cd60d08894436392cb147905f899
|
|
| MD5 |
a1e8a5715ce6e6f48291239fd5358254
|
|
| BLAKE2b-256 |
9f2bf8451f24737366a601a0f410c38ef2d001f135c540f161c2a7d0be2a3efa
|