qbiocode package#
QBioCode: Quantum Machine Learning for Biological Data Analysis#
QBioCode is a comprehensive Python package for quantum machine learning (QML) research and applications in biological data analysis. It provides tools for data generation, classical and quantum machine learning algorithms, evaluation metrics, and visualization utilities.
Main Modules#
learning: Classical and quantum machine learning algorithms
embeddings: Feature embedding and encoding methods
evaluation: Model, dataset and graph-complexity evaluation tools
data_generation: Synthetic dataset generators
visualization: Result visualization and correlation analysis
utils: Helper functions and utilities
apps: Command-line applications (QProfiler, QSage, QuVINE)
Quick Start#
>>> from qbiocode import compute_rf, generate_data
>>> # Generate synthetic data
>>> generate_data(type_of_data='circles', save_path='data/circles')
>>> # Train a random forest model
>>> results = compute_rf(X_train, y_train, X_test, y_test)
>>> # Use QProfiler programmatically
>>> from qbiocode.apps.qprofiler import qprofiler
>>> qprofiler.main(config)
Submodules:
Subpackages:
Summary#
__all__ Functions:
Identify completed datasets from a previous run to enable checkpoint restart. |
|
This function generates a model using a Decision Tree (DT) Classifier method as implemented in scikit-learn. |
|
This function also generates a model using a Decision Tree (DT) Classifier method as implemented in scikit-learn. |
|
This function generates a model using a Logistic Regression (LR) method as implemented in scikit-learn. |
|
This function also generates a model using a Logistic Regression (LR) method as implemented in scikit-learn. |
|
This function generates a model using a Multi-layer Perceptron (mlp), a neural network, method as implemented in scikit-learn. |
|
This function also generates a model using a Multi-layer Perceptron (mlp), a neural network, as implemented in scikit-learn (https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPClassifier.html). |
|
This function generates a model using a Gaussian Naive Bayes (NB) Classifier method as implemented in scikit-learn. |
|
This function generates a model using a Gaussian Naive Bayes (NB) Classifier method as implemented in scikit-learn. |
|
This function generates quantum circuits, computes projections of the data onto these circuits, and evaluates the performance of classical machine learning models on the projected data. |
|
This function computes a Quantum Neural Network (QNN) model on the provided training data and evaluates it on the test data. |
|
This function computes a quantum support vector classifier (QSVC) using the Qiskit Machine Learning library. |
|
This function takes in as input a Pandas Dataframe containing the results and data evaluations for a given dataset. |
|
This function generates a model using a Random Forest (RF) Classifier method as implemented in scikit-learn. |
|
This function also generates a model using a Random Forest (RF) Classifier method as implemented in scikit-learn. |
|
This function generates a model using a Support Vector Classifier (SVC) method as implemented in scikit-learn. |
|
This function generates a model using a Support Vector Classifier (SVC) method as implemented in scikit-learn. |
|
This function computes a Variational Quantum Classifier (VQC) using the Qiskit Machine Learning library. |
|
This function generates a model using an Extreme Gradient Boositing (xgb) Classifier method as implemented in xgboost. |
|
This function generates a model using an Extreme Gradient Boositing (xgb) Classifier method as implemented in xgboost. |
|
This function evaluates a dataset and returns a transposed summary DataFrame with various statistical measures, derived from the dataset. |
|
Summarize a graph’s complexity as a one-row DataFrame. |
|
Encode categorical features using various encoding strategies. |
|
Generate multiple concentric circles datasets with varying parameters. |
|
Generate multiple high-dimensional classification datasets with varying parameters. |
|
Generate synthetic datasets for machine learning benchmarking. |
|
Generate multiple two-moons datasets with varying parameters. |
|
Generate multiple 3D S-curve datasets with varying parameters. |
|
Generate multiple concentric n-dimensional spheres datasets with varying parameters. |
|
Generate multiple n-dimensional spiral datasets with varying parameters. |
|
Generate multiple 3D Swiss roll datasets with varying parameters. |
|
Apply an embedding to the training and test datasets. |
|
Return True if |
|
This function runs the ML methods, with or without a grid search, as specified in the config.yaml file. |
|
Evaluates the model performance using accuracy, F1 score, and AUC. |
|
Plot publication-quality correlation figures from a |
|
This function generates quantum circuits, computes projections of the data onto these circuits. |
|
Return a copy of |
|
This function finds data sets where QML was beneficial (higher F1 scores than CML) and create new .csv files with the relevant evaluation and performance for these specific datasets, for further analysis. |
|
Scale train and test with a single scaler fit on the training set only. |
|
Apply scaling transformation to input data. |
|
Return the directories |
|
Return the absolute path of a tutorial fixture. |
__all__ Data:
QUVINE_HEADLINE_METHODSQUVINE_METHODSSKLEARN_METHODS