From 26adcf3528aecd955b250abb0d828612fcd12b05 Mon Sep 17 00:00:00 2001 From: abigailt Date: Mon, 29 May 2023 19:15:16 +0300 Subject: [PATCH] All tests pass, still need to review TODOs Signed-off-by: abigailt --- apt/minimization/minimizer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apt/minimization/minimizer.py b/apt/minimization/minimizer.py index f5b1219..5508c34 100644 --- a/apt/minimization/minimizer.py +++ b/apt/minimization/minimizer.py @@ -972,7 +972,8 @@ class GeneralizeToRepresentative(BaseEstimator, MetaEstimatorMixin, TransformerM if 'untouched' in cell: for feature in cell['untouched']: record_copy.pop(feature) - representative.pop(feature) + if feature in representative: + representative.pop(feature) if record_copy == representative: # handle numerical features for feature in [key for key in cell['ranges'].keys() if