5.1.1.4.1.3. FedEval.dataset.FedDataBase

5.1.1.4.1.3.1. Module Contents

5.1.1.4.1.3.1.1. Classes

FedData

By default, FedData produces datasets for horizontal federated learning

5.1.1.4.1.3.1.2. Functions

split_data(→ List[numpy.ndarray])

Divide the data based on the given parameter ratio_list.

shuffle(X, Y)

Input (X, Y) pairs, shuffle and return it.

FedEval.dataset.FedDataBase.split_data(data, ratio_list) List[numpy.ndarray]

Divide the data based on the given parameter ratio_list.

Parameters:
  • data (ndarray) – Data to be split.

  • ratio_list (list) – Split ratio, the data will be split according to the ratio.

Returns:

The elements in the returned list are the divided data, and the

dimensions of the list are the same as ratio_list.

Return type:

list

FedEval.dataset.FedDataBase.shuffle(X, Y)

Input (X, Y) pairs, shuffle and return it.

class FedEval.dataset.FedDataBase.FedData

By default, FedData produces datasets for horizontal federated learning

property need_regenerate: bool
_load_and_process_data()
abstract load_data()
iid_data(save_file=True)
_save_dataset_files(dataset: List[Mapping[str, List[numpy.ndarray]]]) None
non_iid_data(save_file=True, called_in_iid=False) List[Mapping[str, List[numpy.ndarray]]]