【问题标题】:VowpalWabbit - how to set third order interactions only for categorical features for tabular data with both continues and categorical featuresVowpalWabbit - 如何仅为具有连续和分类特征的表格数据的分类特征设置三阶交互
【发布时间】:2021-11-09 23:29:09
【问题描述】:

对于 VowpalWabbit - 如何仅为具有连续和分类特征的表格数据的分类特征设置三阶交互,例如如何更改:vw_squared = VWRegressor(loss_function='squared' , interaction = 'abc')

假设 VWRegressor 的输入数据是 pandas 数据框,其中分类特征是市场作为类别类型,例如

'''

df['jobcat']=df['job'].astype('category').cat.codes
df['educationcat']=df['education'].astype('category').cat.codes
df['defaultcat']=df['default'].astype('category').cat.codes

'''

【问题讨论】:

    标签: python feature-extraction feature-selection feature-engineering vowpalwabbit


    【解决方案1】:

    您可以将分类数据放在与非分类数据不同的命名空间下,然后仅为这些命名空间分配交互。目前还没有自动的方法来做到这一点,因此必须通过将要交互的功能分离到单独的命名空间来手动完成。

    【讨论】:

      猜你喜欢
      • 2020-09-21
      • 1970-01-01
      • 2015-06-19
      • 2019-06-13
      • 1970-01-01
      • 2021-06-19
      • 2020-07-08
      • 2011-04-07
      • 2023-02-10
      相关资源
      最近更新 更多