strategies#

SamplerStrategy#

class fkat.data.samplers.strategies.SamplerStrategy(*args, **kwargs)[source]#

This strategy decides which Sampler to use next and returns its label

Weighted#

class fkat.data.samplers.strategies.Weighted(weights: dict[str, float])[source]#

Sample the label to generate next microbatch from using the provided weight distribution. For uniform distribution use the same weight for all labels.

RoundRobin#

class fkat.data.samplers.strategies.RoundRobin(names: list[str])[source]#

Specifies the order of labels to generate microbatches from.

Frequency#

class fkat.data.samplers.strategies.Frequency(freq: list[list[Any]])[source]#

Specifies the order and number of microbatches to generate for specific labels. E.g. [[“first”, 2], [“second”, 1], [“first”, 3], [“third”, 1]]