federer
Version:
Experiments in asynchronous federated learning and decentralized learning
22 lines • 874 B
TypeScript
/**
* Given number of splits, the function determines fraction of data in each split.
* Zipf's law is given by f(k;s;N) = (1/k**s)/ Summation{from=1}{to=N}(1/n**s)
* @param N Number of splits
* @param s the value of the exponent characterizing the distribution
* @returns array of split fractions
*
*/
export declare function zipf(N: number, s: number): number[];
/**
*
* @param size total number of samples to be split
* @param numberOfBatches total number of batches to be formed
* @param s exponent in the function
* @returns sample size for each batch
* @throws Error for s < 1 or size < 0 or numberOfBatches<0
* @assumes batch size = 0 is okay since these batches are used in conjunction
* with uniform batches
*
*/
export declare function zipfSplits(size: number, numberOfBatches: number, s: number): number[];
//# sourceMappingURL=datasplits.d.ts.map