VerticalDataPartitioner<T>

Models & Types · AiDotNet.FederatedLearning.Vertical

Partitions features (columns) across parties for vertical federated learning simulation.

Inheritance: FederatedLearningComponentBase<T> → VerticalDataPartitioner<T>

For Beginners

In a real VFL deployment, each party already holds its own features (the bank has financial data, the hospital has medical data). But for testing and simulation, we need to take a single dataset and split its columns across simulated parties. This class does that splitting.

How It Works

Partitioning strategies:

Reference: VertiBench (ICLR 2024) recommends diverse feature distribution testing.

Constructors

Constructor Summary
VerticalDataPartitioner()

Methods

Method Summary
IReadOnlyDictionary<int, IReadOnlyList<int>> PartitionCustom(IDictionary<int, IReadOnlyList<int>> partyColumns) Creates a vertical partition from explicit column assignments.
IReadOnlyDictionary<int, IReadOnlyList<int>> PartitionInterleaved(int totalFeatures, int numberOfParties) Partitions features in an interleaved (round-robin) pattern across parties.
IReadOnlyDictionary<int, IReadOnlyList<int>> PartitionRandom(int totalFeatures, int numberOfParties, int? seed) Partitions features randomly across parties.
IReadOnlyDictionary<int, IReadOnlyList<int>> PartitionSequential(int totalFeatures, int numberOfParties) Partitions features sequentially across the specified number of parties.
Tensor<T> ExtractPartyFeatures(Tensor<T> fullData, IReadOnlyList<int> columnIndices) Extracts a party’s feature columns from a full data tensor.