# How can one predict links only for one node in the network

**URL:** <https://community.neo4j.com/t/how-can-one-predict-links-only-for-one-node-in-the-network/48976>\
**Category:** Graph Data Science / Graph Analytics\
**Created:** [December 14, 2021, 10:02am UTC](https://community.neo4j.com/t/how-can-one-predict-links-only-for-one-node-in-the-network/48976 "2021-12-14T10:02:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakshi](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sakshi/32/20350_2.png) [@sakshi](https://community.neo4j.com/u/sakshi)\
**Post date:** [December 14, 2021, 10:02am UTC](https://community.neo4j.com/t/how-can-one-predict-links-only-for-one-node-in-the-network/48976/1 "2021-12-14T10:02:15Z")

</div>

How can one predict links only for one node in the network. I am using this solution at the moment to predict link for only one node with label onechaintopoi. But I would like to possible links between onechaintopoi and other nodes with label Node in the network. My current solution also predicts links between other nodes with label Node. I would like to limit this prediction only between onechaintopoi and Node.

```auto
 CALL gds.alpha.ml.linkPrediction.predict.('POI2', {
  modelName: 'mylinkpredict_with_embedding',
  relationshipTypes: ['onechaintopoi'],
  nodeLabels:['onechaintopoi','Node'],
  mutateRelationshipType: 'PREDICTED',
  sampleRate: 0.5,
  topK: 1000,
  randomJoins: 5,
  maxIterations: 10,
  deltaThreshold : 0.0001,
  concurrency: 1,
  randomSeed: 42
});

```
