Graphical tools
- pyAgrum.ctbn.plotTrajectory(v, traj, timeHorizon=None, plotname=None)
Plot a variable’s trajectory using matplotlib.pyplot.
- Parameters:
v (pyAgrum.DiscreteVariable) – Variable to follow.
traj (List[Tuple[float, str, str]]) – Trajectory to plot.
timeHorizon (float) – Maximum time length to show.
plotname (str) – Name of the plot.
- pyAgrum.ctbn.plotFollowVar(v, trajectories, timeHorizon=None, N=None, plotname=None)
Plot the evolution (the proportions of the states the variable transition into) of a variable over time.
- Parameters:
v (pyAgrum.DiscreteVariable) – The variable to follow.
trajectories (Dict[int, List[Tuple[float, str, str]]]) – Contains trajectories. The result is a mean over all the trajectories.
timeHorizon (float) – Maximum time length to plot. If None, then the entire time length of the trajectories is used.
N (int) – Number of division of interval [0, timeHorizon].
plotname (str) – Name of the plot. If None, the picked name is “Proportions for each state of {v.name()}”.