|
Teetool
Probabilistic modelling of trajectories
|
Visual_2d class generates the 2d output using Matplotlib. More...
Public Member Functions | |
| def | __init__ (self, thisWorld, kwargs) |
| Constructor for Visual_2d. More... | |
| def | plotMean (self, list_icluster=None, colour=None, kwargs) |
| Plot mean of trajectories. More... | |
| def | plotTrajectories (self, list_icluster=None, ntraj=50, colour=None, kwargs) |
| Plot trajectories of cluster. More... | |
| def | plotTrajectoriesPoints (self, x1, list_icluster=None, ntraj=50, colour=None, kwargs) |
| Plot trajectories of cluster. More... | |
| def | plotTimeSeries (self, icluster=0, ntraj=50, colour='k', kwargs) |
| Plot time-series of trajectories. More... | |
| def | plotBox (self, coord_lowerleft, coord_upperright, kwargs) |
| Plot a box based on two coordinates. More... | |
| def | plot (self, args, kwargs) |
| standard plotting function for Matplotlib More... | |
| def | plotSamples (self, list_icluster=None, ntraj=50, colour=None, kwargs) |
| Plot samples of model. More... | |
| def | plotLegend (self) |
| Add legend to plot. More... | |
| def | plotTube (self, list_icluster=None, sdwidth=1, z=None, resolution=None, colour=None, alpha=.1, kwargs) |
| Plots a confidence region of variance sigma. More... | |
| def | plotTubeDifference (self, list_icluster=None, sdwidth=1, z=None, resolution=None, colour=None, alpha=.1, kwargs) |
| Plots the difference confidence region of variance sigma for two models. More... | |
| def | plotLogLikelihood (self, list_icluster=None, pmin=0, pmax=1, z=None, resolution=None) |
| Plot the log-likehood of confidence regions – which can be related to traffic complexity in the future. More... | |
| def | save (self, add=None) |
| saves the figure to a file in the output folder More... | |
| def | show (self) |
| shows the figure (pop-up or inside notebook) More... | |
| def | close (self) |
| closes all figures More... | |
Private Member Functions | |
| def | _plotTitle (self) |
| Plots an outline of the trajectories. More... | |
Private Attributes | |
| _fig | |
| figure object More... | |
| _ax | |
| axis object More... | |
| _world | |
| World object. More... | |
| _labels | |
| Labels of plots. More... | |
Visual_2d class generates the 2d output using Matplotlib.
Even 3-dimensional trajectories can be output in 2d (sliced)
| def teetool.visual_2d.Visual_2d.__init__ | ( | self, | |
| thisWorld, | |||
| kwargs | |||
| ) |
Constructor for Visual_2d.
| self | object pointer |
| thisWorld | World object, filled with trajectory data and models |
| kwargs | additional parameters for plt.figure() <description> |
|
private |
Plots an outline of the trajectories.
| self | object pointer def plotOutline(self): TODO draw a box |
Plots the title or worldname
| self | object pointer |
| def teetool.visual_2d.Visual_2d.close | ( | self | ) |
closes all figures
| self | object pointer |
| def teetool.visual_2d.Visual_2d.plot | ( | self, | |
| args, | |||
| kwargs | |||
| ) |
standard plotting function for Matplotlib
| self | object pointer |
| args | additional arguments for plotting |
| kwargs | additional labeled parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotBox | ( | self, | |
| coord_lowerleft, | |||
| coord_upperright, | |||
| kwargs | |||
| ) |
Plot a box based on two coordinates.
| self | object pointer |
| coord_lowerleft | lower-left coordinate (x,y) |
| coord_upperright | upper-right coordinate (x,y) |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotLegend | ( | self | ) |
Add legend to plot.
| self | object pointer |
| def teetool.visual_2d.Visual_2d.plotLogLikelihood | ( | self, | |
list_icluster = None, |
|||
pmin = 0, |
|||
pmax = 1, |
|||
z = None, |
|||
resolution = None |
|||
| ) |
Plot the log-likehood of confidence regions – which can be related to traffic complexity in the future.
| self | object pointer |
| list_icluster | list of clusters to compare |
| pmin | minimum value on a normalised scale |
| pmax | maximum value on a normalised scale |
| z | if specified, it evaluates the confidence region at a constant altitude for 3D trajectories |
| resolution | specify resolution of region |
| def teetool.visual_2d.Visual_2d.plotMean | ( | self, | |
list_icluster = None, |
|||
colour = None, |
|||
| kwargs | |||
| ) |
Plot mean of trajectories.
| self | object pointer |
| list_icluster | list of clusters to plot |
| colour | if specified, overwrites distinct colours |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotSamples | ( | self, | |
list_icluster = None, |
|||
ntraj = 50, |
|||
colour = None, |
|||
| kwargs | |||
| ) |
Plot samples of model.
| self | object pointer |
| list_icluster | list of clusters to plot |
| ntraj | number of trajectories |
| colour | if specified, overwrites distinct colours |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotTimeSeries | ( | self, | |
icluster = 0, |
|||
ntraj = 50, |
|||
colour = 'k', |
|||
| kwargs | |||
| ) |
Plot time-series of trajectories.
| self | object pointer |
| icluster | select cluster to plot |
| ntraj | maximum number of trajectories |
| colour | specificy colour of trajectories |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotTrajectories | ( | self, | |
list_icluster = None, |
|||
ntraj = 50, |
|||
colour = None, |
|||
| kwargs | |||
| ) |
Plot trajectories of cluster.
| self | object pointer |
| list_icluster | list of clusters to plot |
| ntraj | maximum number of trajectories |
| colour | if specified, overwrites distinct colours |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotTrajectoriesPoints | ( | self, | |
| x1, | |||
list_icluster = None, |
|||
ntraj = 50, |
|||
colour = None, |
|||
| kwargs | |||
| ) |
Plot trajectories of cluster.
| self | object pointer |
| x1 | point from [0,1] to visualise |
| list_icluster | list of clusters to plot |
| ntraj | maximum number of trajectories |
| colour | if specified, overwrites distinct colours |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotTube | ( | self, | |
list_icluster = None, |
|||
sdwidth = 1, |
|||
z = None, |
|||
resolution = None, |
|||
colour = None, |
|||
alpha = .1, |
|||
| kwargs | |||
| ) |
Plots a confidence region of variance sigma.
| self | object pointer |
| list_icluster | list of clusters to plot |
| sdwidth | variance to evaluate |
| z | if specified, it evaluates the confidence region at a constant altitude for 3D trajectories |
| resolution | sets resolution for which to calculate the tube, can be a single integer, or an actual measurement [dim1 dim2] (2d) [dim1 dim2 dim3] (3d) |
| colour | if specified, overwrites distinct colours |
| alpha | opacity for the confidence region |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.plotTubeDifference | ( | self, | |
list_icluster = None, |
|||
sdwidth = 1, |
|||
z = None, |
|||
resolution = None, |
|||
colour = None, |
|||
alpha = .1, |
|||
| kwargs | |||
| ) |
Plots the difference confidence region of variance sigma for two models.
| self | object pointer |
| list_icluster | list of 2 clusters to compare |
| sdwidth | variance to evaluate |
| z | if specified, it evaluates the confidence region at a constant altitude for 3D trajectories |
| resolution | specify resolution of region |
| colour | if specified, overwrites distinct colours |
| alpha | opacity for the confidence region |
| kwargs | additional parameters for plotting |
| def teetool.visual_2d.Visual_2d.save | ( | self, | |
add = None |
|||
| ) |
saves the figure to a file in the output folder
| self | object pointer |
| add | additional identifier for file |
| def teetool.visual_2d.Visual_2d.show | ( | self | ) |
shows the figure (pop-up or inside notebook)
| self | object pointer |
|
private |
axis object
|
private |
figure object
|
private |
Labels of plots.
|
private |
World object.
1.8.12