This gets a complete feature matrix row for every target connected by any selected path to the given source nodes.
This gets a complete feature matrix row for every target connected by any selected path to the given source nodes. Then we do a vector-matrix multiplication for each source, and keep all targets in the resultant vector that are also in allowed_targets.
If you know which (source, target) pairs you want to compute features for, this is a faster way to go about it.
If you know which (source, target) pairs you want to compute features for, this is a faster way to go about it. However, when creating the initial feature matrix, and when making blanket predictions for a source (as is my typical prediction method in my KB inference experiments), you need to actually look at _all_ of the targets connected to by any path type. That's what the next method is for.