[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-20 UTC."],[],[],null,["# tff.analytics.count_distinct.build_federated_secure_max_computation\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |\n\nBuilds a [`tff.Computation`](../../../tff/Computation) for computing max in a secure fashion. \n\n tff.analytics.count_distinct.build_federated_secure_max_computation() -\u003e ../../../tff/Computation\n\nSpecifically, the returned computation consumes sketches at @CLIENTS and\nreturns the element-wise max of the inpt sketches @SERVER.\n| **Note:** this returned computation assumes the values to be maxed are in the range \\[0, HLL_BIT_INDEX_TAIL+1\\]. This function works by onehot encoding the values which allows us to sum the values securely and then infer the max based on the non-zero entries of the sum. This approach is feasible because the inputs are small non-negative integers. Generalizations of this function would require communication proportional to (upper_bound - lower_bound).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A [`tff.Computation`](../../../tff/Computation) for computing max of client vectors. ||\n\n\u003cbr /\u003e"]]