plot

Generates plots from flow records and fitted models (requires pandas and scipy).

usage: python3 -m flow_models.plot [-h] [--format {png,pdf}] [--single]
                                   [--no-normalize] [--fft]
                                   [-P {points,hist,kde,comp,comp_stack,comp_labels}]
                                   [-C {comp,comp_stack,comp_labels}]
                                   [-x {length,size,duration,rate}]
                                   histogram [mixture]

Positional Arguments

histogram

csv_hist file to plot

mixture

mixture directory to plot

Named Arguments

--format

Possible choices: png, pdf

plot file format

Default: 'png'

--single

plot PDF and CDF in single file

Default: False

--no-normalize

do not normalize PDF datapoints

Default: True

--fft

use FFT for calculating KDE

Default: False

-P

Possible choices: points, hist, kde, comp, comp_stack, comp_labels

additional PDF plot modes (can be specified multiple times)

Default: []

-C

Possible choices: comp, comp_stack, comp_labels

additional CDF plot modes (can be specified multiple times)

Default: []

-x

Possible choices: length, size, duration, rate

x axis value

Default: 'length'

An important part of any modeling task is the visualization of both input data and resulting models. The plot tool can be used for that purpose. It can generate probability density (PDF), cumulative distribution function (CDF) and average packet size and packet interarrival time plots. It takes CSV histogram files and mixture model JSON files as input. The input histogram data can be visualized on PDF plot as points, 2-dimensional histogram or kernel density estimation (KDE) contour plot. Model mixtures are presented as lines. Additionally, components of a mixture can be plotted, both separately and in stacked mode. The tool automatically normalizes data points in the case of logarithmically-binned histograms. Moreover, the framework contains a custom fast Fourier transform (FFT) based implementation of weighted KDE computation.