Bases: object
Object to control profiling.Profile behaviour.
Create a config object by selection a named preset of predefined options.
Supported values for preset:
complete
minimal
default
preset (str, optional) – Preset to be used for generating the config values. Default: “default”
Return state of given measure option
Supported values for id:
Centrality.Degree
Centrality.CoreDecomposition
Centrality.ClusteringCoefficient
Centrality.PageRank
Centrality.KPath
Centrality.Katz
Centrality.Betweenness
Centrality.Closeness
Partition.Communities
Partition.ConnectedComponents
Partition.CoreDecomposition
State of measure id.
bool
Return state of given correlation (measure) option
Supported values for id:
Pearson
Spearman
Fechner
State of measure correlation id.
bool
return state of given property option
Supported values for id:
Diameter
EffectiveDiameter
State of property id.
bool
Enable/disable given measure option.
Supported values for id:
Centrality.Degree
Centrality.CoreDecomposition
Centrality.ClusteringCoefficient
Centrality.PageRank
Centrality.KPath
Centrality.Katz
Centrality.Betweenness
Centrality.Closeness
Partition.Communities
Partition.ConnectedComponents
Partition.CoreDecomposition
id (str) – Measure value to set.
enabled (bool, optional) – Indicates whether measure id should be enabled or not. Default: True
Enable/disable given measure correlation option.
Supported values for id:
Pearson
Spearman
Fechner
id (str) – Measure correlation value to set.
enabled (bool, optional) – Indicates whether measure correlation id should be enabled or not. Default: True
Enable/disable given property option.
Supported values for id:
Diameter
EffectiveDiameter
id (str) – Property value to set.
enabled (bool, optional) – Indicates whether property id should be enabled or not. Default: True
Bases: object
Automated network profiling class. Don’t call the constructor directly. Use networkit.profile.profile.Profile.create to instantiate a profile.
Creates a profile object
G (networkit.Graph) – Graph to profile.
preset (str) – Name of preset configuration: “complete”, “minimal”, “default”
Config (networkit.profile.profile.Config) – Config object to control some aspects of the generation behaviour. Default: None
Resulting profiling object.
networkit.profile.profile.Profile
Returns the category of an given measure.
Supported values for measure:
Centrality.Degree
Centrality.CoreDecomposition
Centrality.ClusteringCoefficient
Centrality.PageRank
Centrality.KPath
Centrality.Katz
Centrality.Betweenness
Centrality.Closeness
Partition.Communities
Partition.ConnectedComponents
Partition.CoreDecomposition
measure (str) – Measure name.
Category of measure.
str
Returns the elapsed computation times of an given measure.
Supported values for measure:
Centrality.Degree
Centrality.CoreDecomposition
Centrality.ClusteringCoefficient
Centrality.PageRank
Centrality.KPath
Centrality.Katz
Centrality.Betweenness
Centrality.Closeness
Partition.Communities
Partition.ConnectedComponents
Partition.CoreDecomposition
measure (str) – Measure name.
Elapsed time for computing measure.
float
Returns the number of parallel threads/processes to use
Number of threads to use for algorithms used during profiling.
int
Returns an directory of all computed measure values.
Supported values for measure:
Centrality.Degree
Centrality.CoreDecomposition
Centrality.ClusteringCoefficient
Centrality.PageRank
Centrality.KPath
Centrality.Katz
Centrality.Betweenness
Centrality.Closeness
Partition.Communities
Partition.ConnectedComponents
Partition.CoreDecomposition
measure (str) – Measure name.
Dictionary with computed measure values.
dict(float)
Returns verbose settings.
Tuple with three entries -> (verbose, verboseLevel, filename).
tuple(bool, int, str)
Outputs a computed profile to disk.
outputType (str) – Profile output format (“HTML”, “LaTeX”).
directory (str) – Directory to write.
filename (str, optional) – Enable/disable additional logfile support to given file. Default: “”
style (str, optional) – Style of generated output. Default: “light”
color (tuple(float, float, float), optional) – Mainly used color of given style. Given in RGB values between 0.0 and 1.0. Default: “green” -> (0.003, 0.474, 0.435)
parallel (bool, optional) – Run some additional parts of the generation in parallel (experimental). Default: False
Set the number of parallel threads/processes to use.
parallel (int) – Number of threads to use for algorithms used during profiling.
Set verbose behaviour of all public methods.
verbose (bool, optional)
Default (Enable/disable display verbose.)
level (int, optional) – Set level of verbose (0, 1). Default: False
filename (str, optional) – Enable/disable additional logfile support to given file. Default: “”
Display computed profile.
style (str, optional) – Style of generated output. Default: “light”
color (tuple(float, float, float), optional) – Mainly used color of given style. Given in RGB values between 0.0 and 1.0. Default: “green” -> (0.003, 0.474, 0.435)
parallel (bool, optional) – Run some additional parts of the generation in parallel (experimental). Default: False
Print for verbose output.
text (str, optional) – Text to add to the verbose print. Default: “”
end (str, optional) – Marker for line break. Default: “n”
level (int, optional) – Level for verbose printing. Default: 0
Helper function the get complete filepath based on filename. Only used by profiler - no need to be called independently.
filename (str) – Name of file.
Helper function for file-loading. Only used by profiler - no need to be called independently.
filename (str) – Name of file.
removeWS (bool, optional) – Indicates whether whitespace should be removed. Default: False
Tests all files of a directory for the given conditions and generates a profile when matching.
inputDir (str) – The directory to search.
outputDir (str) – Directory to write the generated profiles.
graphFormat (networkit.graphio.Format) – Format of input graphs.
filePattern (str, optional) – Specify accepted file names, e.g.: *.METIS.graph. Default: *
preset (str, optional) – Config preset (“minimal”, “default”, “full”). Default: “default”
Config (networkit.profile.profile.Config) – Config object to control some aspects of the generation behaviour. Default: None
outputType (str, optional) – Profile output format (“HTML”, “LaTeX”). Default: “HTML”
style (str, optional) – Style of generated output. Default: “light”
color (tuple(float, float, float), optional) – Mainly used color of given style. Given in RGB values between 0.0 and 1.0. Default: “green” -> (0.003, 0.474, 0.435)
recursive (bool, optional) – Also search in subfolders for matching files. Default: False
parallel (bool, optional) – Run some additional parts of the generation in parallel (experimental). Default: False