From 56aedb1eb0c4804fb9c9da5e54146be97d1b9e17 Mon Sep 17 00:00:00 2001 From: Marco Romanelli <41620979+mromanelli9@users.noreply.github.com> Date: Wed, 18 Jun 2025 17:25:08 +0200 Subject: [PATCH] refactor: set default sampling mode for perturbation to `weighted` --- src/aindo/anonymize/techniques/perturbation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aindo/anonymize/techniques/perturbation.py b/src/aindo/anonymize/techniques/perturbation.py index 3f89606..6f4cc89 100644 --- a/src/aindo/anonymize/techniques/perturbation.py +++ b/src/aindo/anonymize/techniques/perturbation.py @@ -46,13 +46,13 @@ class PerturbationNumerical(BasePerturbation, Generic[NumericsT]): If not set, the range is automatically computed as the minimum and maximum of the input data. """ - sampling_mode: SamplingMode = "uniform" + sampling_mode: SamplingMode = "weighted" perturbation_range: tuple[NumericsT, NumericsT] | None = None def __init__( self, alpha: float, - sampling_mode: SamplingMode = "uniform", + sampling_mode: SamplingMode = "weighted", perturbation_range: tuple[NumericsT, NumericsT] | None = None, **kwargs: SeedT, ) -> None: @@ -113,13 +113,13 @@ class PerturbationCategorical(BasePerturbation): Automatically computed if not provided. """ - sampling_mode: SamplingMode = "uniform" + sampling_mode: SamplingMode = "weighted" frequencies: dict[str, float] | None = None def __init__( self, alpha: float, - sampling_mode: SamplingMode = "uniform", + sampling_mode: SamplingMode = "weighted", frequencies: dict[str, float] | None = None, **kwargs: SeedT, ) -> None: