Filtering data before sending to pipeline

I am using classification pipeline now what I want to filter my data before sending it into pipeline how can I do that. As I can see in documents there is not option to only send filter data to the pipeline can you help me?

Hi @jaikishang041,

To filter down your graph you can specify which node labels and relationship types should be used in each node property step in your pipeline. You do this by providing the contextNodeLabels and contextRelationshipTypes when you call gds.beta.pipeline.nodeClassification.addNodeProperty. See the syntax breakdown here: Configuring the pipeline - Neo4j Graph Data Science

Similarly, for the actual training you can also filter down which node labels you want to be included. For this you use the targetNodeLabels argument. See the syntax breakdown here: Training the pipeline - Neo4j Graph Data Science

If you want to filter the graph "globally" before running the pipeline altogether, you can also call gds.graph.filter (docs here: Filtering - Neo4j Graph Data Science) to first create a subgraph, and then run your training pipeline on that subgraph.

Hope this helps,
Adam