LeafShakespeareFederatedDatasetLoader
Models & Types · AiDotNet.FederatedLearning.Benchmarks.Leaf
Loads the LEAF Shakespeare benchmark JSON files into per-client datasets.
For Beginners
This loader reads LEAF JSON and returns one dataset per user so federated learning simulations match the benchmark’s per-user partitioning.
How It Works
Shakespeare is a federated next-character prediction benchmark. LEAF stores each sample as a fixed-length
character window (x) and the next character (y).
Constructors
| Constructor | Summary |
|---|---|
LeafShakespeareFederatedDatasetLoader() |
Methods
| Method | Summary |
|---|---|
LeafFederatedDataset<string[], string[]> LoadDatasetFromFiles(string trainFilePath, string testFilePath, LeafFederatedDatasetLoadOptions options) |
Loads a LEAF Shakespeare train dataset and optional test dataset from files. |
LeafFederatedSplit<string[], string[]> LoadSplitFromFile(string filePath, LeafFederatedDatasetLoadOptions options) |
Loads a LEAF Shakespeare split (train/test) from a JSON file. |
LeafFederatedSplit<string[], string[]> LoadSplitFromJson(string json, LeafFederatedDatasetLoadOptions options) |
Loads a LEAF Shakespeare split (train/test) from a JSON string. |