Featuretools提供了处理分类变量的集成功能
variable_types={"product_id": ft.variable_types.Categorical} https://docs.featuretools.com/loading_data/using_entitysets.html
但是,这些类型应该是strings
还是pandas.Category
类型,以便与Featuretools实现最佳兼容性?在
另外,是否需要像在中那样手动指定所有列 https://github.com/Featuretools/predict-appointment-noshow/blob/master/Tutorial.ipynb或者它们会自动从拟合pandas数据类型中推断出来吗
import featuretools.variable_types as vtypes
variable_types = {'gender': vtypes.Categorical,
'patient_id': vtypes.Categorical,
'age': vtypes.Ordinal,
'scholarship': vtypes.Boolean,
'hypertension': vtypes.Boolean,
'diabetes': vtypes.Boolean,
'alcoholism': vtypes.Boolean,
'handicap': vtypes.Boolean,
'no_show': vtypes.Boolean,
'sms_received': vtypes.Boolean}
将数据加载到Featuretools时,应该使用Pandas Category dtype。与使用字符串相比,这将大大节省内存使用量。在
加载数据时不需要手动指定每个变量类型。如果没有提供,Featuretools将尝试从Pandas数据类型推断它。在
相关问题 更多 >
编程相关推荐