MCPcopy Create free account
hub / github.com/daft-dev/daft / Node

Class Node

daft.py:498–859  ·  view source on GitHub ↗

The representation of a random variable in a :class:`PGM`. :param name: The plain-text identifier for the node. :param content: The display form of the variable. :param x: The x-coordinate of the node in *model units*. :param y: The y-coordina

Source from the content-addressed store, hash-verified

496
497
498class Node(object):
499 """
500 The representation of a random variable in a :class:`PGM`.
501
502 :param name:
503 The plain-text identifier for the node.
504
505 :param content:
506 The display form of the variable.
507
508 :param x:
509 The x-coordinate of the node in *model units*.
510
511 :param y:
512 The y-coordinate of the node.
513
514 :param scale: (optional)
515 The diameter (or height) of the node measured in multiples of
516 ``node_unit`` as defined by the :class:`PGM` object.
517
518 :param aspect: (optional)
519 The aspect ratio width/height for elliptical nodes; default 1.
520
521 :param observed: (optional)
522 Should this be a conditioned variable?
523
524 :param fixed: (optional)
525 Should this be a fixed (not permitted to vary) variable?
526 If `True`, modifies or over-rides ``diameter``, ``offset``,
527 ``facecolor``, and a few other ``plot_params`` settings.
528 This setting conflicts with ``observed``.
529
530 :param alternate: (optional)
531 Should this use the alternate style?
532
533 :param offset: (optional)
534 The ``(dx, dy)`` offset of the label (in points) from the default
535 centered position.
536
537 :param fontsize: (optional)
538 The fontsize to use.
539
540 :param plot_params: (optional)
541 A dictionary of parameters to pass to the
542 :class:`matplotlib.patches.Ellipse` constructor.
543
544 :param label_params: (optional)
545 A dictionary of parameters to pass to the
546 :class:`matplotlib.text.Annotation` constructor. Any kwargs not
547 used by Annontation get passed to :class:`matplotlib.text.Text`.
548
549 :param shape: (optional)
550 String in {ellipse (default), rectangle}
551 If rectangle, aspect and scale holds for rectangle.
552
553 """
554
555 def __init__(

Callers 1

add_nodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected