Graph Profiler¶
Class and functions to calculate and profile properties of graph data.
- class dataprofiler.profilers.graph_profiler.GraphProfiler(data: Union[networkx.classes.graph.Graph, dataprofiler.data_readers.graph_data.GraphData], options: Optional[dataprofiler.profilers.profiler_options.ProfilerOptions] = None)¶
Bases:
object
GraphProfiler class.
Creates a profile describing a graph dataset Statistical properties of graph
Initialize Graph Profiler.
- Parameters
data (Union[networkx.Graph, data_readers.graph_data.GraphData]) – data
options (GraphOptions) – Options for the Graph Profiler
- times: Dict[str, float]¶
Properties
- property profile: Dict¶
Return the profile of the graph.
- Returns
the profile of the graph in data
- diff(other_profile: dataprofiler.profilers.graph_profiler.GraphProfiler, options: Optional[Dict] = None) Dict ¶
Find the differences for two graph profiles.
- Parameters
other_profile (GraphProfiler) – profile to find the difference with
options (dict) – options for diff output
- Returns
the difference between profiles
- Return type
dict
- report(remove_disabled_flag: bool = False) Dict ¶
Report on profile attribute of the class.
Pop value from self.profile if key not in self.__calculations
- update(graph: networkx.classes.graph.Graph) dataprofiler.profilers.graph_profiler.GraphProfiler ¶
Update the graph profile.
- Parameters
data (NetworkX Graph) – networkx graph
- Returns
None
- save(filepath: Optional[str] = None) None ¶
Save profiler to disk.
- Parameters
filepath (String) – Path of file to save to
- Returns
None
- classmethod load(filepath: str) dataprofiler.profilers.graph_profiler.GraphProfiler ¶
Load profiler from disk.
- Parameters
filepath (String) – Path of file to load from
- Returns
GraphProfiler being loaded
- Return type