API Overview#

Quick overview of the Methods and Datasets available in qbiocode.

Methods#

Depending on the underlying foundations in qbiocode can be….

Embeddings#

Collection of common embeddings (qbiocode.embeddings) functionalities.

get_embeddings(embedding, X_train, X_test[, ...])

This function applies the specified embedding technique to the training and test datasets.

Evaluation#

The qbiocode.evaluation submodule of qbiocode computes the evaluation metrics for the input dataset and the models.

Data Evaluation#

Depending on the underlying mathematical foundations, they can be classified into the following categories: (i)..

evaluate(df, y, file)

This function evaluates a dataset and returns a transposed summary DataFrame with various statistical measures, derived from the dataset.

Model Evaluation#

modeleval(y_test, y_predicted, beg_time, ...)

Evaluates the model performance using accuracy, F1 score, and AUC.

Model Computation#

qbiocode brings together a number of established machine learning model both from classical and quantum (qbiocode.learning). Multiple models can be run via the following

model_run(X_train, X_test, y_train, y_test, ...)

This function runs the ML methods, with or without a grid search, as specified in the config.yaml file.

Classical Models#

Classical model….

compute_dt(X_train, X_test, y_train, y_test, ...)

This function generates a model using a Decision Tree (dt) Classifier method as implemented in scikit-learn (https://scikit-learn.org/1.5/modules/generated/sklearn.tree.DecisionTreeClassifier.html).

compute_lr(X_train, X_test, y_train, y_test, ...)

This function generates a model using a Logistic Regression (lr) method as implemented in scikit-learn (https://scikit-learn.org/1.5/modules/generated/sklearn.linear_model.LogisticRegression.html).

compute_mlp(X_train, X_test, y_train, ...[, ...])

This function generates a model using a Multi-layer Perceptron (mlp), a neural network, method as implemented in scikit-learn (https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPClassifier.html).

compute_nb(X_train, X_test, y_train, y_test, ...)

This function generates a model using a Random Forest (rf) Classifier method as implemented in scikit-learn (https://scikit-learn.org/1.5/modules/generated/sklearn.naive_bayes.GaussianNB.html).

compute_rf(X_train, X_test, y_train, y_test, ...)

This function generates a model using a Random Forest (rf) Classifier method as implemented in scikit-learn (https://scikit-learn.org/1.5/modules/generated/sklearn.ensemble.RandomForestClassifier.html).

compute_svc(X_train, X_test, y_train, ...[, ...])

This function generates a model using a Support Vector Classifier (svc) method as implemented in scikit-learn (https://scikit-learn.org/1.5/modules/generated/sklearn.svm.SVC.html).

Each of them has an alternative function where grid search parameter can be given as input. Details can be found in the specific qbiocode.learning submodules.

Quantum Models#

Quantum model….

compute_qnn(X_train, X_test, y_train, ...[, ...])

This function computes a Quantum Neural Network (QNN) model on the provided training data and evaluates it on the test data.

compute_qsvc(X_train, X_test, y_train, ...)

This function computes a quantum support vector classifier (QSVC) using the Qiskit Machine Learning library.

compute_vqc(X_train, X_test, y_train, ...[, ...])

This function computes a Variational Quantum Classifier (VQC) using the Qiskit Machine Learning library.

compute_pqk(X_train, X_test, y_train, ...[, ...])

This function generates quantum circuits, computes projections of the data onto these circuits, and evaluates the performance of a Support Vector Classifier (SVC) on the projected data.

Visualisation#

The plotting module (qbiocode.visualization) enables the user to visualise the data and provides out-of-the-box plots for some of the metrics.

compute_results_correlation(results_df[, ...])

This function takes in as input a Pandas Dataframe containing the results and data evaluations for a given dataset.

plot_results_correlation(correlations_df[, ...])

This function plots the spearman correlation dot plots using the previously generated correlations_df dataframe.

Datasets#

qbiocode provides…

References#