LeafFederatedSplit<TInput, TOutput>
Models & Types · AiDotNet.FederatedLearning.Benchmarks.Leaf
Represents a single LEAF split (train/test) as per-client datasets.
For Beginners
Instead of one big dataset for everyone, federated learning uses many small datasets — one per device or organization. This class stores that “one dataset per client” view of the data.
How It Works
LEAF is a federated learning benchmark suite where each user corresponds to one client. This type preserves that structure by storing one dataset per user.
Constructors
| Constructor | Summary |
|---|---|
LeafFederatedSplit(IReadOnlyList<string> userIds, IReadOnlyDictionary<string, FederatedClientDataset<TInput, TOutput>> userData) |
Initializes a new instance of the LeafFederatedSplit class. |
Properties
| Property | Summary |
|---|---|
IReadOnlyDictionary<string, FederatedClientDataset<TInput, TOutput>> UserData { get; } |
Gets the per-user datasets in this split. |
IReadOnlyList<string> UserIds { get; } |
Gets the ordered list of user IDs in this split. |
int ClientCount { get; } |
Gets the number of clients/users in this split. |
Methods
| Method | Summary |
|---|---|
Dictionary<int, FederatedClientDataset<TInput, TOutput>> ToClientIdDictionary(IReadOnlyDictionary<int, string> clientIdToUserId) |
Converts this split into the Dictionary<int, FederatedClientDataset> form used by trainers. |