The mfng.analyzer module

The Runs class

class mfng.analyzer.Runs(project=None)

Class for analyzing the runs.

Parameter:
project: None [default] or the name of the project.
If None it will search the base project. If it does not find, it will use the actual directory as the project directory.
set_labels(labels='all')

Set the labels for the analyzis.

If we add the list of labels, it keeps the order. Otherwise the labels will be sorted.

Parameter:

labels: string or list of strings

This can be:

  • ‘all’ will include all labels available,
  • one label we want to analyze,
  • the start of the labels we want to analyze,
  • the list of the labels we want to analyze.

Returns:

With the labels it have set.

Example:

>>> sorted(r.runs.keys())  # All labels
['2000_007', '2000_008', '2000_009', '2000_010', '2000_011']
>>> r.set_labels("all")
['2000_007', '2000_008', '2000_009', '2000_010', '2000_011']
>>> r.set_labels("2000_008")
['2000_008']
>>> r.set_labels("2000_01")
['2000_010', '2000_011']
>>> r.set_labels(["2000_009", "2000_007"])
['2000_009', '2000_007']
plot_energy_list(**kwargs)

Plots the energies in the steps of the generation.

It plots for all the labels in the self.labels.

plot_divs_list(label=None, **kwargs)

Plots the divs in the steps of the generation.

It plots for the first last in the self.labels.

loglog(with_initial=True, binning='ondemand')

Plots the degree distribution of a generated network for each label.

Parameters:
with_initial: boolean, default True
If it is True [default] it plots the initial degree distribution of the results with the first label in self.labels.
binning: string
The type of binning you want to use (ondemand, all or log).
loglog1(with_initial=True, binning='ondemand', **kwargs)

Plots the degree distribution of a generated network for one label.

This label come from the label argument or from the last item of the self.labels.

degdist(label=None, initial=False)

Returns with the degdist object.

Table Of Contents

Previous topic

The mfng module

This Page