Skip to content

Commit

Permalink
improve docstring in column transformer function
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomarvid committed Apr 12, 2024
1 parent d0d1f43 commit 611e68e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pipeline_lib/core/steps/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ def _create_column_transformer(
low_cardinality_features: List[str],
numeric_features: List[str],
) -> ColumnTransformer:
"""Create a ColumnTransformer for encoding."""
"""Create a ColumnTransformer for encoding.
If `feature_encoders` is not provided, use the default encoders based on cardinality.
* For low cardinality features, use OrdinalEncoder.
* For high cardinality features, use TargetEncoder.
* For numeric features, pass them as is.
"""
transformers = []

if not self.feature_encoders:
Expand Down

0 comments on commit 611e68e

Please sign in to comment.