文档
注册

FeatureSpec

待查询特征类。

参数名

参数说明

参数类型

必选/可选

默认值

取值范围

index_key

索引键。

int/string

可选

table_name的值

  • int:取值范围[0,255]
  • string:长度范围[1,255]

table_name

表名。

string

可选

表名长度范围:[1, 255]

access_threshold

特征准入阈值。

  • 等于“0”:开启准入功能。不累加新batch中key出现的次数,使用历史特征计数记录。
  • 大于“0”:开启准入功能。累加新batch中key出现的次数,更新特征计数记录。
  • 等于“-1”:关闭功能。

int

可选

none

[-1, 2147483647]

eviction_threshold

特征淘汰阈值。

  • 等于或大于“0”:开启淘汰功能。
  • 等于“-1”:关闭淘汰功能。

如果需要设置特征淘汰阈值,需要同时设置特征准入阈值。

int

可选

none

[-1, 2147483647]

is_timestamp

是否为时间戳。

bool

可选

none

  • True
  • False

batch_size

数据集batch的大小。

int

可选

none

[1, 2147483647]

faae_coefficient

特征准入系数。

int

可选

1

[1, 2147483647]

name

FeatureSpec名称。

string

必选

长度范围[1,255]

使用示例

from mx_rec.core.asc.feature_spec import FeatureSpec
feature_spec_list = FeatureSpec("user_ids", table_name="user_table",
                                access_threshold=1,
                                eviction_threshold=1,
                                faae_coefficient=1)
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词