Module opendp::transformations
source · Expand description
Various transformation constructors.
The different crate::core::Transformation
implementations in this module are accessed by calling the appropriate constructor function.
Constructors are named in the form make_xxx()
, where xxx
indicates what the resulting Transformation
does.
Modules
Structs
- Marker type to represent pairwise, or cascading summation
- Marker type to represent sequential, or recursive summation
Traits
- Utility trait to drop null values from a dataset, regardless of the representation of nullity.
- Utility trait to impute with a constant, regardless of the representation of nullity.
- Implemented for any domain that supports multiplication lipschitz extensions
- Implemented for any metric that supports multiplication lipschitz extensions
Functions
- Returns an approximation to the ideal
branching_factor
for a dataset of a given size, that minimizes error in cdf and quantile estimates based on b-ary trees. - Expand a vector of counts into a b-ary tree of counts, where each branch is the sum of its
b
immediate children. - Make a Transformation that computes the sum of bounded data with known dataset size.
- Make a Transformation that computes the sum of bounded floats with known ordering.
- Make a Transformation that computes the sum of bounded ints, where all values share the same sign.
- Make a Transformation that computes the sum of bounded ints. You may need to use
make_ordered_random
to impose an ordering on the data. - Make a Transformation that computes the sum of bounded ints. Adds the saturating sum of the positives to the saturating sum of the negatives.
- Make a Transformation that computes the sum of bounded data. Use
make_clamp
to bound data. - Make a Transformation that casts a vector of data from type
TIA
to typeTOA
. For each element, failure to parse results inNone
, elseSome(out)
. - Make a Transformation that casts a vector of data from type
TIA
to typeTOA
. Any element that fails to cast is filled with default. - Make a Transformation that casts a vector of data from type
TIA
to a type that can represent nullityTOA
. If cast fails, fill withTOA
’s null value. - Postprocess a noisy array of float summary counts into a cumulative distribution.
- Make a Transformation that clamps numeric data in
Vec<TA>
tobounds
. - Postprocessor that makes a noisy b-ary tree internally consistent, and returns the leaf layer.
- Make a Transformation that computes a count of the number of records in data.
- Make a Transformation that computes the count of each unique value in data. This assumes that the category set is unknown.
- Make a Transformation that computes the number of times each category appears in the data. This assumes that the category set is known.
- Make a Transformation that computes a count of the number of unique, distinct records in data.
- Make a Transformation that constructs a dataframe from a
Vec<Vec<String>>
(a vector of records). - Make a Transformation that casts the elements in a column in a dataframe from type
TIA
to typeTOA
. If cast fails, fill with default. - Make a Transformation that checks if each element in a column in a dataframe is equivalent to
value
. - Make a Transformation that drops null values.
- Find the index of a data value in a set of categories.
- Make a transformation that finds the bin index in a monotonically increasing vector of edges.
- Constructs a
Transformation
representing the identity function. - Make a Transformation that replaces null/None data with
constant
. - Make a Transformation that replaces NaN values in
Vec<TA>
with uniformly distributed floats withinbounds
. - Make a transformation that treats each element as an index into a vector of categories.
- Make a Transformation that checks if each element is equal to
value
. - Make a Transformation that checks if each element in a vector is null.
- Make a transformation that multiplies an aggregate by a constant.
- Make a Transformation that converts the unbounded dataset metric
MI
to the respective bounded dataset metric with a no-op. - Make a Transformation that converts the bounded dataset metric
MI
to the respective unbounded dataset metric with a no-op. - Make a Transformation that converts the unordered dataset metric
SymmetricDistance
to the respective ordered dataset metricInsertDeleteDistance
by assigning a random permutation. - Postprocess a noisy array of summary counts into quantiles.
- Make a Transformation that either truncates or imputes records with
constant
to match a providedsize
. - Make a Transformation that retrieves the column
key
from a dataframe asVec<TOA>
. - Make a Transformation that computes the sum of bounded floats with known dataset size.
- Make a Transformation that computes the sum of bounded floats with known ordering and dataset size.
- Make a Transformation that computes the sum of bounded ints. The effective range is reduced, as (bounds * size) must not overflow.
- Make a Transformation that computes the sum of bounded ints, where all values share the same sign.
- Make a Transformation that computes the sum of bounded ints with known dataset size.
- Make a Transformation that computes the sum of bounded ints with known dataset size.
- Make a Transformation that computes the mean of bounded data.
- Make a Transformation that computes the sum of bounded data with known dataset size.
- Make a Transformation that computes the sum of squared deviations of bounded data.
- Make a Transformation that computes the variance of bounded data.
- Make a Transformation that splits each record in a String into a
Vec<Vec<String>>
, and loads the resulting table into a dataframe keyed bycol_names
. - Make a Transformation that takes a string and splits it into a
Vec<String>
of its lines. - Make a Transformation that splits each record in a
Vec<String>
into aVec<Vec<String>>
. - Make a Transformation that subsets a dataframe by a boolean column.
- Make a Transformation that converts the ordered dataset metric
MI
to the respective ordered dataset metric with a no-op.