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 9f784e7 commit bf44fa5
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 @@ -707,6 +707,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 bf44fa5

Please sign in to comment.