Skip to content

Commit

Permalink
remove using categorical columns
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinkohli committed Oct 25, 2022
1 parent 960e1ef commit 1be80d5
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def fit(self, X: Dict[str, Any], y: Any = None) -> "TabularColumnTransformer":
column_transformers: List[Tuple[str, BaseEstimator, List[int]]] = []

numerical_pipeline = 'passthrough'
categorical_pipeline = 'passthrough'
encode_pipeline = 'passthrough'

if len(preprocessors['numerical']) > 0:
Expand All @@ -68,12 +67,6 @@ def fit(self, X: Dict[str, Any], y: Any = None) -> "TabularColumnTransformer":
column_transformers.append(
('numerical_pipeline', numerical_pipeline, X['dataset_properties']['numerical_columns'])
)
if len(preprocessors['categorical']) > 0:
categorical_pipeline = make_pipeline(*preprocessors['categorical'])

column_transformers.append(
('categorical_pipeline', categorical_pipeline, X['dataset_properties']['categorical_columns'])
)

if len(preprocessors['encode']) > 0:
encode_pipeline = make_pipeline(*preprocessors['encode'])
Expand All @@ -82,6 +75,12 @@ def fit(self, X: Dict[str, Any], y: Any = None) -> "TabularColumnTransformer":
('encode_pipeline', encode_pipeline, X['encode_columns'])
)

# if len(preprocessors['categorical']) > 0:
# categorical_pipeline = make_pipeline(*preprocessors['categorical'])
# column_transformers.append(
# ('categorical_pipeline', categorical_pipeline, X['dataset_properties']['categorical_columns'])
# )

# in case the preprocessing steps are disabled
# i.e, NoEncoder for categorical, we want to
# let the data in categorical columns pass through
Expand Down

0 comments on commit 1be80d5

Please sign in to comment.