XCSF 1.4.8
XCSF learning classifier system
Loading...
Searching...
No Matches
xcsf.utils.viz.DGPViz Class Reference

Visualises a DGP graph with graphviz. More...

Public Member Functions

None __init__ (self, dict graph, str filename, str|None note=None, list[str]|None feature_names=None)
 
str label (self, str symbol)
 
None draw (self)
 

Data Fields

 gviz
 
 n
 
 n_inputs
 

Detailed Description

Visualises a DGP graph with graphviz.

Definition at line 102 of file viz.py.

Constructor & Destructor Documentation

◆ __init__()

None xcsf.utils.viz.DGPViz.__init__ (   self,
dict  graph,
str  filename,
str | None   note = None,
list[str] | None   feature_names = None 
)
Plots a DGP graph with graphviz, saving to a file.

Parameters
----------
graph : dict
    Dictionary representing a DGP graph.
filename : str
    Name of the output file to save the drawn graph.
note : str, optional
    Optional string to be added as a note/caption.
feature_names : list[str], optional
    Optional list of feature names.

Definition at line 105 of file viz.py.

References Graph.connectivity, ArgsDGP.n, Graph.n, PredNLMS.n, PredRLS.n, xcsf.utils.viz.DGPViz.n, ArgsDGP.n_inputs, Graph.n_inputs, ArgsGPTree.n_inputs, Net.n_inputs, Layer.n_inputs, ArgsLayer.n_inputs, and xcsf.utils.viz.DGPViz.n_inputs.

Member Function Documentation

◆ draw()

None xcsf.utils.viz.DGPViz.draw (   self)
Plots the nodes and edges in the graph.

Definition at line 151 of file viz.py.

◆ label()

str xcsf.utils.viz.DGPViz.label (   self,
str  symbol 
)
Returns the node label for a symbol.

Definition at line 141 of file viz.py.

References ArgsDGP.n, Graph.n, PredNLMS.n, PredRLS.n, and xcsf.utils.viz.DGPViz.n.

Referenced by xcsf.utils.viz.TreeViz.read_subexpr().

Here is the caller graph for this function:

Field Documentation

◆ gviz

xcsf.utils.viz.DGPViz.gviz

Definition at line 132 of file viz.py.

Referenced by xcsf.utils.viz.TreeViz.read_subexpr().

◆ n

◆ n_inputs

xcsf.utils.viz.DGPViz.n_inputs

Definition at line 164 of file viz.py.

Referenced by xcsf.utils.viz.DGPViz.__init__().


The documentation for this class was generated from the following file: