# Traverse relation ### Description Given a `Predicate` or explicit `Edges`, traverses the graph from a set of subjects to a set of objects (`Forward`), or from a set of objects to a set of subjects (`Backward`). The same predicate/edges can be traversed multiple times (`Minimum / Maximum number of steps` can be specified). When multiple steps are performed, the result always includes the shortest path from the subjects in input to those reachable within the given `Minimum / Maximum number of steps` ### Input - `SOURCE [OBJ]`: a list of objects - `Edges [OBJ,OBJ] (optional): an explicit list of edges to traverse, in the form `(subject,object)` ### Output - `FROMTO [OBJ,OBJ]`: a pair representing the "from" and the "to" in the process of traversing a graph relation - `FROM [OBJ]`: the "from" column of `FROMTO` output. `FROM` objects always come from `SOURCE`. - `TO [OBJ]`: the "to" column of `FROMTO` output ### Parameters - `Predicate` (unless input `Edges` is connected): the predicate of a graph triple `(subject,predicate,object)` - `Use sub-predicates (unless input `Edges` is connected)`: when set to `true`, the values of all sub-predicates are also included. Sub-predicates can be defined in the data with the `rdfs:subPropertyOf` relation. - `Direction`: the direction to use when traversing the relation with the given `Predicate` and `SOURCE` - `Forward`: `(FROM = SOURCE, Predicate, TO = ?)` - `Backward`: `(TO = ?, Predicate, FROM = SOURCE)` - `Either`: the result contains the union of `Forward` and `Backward` results - `Minimum number of steps`: Only include results reachable in a given minimum number os steps. Setting this to 0 includes all the `SOURCE` nodes in the result. - `Maximum number of steps`: Only include results reachable in a given maximum number os steps. - `Step weight`: [0..1]. Weight applied at every step. When < 1, further steps are progressively penalised. - `Normalise over entire graph`. Use `false` (default) when data `SOURCE` is representative enough: - `false`: `Score normalisation` only considers the data in `SOURCE` to normalise against - `true`: `Score normalisation` considers all data in the dataset containing `SOURCE` to normalise against Output scores can be [aggregated](docs://score_aggregation) and/or [normalised](docs://score_normalisation).