Skip to content

Aware: Graph orientation mismatch causing ValueError in GNNEmbedding #85

@ramosv

Description

@ramosv

A couple of users mentioned that they kept getting a ValueError: Number of omics features must match adjacency matrix size. when using the GNNEmbedding class.

Our graph generation functions are orientation agnostic, but GNNEmbedding expects a feature–feature adjacency.

Quick fix (until v1.1.1), transpose your matrix before calling a graph generation:

from bioneuralnet.utils.graphs import gen_similarity_graph

X = your_omics_dataset_as_dataframe.T
A = gen_similarity_graph(X, k=15, metric='cosine', mutual=True)

Plan for v1.1.1

  • Expect v1.1.1 release by end of day this Wednesday (08/04/2025)
  • Standardize user expectation: rows = samples, cols = features.
  • Default all graph generation function to feature–feature (add an axis parameter to let users decide).
  • Clearer error messages + docs update.
  • Update all tests and examples regarding graph generation.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions