alteryx / alteryx/featuretools
Update FeatureBase getters and setters
- 主要语言
- Python
- 星标
- 7.7k
- 派生
- 915
- PR 合并指标
- 30 天内没有已合并 PR
描述
In the `FeatureBase` object, there are separate methods for getting and setting feature names and feature column names that take the form `get_feature_names()` and `set_feature_names()`.
These methods should be updated to use a more pythonic approach to getters and setters:
```python
class MyClass(object):
@property
def my_attr(self):
return self._my_attr
@my_attr.setter
def my_attr(self, value):
self._my_attr = value
```
This this would result in the `get_name()` method being replaced with a `.name` property and `get_feature_names()` being replaced by a `.feature_names` property.
As these changes would constitute a breaking change, we should first implement the new getter/setter approach while leaving the existing `.get_*()` methods in place, adding a `DeprecationWarning` to the existing methods, alerting users they should switch to using the new properties.
As part of this update we should also consider renaming `feature_names` to `column_names` as that property actually represents the names of the columns that are added to the feature matrix and would provide more differentiation between the name of the `Feature` object and the name of the output columns that are generated from the feature.
贡献指南
评估
这个 Issue 还没有评估数据。