Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc]refactor documents #417

Merged
merged 3 commits into from
Jan 8, 2024
Merged

[doc]refactor documents #417

merged 3 commits into from
Jan 8, 2024

Conversation

chengmengli06
Copy link
Collaborator

refactor fg documents

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link

Code Style Test Passed

| need_prefix | 可选项,true表示会拼上feature_name作为前缀,false表示不拼,默认为true,通常在shared_embedding的场景会用false |

## 示例:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下面以item侧的特征is_main作为案例来说明在不同类型下的原始值和输出值:

- needDiscrete=true,结果为: brand_hit_50006842_30068_19
- needDiscrete=false,结果为: 19.0

如果只使用一层匹配,则需要将上面配置里的 category 的值改为 ALL。这种情况,用户也可以考虑使用lookup_feature。 假设各字段的值如下
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果只使用一层匹配,则需要将上面配置里的 category 的值改为 ALL,即"category": "ALL”。这种情况,用户也可以考虑使用lookup_feature来实现,用lookup_feature的时候user_brand_tags_hit 里面的值的格式更简单,即”16788816:40,10122:40,29889:20,30068:20”。 假设两个字段的值如下:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -17,13 +17,13 @@
"expression":"user:feat0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面序列长度改成50,正常item维度应该改成”user维度“?
例如我们需要对⽤户的点击序列进⾏ fg,序列⻓度为 50,每个序列提取 nid 和 price, seq_context 特征。正常 user 维度有⼀个 feat0 特征。配置如下:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

user_features {
key: "click__ts"
value {
string_feature: "23;113;401363;401369;401375;401405;486678;486803;486922;486969"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string_feature: "1694592001;1694592002;1694592003;1694592004;1694592005;1694592006;1694592006;1694592007;1694592007;1694592008”

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是相对时间戳

| 字段名 | 含义 |
| --------------- | -------------------------------- |
| feature_name | 必选项, 特征名 |
| expression | 必选项,expression描述该feature所依赖的字段来源 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| expression | 必选项,expression描述该feature所依赖的字段来源,来源必须是user、item、context中的一种 |

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@chengmengli06
Copy link
Collaborator Author

already

@chengmengli06 chengmengli06 reopened this Jan 5, 2024
Copy link

github-actions bot commented Jan 5, 2024

Code Style Test Passed

Copy link

github-actions bot commented Jan 5, 2024

Code Style Test Passed

Copy link

github-actions bot commented Jan 5, 2024

Code Style Test Passed

@chengmengli06 chengmengli06 merged commit 15e983c into master Jan 8, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants