NetworkxAttachNumpyBool

class caldera.transforms.networkx.NetworkxAttachNumpyBool(x, from_key, to_key, *, default=Ellipsis, join_func='hstack', global_key=None, classes=None, num_classes=None)[source]

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

E.g. True gets encoded as np.ndarray([1.])

Parameters
  • x (str) – ‘edge’, ‘node’, ‘global’

  • from_key (str) – dictionary key to find feature

  • to_key (str) – new key to attach feature

  • default (Any) –

  • join_func (str) –

  • global_key (Optional[str]) –

  • classes (Optional[List[str]]) –

  • num_classes (Optional[int]) –

__init__(x, from_key, to_key, *, default=Ellipsis, join_func='hstack', global_key=None, classes=None, num_classes=None)[source]

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

E.g. True gets encoded as np.ndarray([1.])

Parameters
  • x (str) – ‘edge’, ‘node’, ‘global’

  • from_key (str) – dictionary key to find feature

  • to_key (str) – new key to attach feature

  • default (Any) –

  • join_func (str) –

  • global_key (Optional[str]) –

  • classes (Optional[List[str]]) –

  • num_classes (Optional[int]) –

Methods

__init__(x, from_key, to_key, *[, default, …])

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

generate(datalist)

param datalist

transform(g)

param g

__init__(x, from_key, to_key, *, default=Ellipsis, join_func='hstack', global_key=None, classes=None, num_classes=None)[source]

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

E.g. True gets encoded as np.ndarray([1.])

Parameters
  • x (str) – ‘edge’, ‘node’, ‘global’

  • from_key (str) – dictionary key to find feature

  • to_key (str) – new key to attach feature

  • default (Any) –

  • join_func (str) –

  • global_key (Optional[str]) –

  • classes (Optional[List[str]]) –

  • num_classes (Optional[int]) –