sampovis.api.fabhme_vis

save_gate_tree

sampovis.api.fabhme_vis.save_gate_tree(pstore_url, process_name, dest_dir, cids=None)

Visualizes and saves to file the Bernoulli and logistic gating functions represented by a tree structure, which are generated by a FAB/HME component. Since this API can save only successful processes, data which failed or in-progress are skipped. A saved file path pattern is <dest_dir>/<process_name>_<cid>_fabhme_gate_tree.png

Parameters
pstore_urlstr

Process store URL.

process_namestr

A process name.

dest_dirstr

Path to destination directory.

cidslist of str
The target component cids.
If None, all FAB/HME component are output.
Raises
ValidationError
  • If pstore_url is not str.

  • If process_name is not str.

  • If dest_dir is not str.

  • If cids is neither None nor list.

Examples

>>> from sampovis.api import fabhme_vis
>>> fabhme_vis.save_gate_tree('./pstore', 'productA_predict', './dest_dir')

Output Format

The output is a PNG format image file.

Example of Bernoulli gating functions image:

../../_images/fabhme_hardgate_bern.png

Example of logistic gating functions image:

../../_images/fabhme_hardgate_logit.png

Node (box-shaped) contents

Conditional expression

Destandardized conditional expression (displayed if standardized)

The number of samples passed down to the node

Leaf (ellipse-shaped) contents

The component index

The number of samples assigned to the component