Skip to content

Commit

Permalink
Added a comment on what independent_columns does during transformer f…
Browse files Browse the repository at this point in the history
…itting
  • Loading branch information
Michael Panchenko committed Feb 28, 2024
1 parent f65d432 commit afe6e18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sensai/data_transformation/dft.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,10 @@ def _tostring_additional_entries(self) -> Dict[str, Any]:
def _fit(self, df: pd.DataFrame):
matched_rules_by_column = {}
self._rules = []
# For rules matching multiple columns, if independent_columns is False, the columns
# will be concatenated and treated as a single column for fitting the transformer.
# Note that transformers follow sklearn interfaces, thus just passing an array
# to them will learn a per-column-transformation. This will be the case for independent_columns=True.
for rule in self._userRules:
matching_columns = rule.matching_columns(df.columns)
for c in matching_columns:
Expand Down

0 comments on commit afe6e18

Please sign in to comment.