@@ -33,12 +33,14 @@ def __call__(self, data):
3333
3434
3535class Continuize (Preprocess ):
36+ MultinomialTreatment = Enum (
37+ "Continuize" ,
38+ ("Indicators" , "FirstAsBase" , "FrequentAsBase" , "Remove" ,
39+ "RemoveMultinomial" , "ReportError" , "AsOrdinal" , "AsNormalizedOrdinal" ,
40+ "Leave" ),
41+ qualname = "Continuize.MultinomialTreatment" )
3642 (Indicators , FirstAsBase , FrequentAsBase , Remove , RemoveMultinomial ,
37- ReportError , AsOrdinal , AsNormalizedOrdinal , Leave ) = Enum (
38- "Continuize" ,
39- "Indicators, FirstAsBase, FrequentAsBase,"
40- "Remove, RemoveMultinomial, ReportError, AsOrdinal,"
41- "AsNormalizedOrdinal, Leave" )
43+ ReportError , AsOrdinal , AsNormalizedOrdinal , Leave ) = MultinomialTreatment
4244
4345 def __init__ (self , zero_based = True ,
4446 multinomial_treatment = Indicators ):
@@ -255,8 +257,8 @@ class Normalize(Preprocess):
255257 >>> normalizer = Normalize(norm_type=Normalize.NormalizeBySpan)
256258 >>> normalized_data = normalizer(data)
257259 """
258- Type = Enum ("Normalize" ,
259- "NormalizeBySpan, NormalizeBySD " )
260+ Type = Enum ("Normalize" , ( "NormalizeBySpan" , "NormalizeBySD" ),
261+ qualname = "Normalize.Type " )
260262 NormalizeBySpan , NormalizeBySD = Type
261263
262264 def __init__ (self ,
@@ -326,8 +328,12 @@ class Randomize(Preprocess):
326328 >>> randomizer = Randomize(Randomize.RandomizeClasses)
327329 >>> randomized_data = randomizer(data)
328330 """
329- Type = Enum ("Randomize" , dict (RandomizeClasses = 1 , RandomizeAttributes = 2 ,
330- RandomizeMetas = 4 ), type = int )
331+ Type = Enum ("Randomize" ,
332+ dict (RandomizeClasses = 1 ,
333+ RandomizeAttributes = 2 ,
334+ RandomizeMetas = 4 ),
335+ type = int ,
336+ qualname = "Randomize.Type" )
331337 RandomizeClasses , RandomizeAttributes , RandomizeMetas = Type
332338
333339 def __init__ (self , rand_type = RandomizeClasses , rand_seed = None ):
@@ -396,8 +402,10 @@ class _MethodEnum(Enum):
396402 def __call__ (self , * args , ** kwargs ):
397403 return getattr (Scale , '_' + self .name )(* args , ** kwargs )
398404
399- CenteringType = _MethodEnum ('Scale' , 'NoCentering, Mean, Median' )
400- ScalingType = _MethodEnum ('Scale' , 'NoScaling, Std, Span' )
405+ CenteringType = _MethodEnum ("Scale" , ("NoCentering" , "Mean" , "Median" ),
406+ qualname = "Scale.CenteringType" )
407+ ScalingType = _MethodEnum ("Scale" , ("NoScaling" , "Std" , "Span" ),
408+ qualname = "Scale.ScalingType" )
401409 NoCentering , Mean , Median = CenteringType
402410 NoScaling , Std , Span = ScalingType
403411
0 commit comments