federer
Version:
Experiments in asynchronous federated learning and decentralized learning
21 lines • 984 B
TypeScript
import * as tf from "@tensorflow/tfjs-node";
export interface DataDistributionStats {
/**
* 2D Tensor of shape `[clientLabels.length, numberLabelClasses]`
* mapping each client to the number of labels that it holds, for each
* different label. For example, a tensor containing `[[1, 10], [20, 2]]`
* means client 0 has 1 item with label 0 and 10 items with label 1, and
* client 1 has 20 items with label 0 and 2 items with label 1.
*/
distributionMatrix: tf.Tensor2D;
}
/**
* Computes statistics on the distribution of data that is produced by a
* preprocessing pipeline.
*
* @param clientLabels Labels in the sharded client datasets. These should be in
* numerical format, not one-hot encoded.
* @param numberLabelClasses Number of labels that exist in total
*/
export declare function dataDistributionStats(clientLabels: tf.Tensor1D[], numberLabelClasses: number): DataDistributionStats;
//# sourceMappingURL=distribution-stats.d.ts.map