Skip to content

Commit 9dd66d7

Browse files
authored
Merge pull request #2151 from jerneju/type-predictions
[FIX] Preprocess: enums containing function names changed
2 parents 16babbb + 4fb1caa commit 9dd66d7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Orange/preprocess/preprocess.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ def __call__(self, data):
3333

3434

3535
class Continuize(Preprocess):
36-
(Indicators, FirstAsBase, FrequentAsBase,Remove, RemoveMultinomial,
36+
(Indicators, FirstAsBase, FrequentAsBase, Remove, RemoveMultinomial,
3737
ReportError, AsOrdinal, AsNormalizedOrdinal, Leave) = Enum(
38-
"Continuize",
39-
"Indicators, FirstAsBase, FrequentAsBase,"
40-
"Remove, RemoveMultinomial, ReportError, AsOrdinal,"
41-
"AsNormalizedOrdinal, Leave")
38+
"Continuize",
39+
"Indicators, FirstAsBase, FrequentAsBase,"
40+
"Remove, RemoveMultinomial, ReportError, AsOrdinal,"
41+
"AsNormalizedOrdinal, Leave")
4242

4343
def __init__(self, zero_based=True,
4444
multinomial_treatment=Indicators):
@@ -288,9 +288,9 @@ def __call__(self, data):
288288
for a in data.domain.attributes if a.is_continuous):
289289
# Skip normalization for data sets where all features are marked as already normalized.
290290
# Required for SVMs (with normalizer as their default preprocessor) on sparse data to
291-
# retain sparse structure. Normalizing sparse data would otherwise result in a dense matrix,
292-
# which requires too much memory. For example, this is used for Bag of Words models where
293-
# normalization is not really needed.
291+
# retain sparse structure. Normalizing sparse data would otherwise result in a dense
292+
# matrix, which requires too much memory. For example, this is used for Bag of Words
293+
# models where normalization is not really needed.
294294
return data
295295
normalizer = normalize.Normalizer(
296296
zero_based=self.zero_based,
@@ -403,8 +403,8 @@ class _MethodEnum(Enum):
403403
def __call__(self, *args, **kwargs):
404404
return getattr(Scale, '_' + self.name)(*args, **kwargs)
405405

406-
CenteringType = _MethodEnum('Scale', 'NoCentering, Mean, Median', type=int)
407-
ScalingType = _MethodEnum('Scale', 'NoScaling, Std, Span', type=int)
406+
CenteringType = _MethodEnum('Scale', 'NoCentering, Mean, Median')
407+
ScalingType = _MethodEnum('Scale', 'NoScaling, Std, Span')
408408
NoCentering, Mean, Median = CenteringType
409409
NoScaling, Std, Span = ScalingType
410410

0 commit comments

Comments
 (0)