api reference
Canonical APIs.
Selected entry points in TGraphX 1.5.1; status labels from tgx.api_status().
| function | signature | aliases | status |
|---|---|---|---|
| tgx.Graph | (node_features, edge_index, …, *, x, labels, edge_attr, train_mask, …) | x, labels, edge_attr, from_networkx | stable |
| tgx.make_ | (x=None, *, edges, edge_index, adjacency, networkx_graph, labels, …) | build_graph | beta |
| tgx.validate_ | (graph, strict=False, check_device=True, check_finite=False, …) | — | beta |
| tgx.classify_ | (x, edge_index, labels, *, model="tensor_gcn", seed=42, device="auto", fast_mode=True, …) | node_classification, fit_node_classifier, train_node_classifier | beta |
| tgx.kg_ | (triples, num_entities, num_relations, *, model="transe", seed=42, …) | fit_kg, train_kg | beta |
| tgx.generate_ | (method="barabasi_albert", *, num_nodes=50, node_shape=None, seed=42, …) | graph_generator, generate | experimental |
| tgx.optimize_ | (objective="connectivity", *, algorithm="ga", num_nodes=20, seed=42, …) | evolve_graph, graph_evolution, run_evolution | experimental |
| tgx.train_ | (env="max_cut", *, algorithm="random", episodes=10, max_steps=50, seed=42, …) | graph_rl, run_rl | experimental |
| tgx.easy. | (num_nodes=1000, node_shape=(16, 8, 8), num_classes=10, seed=42, …) | — | — |
| tgx.compare | (workflows, *, metric="accuracy", fast_mode=True, seed=42, …) | — | beta |
| tgx.reproducible | (seed=42, deterministic=True, warn_only=True) | seeded | beta |
| tgx.set_ | (seed, deterministic=False) | — | stable |
| tgx.save | (obj, path) | save_tgraphx | beta |
| tgx.load | (path, map_location="cpu", *, trust_source=True) | load_tgraphx | beta |
| tgx.describe | (obj) | summary | beta |
| tgx.dashboard_ | (path, **kwargs) | — | beta |
| tgx.explain_ | (error, *, keyword=None) | troubleshoot_error | beta |
| tgx.load_ | (name, **kwargs) | — | beta |
| tgx.knn_ | (x, k=10, *, metric="cosine", make_symmetric=True, …) | — | beta |
| tgx.image_ | (image, patch_size=8, *, self_loops=True) | — | beta |
| tgx.build_ | (x, y, train_mask, num_classes, *, k_proto=1) | — | beta |
Note: in 1.5.1, generate_graph accepts the short method names ("er", "ba", "ws", "sbm"); the full names, including the default, raise an error.