We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
FilterFeaturesTransform
Add FilterFeaturesTransform to filter features during transformation.
In ensembles we want to include/exclude different features in different models. There is no way to do this on current version of the library.
Prototype:
class _OneSegmentFilterFeaturesTransform(Transform): def __init__(self, include: Optional[Sequence[str]] = None, exclude: Optional[Sequence[str]] = None): self.include = include self.exclude = exclude def fit(self, *args) -> "_OneSegmentFilterFeaturesTransform": return self def transform(self, df: pd.DataFrame) -> pd.DataFrame: result = df.copy() if self.include is not None: result = result[self.include] if self.exclude is not None: result = result.drop(columns=self.exclude) return result class FilterFeaturesTransform(PerSegmentWrapper): def __init__(self, include: Optional[Sequence[str]] = None, exclude: Optional[Sequence[str]] = None): self.include = include self.exclude = exclude super().__init__( transform=_OneSegmentFilterFeaturesTransform( include=self.include, exclude=self.exclude, ) )
include
exclude
No response
The text was updated successfully, but these errors were encountered:
It is better to make it without PerSegmentWrapper.
PerSegmentWrapper
Sorry, something went wrong.
Add exception on non-existent columns and test for it.
FiltefFeaturesTransform
Mr-Geekman
Successfully merging a pull request may close this issue.
馃殌 Feature Request
Add
FilterFeaturesTransform
to filter features during transformation.Motivation
In ensembles we want to include/exclude different features in different models. There is no way to do this on current version of the library.
Proposal
Prototype:
Test cases
include
orexclude
.include
(test different number of features).exclude
(test different number of features).Alternatives
No response
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: