src.preprocessing.find_storylines¶
Find the storylines in the data.
Functions
|
Find the storylines in the graph. |
Classes
Find the storylines in the data. |
- class src.preprocessing.find_storylines.FindStorylines[source]¶
Find the storylines in the data.
The data is expected to have an “adj_list” and “adj_weights” column that contains the adjacency list of the graph. It will return the data with a “storyline” column that contains the storyline index for each row.
- src.preprocessing.find_storylines.find_storylines(graph)[source]¶
Find the storylines in the graph.
The storylines are found by repeatedly checking the shortest path from the source node to every other node and taking the longest path.
- Parameters:
graph (
PyDiGraph
) – The graph to find the storylines in.- Return type:
list
[list
[int
]]- Returns:
The storylines as list of lists of node IDs.