_bundle

Go to:

Bundle

class commonnn._bundle.Bundle

Bundles input data and clustering output

add_child(self, label, bundle=None)

Add a child for this bundle

Parameters:

label – Add child with this label. Compare get_child() for which arguments are allowed.

Keyword Arguments:

bundle – The child to add. If None, creates a new bundle.

Note

If the label already exists, the respective child is silently overridden. It is not checked if a children mapping exists.

Overrides parent of the newly added bundle.

alias

unicode

Type:

alias

get_child(self, label)

Retrieve a child of this bundle

Parameters:

label

Can be
  • an integer in which case the child with the respective label is returned

  • a list of integers in which case the hierarchy of children is traversed and the last child is returned

  • a string of integers separated by a dot (e.g. “1.1.2”) which will be interpreted as a list of integers (e.g. [1, 1, 2])

Returns:

A Bundle

Note

It is not checked if a children mapping exists.

hierarchy_level

The level of this clustering in the hierarchical tree of clusterings (0 for the root instance).

info(self)
isolate(self, bool purge: bool = True, bool isolate_input_data: bool = True) void

Create a child for each existing cluster label

Note

see isolate()

reel(self, AINDEX depth: int = UINT_MAX) void