【发布时间】:2019-11-13 22:16:45
【问题描述】:
我正在尝试使用 Featuretools 包创建自定义转换,我可以在其中输入参数并更改函数的行为
例如,对于以下自定义日志转换类,我希望添加一个基本参数,以便可以对具有不同基数的特征进行日志转换:
class Log(TransformPrimitive):
"""Computes the logarithm for a numeric column."""
name = 'log'
input_types = [Numeric]
return_type = Numeric
def get_function(self):
return np.log
我将如何实现这样一个原语,以及如何使用 featuretools.dfs() 函数来实现它?
【问题讨论】:
标签: featuretools