WARNING: BoundedStandardDeviation
is deprecated. Please use BoundedVariance
instead and take the square root of the result.
BoundedStandardDeviation
computes the standard deviation of values in a dataset in a differentially private manner.
BoundedStandardDeviation
supports int64
s and double
s as inputs. When successful, the returned Output
message will contain one element containing the differentially private standard deviation. When bounds are inferred, the Output
additionally contains a BoundingReport
. The returned value is guaranteed to be non-negative, with a maximum possible value of the size of the bounded interval.
BoundedStandardDeviation
is a bounded algorithm. There are no additional parameters. Information on how to construct a BoundedStandardDeviation
is found in the bounded algorithm documentation. Below is a minimal construction example.
absl::StatusOr<std::unique_ptr<BoundedStandardDeviation<int64>>> bounded_stdev = BoundedStandardDeviation<int64>::Builder.SetEpsilon(1) .SetLower(-10) .SetUpper(10) .Build();
BoundedStandardDeviation
is an Algorithm
and supports its full API.
For BoundedStandardDeviation
, calling Result
is an O(n) operation and requires O(1) additional memory.