GraphSplitter<T>

Models & Types ยท AiDotNet.Preprocessing.DataPreparation.Splitting.DomainSpecific

Graph splitter for node-level or edge-level predictions on graph data.

Inheritance: DataSplitterBase<T> โ†’ GraphSplitter<T>

For Beginners

Graph data consists of nodes (entities) connected by edges (relationships). Examples include social networks, molecular structures, and citation networks.

How It Works

Split Types:

  • Node split: Nodes are divided into train/test sets
  • Edge split: Edges are divided (for link prediction tasks)
  • Inductive: Test nodes are completely unseen during training

When to Use:

  • Social network analysis
  • Molecular property prediction
  • Knowledge graph completion
  • Recommendation systems

Constructors

Constructor Summary
GraphSplitter(double testSize, GraphSplitType<T> splitType, bool shuffle, int randomSeed) Creates a new graph splitter.

Properties

Property Summary
string Description { get; }

Methods

Method Summary
DataSplitResult<T> Split(Matrix<T> X, Vector<T> y)
GraphSplitter<T> WithAdjacencyMatrix(int[] adjacencyMatrix) Sets the adjacency matrix for graph-aware splitting.