Function smartnoise_runtime::components::resize::resize_categorical [−][src]
pub fn resize_categorical<T>(
data: ArrayD<T>,
resize_config: RowResizeConfig,
number_cols: Option<i64>,
categories: Vec<Vec<T>>,
weights: Option<Vec<Vec<Float>>>,
privacy_definition: &Option<PrivacyDefinition>
) -> Result<ArrayD<T>> where
T: Clone + PartialEq + Default + Ord + Hash,
Resizes categorical data based on estimate of n and true size of data.
Arguments
data
- The data to be resizedn
- An estimate of the size of the data – this could be the guess of the user, or the result of a DP releasecategories
- For each data column, the set of possible values for elements in the columnweights
- For each data column, weights for each category to be used when imputing null valuesnull_value
- For each data column, the value of the data to be considered NULL.
Return
A resized version of data consistent with the provided n