NetworkxAttachNumpyOneHot

class caldera.transforms.networkx.NetworkxAttachNumpyOneHot(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 features into one-hot encodings.

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 features into one-hot encodings.

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 features into one-hot encodings.

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 features into one-hot encodings.

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]) –