Canonical APIs.

Selected entry points in TGraphX 1.5.1; status labels from tgx.api_status().

functionsignaturealiasesstatus
tgx.Graph(node_features, edge_index, …, *, x, labels, edge_attr, train_mask, …)x, labels, edge_attr, from_networkxstable
tgx.make_graph(x=None, *, edges, edge_index, adjacency, networkx_graph, labels, …)build_graphbeta
tgx.validate_graph(graph, strict=False, check_device=True, check_finite=False, …)—beta
tgx.classify_nodes(x, edge_index, labels, *, model="tensor_gcn", seed=42, device="auto", fast_mode=True, …)node_classification, fit_node_classifier, train_node_classifierbeta
tgx.kg_completion(triples, num_entities, num_relations, *, model="transe", seed=42, …)fit_kg, train_kgbeta
tgx.generate_graph(method="barabasi_albert", *, num_nodes=50, node_shape=None, seed=42, …)graph_generator, generateexperimental
tgx.optimize_graph(objective="connectivity", *, algorithm="ga", num_nodes=20, seed=42, …)evolve_graph, graph_evolution, run_evolutionexperimental
tgx.train_graph_rl(env="max_cut", *, algorithm="random", episodes=10, max_steps=50, seed=42, …)graph_rl, run_rlexperimental
tgx.easy.synthetic_tensor_node_classification(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)seededbeta
tgx.set_seed(seed, deterministic=False)—stable
tgx.save(obj, path)save_tgraphxbeta
tgx.load(path, map_location="cpu", *, trust_source=True)load_tgraphxbeta
tgx.describe(obj)summarybeta
tgx.dashboard_audit(path, **kwargs)—beta
tgx.explain_error(error, *, keyword=None)troubleshoot_errorbeta
tgx.load_dataset(name, **kwargs)—beta
tgx.knn_graph(x, k=10, *, metric="cosine", make_symmetric=True, …)—beta
tgx.image_to_patch_graph(image, patch_size=8, *, self_loops=True)—beta
tgx.build_prototype_graph(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.

Further reading