File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
"""
5
5
6
+ import cudf
6
7
import numpy as np
7
8
8
9
from hypernets .core import ModuleChoice , Choice
12
13
_cs = CumlToolBox .column_selector
13
14
_tfs = CumlToolBox .transformers
14
15
16
+ _support_median = hasattr (cudf .DataFrame (), 'median' )
17
+
15
18
16
19
class CumlPipelineOutput (PipelineOutput ):
17
20
@staticmethod
@@ -78,7 +81,10 @@ def numeric_pipeline_simple(impute_strategy='mean', seq_no=0):
78
81
79
82
def numeric_pipeline_complex (impute_strategy = None , seq_no = 0 ):
80
83
if impute_strategy is None :
81
- impute_strategy = Choice (['mean' , 'median' , 'constant' , ]) # 'most_frequent'
84
+ if _support_median :
85
+ impute_strategy = Choice (['mean' , 'median' , 'constant' , ]) # 'most_frequent'
86
+ else :
87
+ impute_strategy = Choice (['mean' , 'constant' , ]) # 'median', 'most_frequent'
82
88
elif isinstance (impute_strategy , list ):
83
89
impute_strategy = Choice (impute_strategy )
84
90
You can’t perform that action at this time.
0 commit comments