Calculating the shortest path
To calculate the shortest path between two nodes in a dataset, select the nodes and right-click to select Shortest Path from the context menu.
The time that it takes to calculate shortest paths is relative to the length of possible paths and the size of the schema of a dataset. Longer paths take more processing steps to calculate and complex ontology configurations can multiply the number of paths to test. The raw size of the dataset can also impact processing times.
You can limit the amount of data that is processed in one of the following ways:
By using the Dashboard Filter feature in the Expansion tab. For example, you can limit the shortest path by which two companies are co-mentioned to use only "Articles in 2013" by applying this filter to the Article dashboard and then selecting Article as a dashboard filter.
By deselecting unwanted relations. The more relations that you apply, the more complex the search will be.
You can also specify the following limits:
Maximum path length: This setting controls how many steps along a potential path the calculation can travel. The algorithm identifies increasingly longer paths connecting the selected nodes, up to the specified maximum path length.
Maximum retrieved records per join: This setting limits the number of records that are returned by each back-end query that extracts entities connecting the selected nodes. This roughly translates to the count of selected nodes returned for each saved search or entity identifier that is encountered while detecting paths.
The shortest path algorithm respects the timeout parameters that are specified in relational properties and the
siren:joinTaskTimeout advanced parameter. You can use these values to set a maximum time to complete queries.
|If you are working with Neo4j data, you can use the Neo4j Shortest Path script. Ensure that Siren Platform is connected to a Neo4j back-end system and the correct loading procedure has been used. For more information, see Adding a Shortest Path script for Neo4j.|
The Graph Browser can detect paths that minimize the distance between three or more input nodes at the same time. The resulting generated paths tend to reach toward a common subset of nodes that act as intermediaries between the input nodes.
To detect these nodes, select the input nodes and right-click to select Common Communicators from the context menu.
The following image shows an example of the resulting paths that this function can generate:
The input parameters are equivalent to those that are already specified for the Shortest Path script and all performance-related notes for the Shortest Path apply here, too.
The number of input nodes is an important factor that affects the speed and required memory usage of the
Common Communicators script. It is recommended to use only 3-4 nodes to avoid potentially saturating the available Federate Root Allocator memory pool and slowing down the request.
Both the shortest path and the common communicators scripts are available in new Graph Browser visualizations when you select Add all available lenses and contextual scripts in the Script auto configuration section.
To add these functions to the context menu of an existing Graph Browser, complete the following steps: