Skip to content

@graphty/algorithms / index / LinkPredictionOptions

Interface: LinkPredictionOptions ​

Defined in: indexed/link-prediction.ts:30

Options of the link prediction functions.

Extends ​

Properties ​

directed? ​

readonly optional directed?: boolean

Defined in: indexed/common-neighbors.ts:6

Intersect out(u) with in(v) instead of the two undirected rows.

Inherited from ​

CommonNeighborsOptions.directed


includeExisting? ​

readonly optional includeExisting?: boolean

Defined in: indexed/link-prediction.ts:32

Also score pairs already joined by an arc u -> v. Default false.


topK? ​

readonly optional topK?: number

Defined in: indexed/link-prediction.ts:38

Keep only the first topK ranked pairs. For the whole-graph predictions a value that is not positive keeps them all; for a node's candidates the default is 10 and the value is a slice end, so 0 keeps none and -2 drops the last two.


uniquePairs? ​

readonly optional uniquePairs?: boolean

Defined in: indexed/link-prediction.ts:44

List each pair once, lower node index first, so topK counts distinct pairs. Default false, which lists a pair both ways round unless directed is true. With directed: true each ordered pair is listed once anyway and this changes nothing.