Step 2: Run Anonymization
Congratulations! Your dataset is now ready for anonymization. This page explains how to perform anonymization using the different clients provided by Octopize. For each client, we will demonstrate the anonymization process, metric calculation, and report generation using a sample dataset.
Anonymization Parameters
This section lists all parameters that influence the anonymization process.
To facilitate the first iteration, the method includes a built-in tool, further described as Advisor, that generates a predefined set of parameters based on the dataset's characteristics.
The parameters k and fast_dp_epsilon correspond to two distinct anonymization methods (Avatar and AvatarFastDP). You must set exactly one of them — they cannot be combined.
See Differential Privacy Methods for guidance on choosing the right method.
-
k: An integer representing the number of nearest neighbors to consider (standard Avatar method). The larger the value relative to the dataset size, the higher the level of protection, but at the cost of increased variance loss. -
fast_dp_epsilon: A float setting the privacy budget for AvatarFastDP (fast DP-flavored synthesis). Must be > 0.- The mechanism and its settings (
mechanism,gmm_n_components,histogram_n_bins,bounds_percentile) are not arguments ofset_parameters(). Set them in YAML underavatarization_fast_dp. See Differential Privacy Methods.
- The mechanism and its settings (
-
column_weights: Defines the importance of each variable during the projection process. Higher values result in greater separation between individuals based on that variable. -
ncp: Sets the number of dimensions to consider for the KNN algorithm. Lower values prioritize well-represented variables in the projection. -
use_categorical_reduction: A boolean that enables the transformation of categorical variables into a latent numerical space before projection. This reduces computational cost while preserving most of the original variance. -
imputation: Used when anonymizing datasets with missing values. If no imputation parameters are provided, missing data will be automatically handled.method: The imputation method. Available options:mode,median,mean,knn,fast_knn.
Ifknnorfast_knnis used, the parameterskandtraining_fractionwill be applied; otherwise, they will be ignored.k: Number of nearest neighbors to consider for KNN imputation.training_fraction: Fraction of the dataset used to train the KNN imputer. Smaller values improve performance.
-
exclude_variable_names: Allows the exclusion of some variables from anonymization before reassigning them probabilistically. This is useful for categorical variables with a high number of unique values.exclude_replacement_strategy: The method for reassigning excluded variables. Options:ExcludeVariablesMethod.COORDINATE_SIMILARITY: Matches excluded variable values from the most similar original record.ExcludeVariablesMethod.ROW_ORDER: Assigns each avatar record the excluded variable values from its original record.
-
seed: An integer used to set a random seed for reproducibility. Do not set this for production use cases.
Python Client
It is ideal for integrating anonymization into industrial ETL processes or using it directly after a preprocessing script.
Example Usage
See the GitHub tutorial to explore parameters and features.
Web Client
A web-based interface that allows users to interact with the API using a simple button-click approach.
Ideal for non-data scientists as it provides a quick and intuitive experience, though it is less suitable for industrial automation.
Interpretation and Iteration
Congratulations! You have completed your first end-to-end anonymization process.
You can now proceed to the Enhance page to interpret and improve the results.
If this is your final iteration, be sure to generate and store the anonymization report. This report serves as a risk analysis document, which can be archived in the DPO's processing registry.