Class - RandomNumPyDataSplitter#

class openfl.utilities.data_splitters.numpy.RandomNumPyDataSplitter(shuffle=True, seed=0)[source]#

Bases: NumPyDataSplitter

Class for splitting numpy arrays of data randomly.

Parameters:
  • shuffle (bool, optional) – Flag determining whether to shuffle the dataset before splitting. Defaults to True.

  • seed (int, optional) – Random numbers generator seed. Defaults to 0.

__init__(shuffle=True, seed=0)[source]#

Initialize.

Parameters:
  • shuffle (bool) – Flag determining whether to shuffle the dataset before splitting. Defaults to True.

  • seed (int) – Random numbers generator seed. Defaults to 0. For different splits on envoys, try setting different values for this parameter on each shard descriptor.

Methods

__init__([shuffle, seed])

Initialize.

split(data, num_collaborators)

Split the data.

split(data, num_collaborators)[source]#

Split the data.