IIDClientSplitter<T>
Models & Types · AiDotNet.Preprocessing.DataPreparation.Splitting.FederatedLearning
IID (Independent and Identically Distributed) client splitter for federated learning.
Inheritance: DataSplitterBase<T> → IIDClientSplitter<T>
For Beginners
In federated learning, data is distributed across multiple clients (devices or institutions). IID partitioning means each client gets a random sample of the overall data, so all clients have similar data distributions.
How It Works
How It Works:
- Shuffle all data randomly
- Divide equally (or according to specified ratios) among clients
- Each client’s data is statistically similar to the global distribution
When to Use:
- Simulating ideal federated learning scenarios
- Baseline experiments before testing non-IID
- When clients should have representative samples
Constructors
| Constructor | Summary |
|---|---|
IIDClientSplitter(int numClients, double[] clientRatios, double testRatio, bool shuffle, int randomSeed) |
Creates a new IID client splitter. |
Properties
| Property | Summary |
|---|---|
int NumSplits { get; } |
|
string Description { get; } |
Methods
| Method | Summary |
|---|---|
DataSplitResult<T> Split(Matrix<T> X, Vector<T> y) |
|
IEnumerable<DataSplitResult<T>> GetSplits(Matrix<T> X, Vector<T> y) |