NetworkxAttachNumpyFeatures

class caldera.transforms.networkx.NetworkxAttachNumpyFeatures(x, from_key, to_key, *, default=Ellipsis, encoding=None, join_func='hstack', global_key=None, **processing_kwargs)[source]

Initialize transform that converts networkx features to a np.ndarray

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

  • from_key (str) – dictionary key to find feature

  • to_key (str) – new key to attach feature

  • default (Any) –

  • encoding (Union[str, Callable[[Iterable[~T]], Iterable[~T]], None]) –

  • join_func (Union[str, Callable[[ndarray, ndarray], ndarray]]) – select from ‘hstack’, ‘vstack’ or provide a new join function

  • global_key (Optional[str]) –

  • processing_kwargs

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

Initialize transform that converts networkx features to a np.ndarray

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

  • from_key (str) – dictionary key to find feature

  • to_key (str) – new key to attach feature

  • default (Any) –

  • encoding (Union[str, Callable[[Iterable[~T]], Iterable[~T]], None]) –

  • join_func (Union[str, Callable[[ndarray, ndarray], ndarray]]) – select from ‘hstack’, ‘vstack’ or provide a new join function

  • global_key (Optional[str]) –

  • processing_kwargs

Methods

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

Initialize transform that converts networkx features to a np.ndarray

generate(datalist)

param datalist

transform(g)

param g

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

Initialize transform that converts networkx features to a np.ndarray

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

  • from_key (str) – dictionary key to find feature

  • to_key (str) – new key to attach feature

  • default (Any) –

  • encoding (Union[str, Callable[[Iterable[~T]], Iterable[~T]], None]) –

  • join_func (Union[str, Callable[[ndarray, ndarray], ndarray]]) – select from ‘hstack’, ‘vstack’ or provide a new join function

  • global_key (Optional[str]) –

  • processing_kwargs