LeafSent140FederatedDatasetLoader

Models & Types · AiDotNet.FederatedLearning.Benchmarks.Leaf

Loads the LEAF Sent140 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

Sent140 is a federated sentiment classification benchmark derived from tweets. LEAF stores each sample as an array of string fields (id, date, query, user, text) and a numeric label (0/1).

Constructors

Constructor Summary
LeafSent140FederatedDatasetLoader()

Methods

Method Summary
LeafFederatedDataset<string[], int[]> LoadDatasetFromFiles(string trainFilePath, string testFilePath, LeafFederatedDatasetLoadOptions options) Loads a LEAF Sent140 train dataset and optional test dataset from files.
LeafFederatedSplit<string[], int[]> LoadSplitFromFile(string filePath, LeafFederatedDatasetLoadOptions options) Loads a LEAF Sent140 split (train/test) from a JSON file.
LeafFederatedSplit<string[], int[]> LoadSplitFromJson(string json, LeafFederatedDatasetLoadOptions options) Loads a LEAF Sent140 split (train/test) from a JSON string.