gfcca
Graph-embedded fuzzy kernel canonical correlation analysis (GFCCA) for multimodal / multi-omics feature fusion and classification.
GFCCA extends regularized kernel CCA with:
- Intuitionistic fuzzy scoring — each sample gets a confidence weight derived from its distance to its class centroid (membership) and the proportion of other-class neighbours within a relative distance threshold (non-membership).
- Discriminative graph embedding — a class-aware graph regularizer
(
Lw - beta * Lb) pulls same-class samples together while pushing different-class samples apart in the fused space.
The fused canonical variables are concatenated into a joint feature matrix that can be fed into any scikit-learn classifier.
Installation
pip install gfcca
Requires Python 3.10+.
Quick start
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from gfcca import build_gfcca_features
# Two views (modalities) of the same samples, plus labels
X1 = np.random.rand(100, 20) # e.g. eye imaging features
X2 = np.random.rand(100, 50) # e.g. SNP genotypes
y = np.random.randint(0, 3, 100)
F_train, models = build_gfcca_features([X1, X2], y)
clf = RandomForestClassifier().fit(F_train, y)
Package layout
| Path | Contents |
|---|---|
src/gfcca/ |
The published package (cca, gfcca, classifiers) |
experiments/ |
Reproduction scripts for the diabetes multi-omics study (not published) |
tests/ |
pytest suite |
Experiments
The full multi-modal classification pipeline (5-modality diabetes cohort,
CV + SHAP interpretability) lives in experiments/ and is not part of the
PyPI package:
uv sync --group experiments
uv run --group experiments python experiments/main.py \
--modalities eye fur methy pbmc snp \
--feature gfcca --classifier rf --shap --seed 42
See experiments/datasets/README.md for the expected data layout.
Development
uv sync --group dev
uv run ruff check .
uv run ruff format .
uv run pytest tests/
uv run mypy src/gfcca
License
Apache-2.0
Metadata
Release files for gfcca 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gfcca-0.1.0.tar.gz | 26.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gfcca-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.5 kB
Release files / gfcca-0.1.0.tar.gz
| Download URL | gfcca-0.1.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2c728502d2337a2e4534255226fb22f9283c94edd77e6a54a4fbba8f197bd44
|
|
BLAKE2b-256 checksum How to use checksums |
fc2dbf7bb11efdcc68d19b809b3edeb6725a56c563a51d950e6d48cdad4ad477
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logRelease files / gfcca-0.1.0-py3-none-any.whl
| Download URL | gfcca-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0552e99c1f1a0944608cd2ace71981e1556aab0605e105d0adce723e584680cc
|
|
BLAKE2b-256 checksum How to use checksums |
116ec875fd0465763a7400ad2576234c3a7ded904b8042185c9b326411392222
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency log