Transforms

GraphData and GraphBatch

Transformation classes for caldera.data.GraphData and caldera.data.GraphBatch.

Shuffle()

Reverse()

Undirected([fill_value])

param fill_value

FullyConnected([fill_value])

param fill_value

RandomEdgeMask(dropout)

param dropout

RandomNodeMask(dropout)

param dropout

RandomHop(n_nodes, n_hops)

Choose subgraphs from a graph.

Preprocessing Transforms

Networkx

Methods for transforming :class:`networkx.Graph`s

Warning

You should assume all transforms are performed in place. Use NetworkxDeepcopy if a copy of the graph is wanted.

NetworkxAttachNumpyFeatures(x, from_key, …)

Initialize transform that converts networkx features to a np.ndarray

NetworkxAttachNumpyOneHot(x, from_key, to_key, *)

Initialize transform that converts encodes networkx features into one-hot encodings.

NetworkxAttachNumpyBool(x, from_key, to_key, *)

Initialize transform that converts encodes networkx into a boolean represented as np.ndarray of size 1.

NetworkxSetDefaultFeature([node_default, …])

NetworkxTransformFeatureData([…])

param node_transform

NetworkxTransformFeatures([node_transform, …])

Transform networkx feature data.

NetworkxFlattenEdgeFeature(key)

param key

NetworkxFlattenGlobalFeature(key)

param key

NetworkxFlattenNodeFeature(key)

param key

NetworkxNodesToStr()

Convert node keys to strings.

NetworkxToDirected([graph_class])

param graph_class

NetworkxToUndirected([graph_class])

param graph_class

NetworkxFilterDataKeys([node_keys, …])