tensorflow / tensorflow/transform
scale_to_z_score_per_key should give caller control over OOV behavior
@iindyk is already working on this.
Since Nov 8, 2021.
- Dominant language
- Python
- Stars
- 989
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Related to #220
Currently, if tft.scale_to_z_score_per_key is used and at inference time key is OOV, the value is returned unscaled. Per the docs:
If the analysis dataset is empty, contains a single distinct value or the computed key vocabulary doesn't have an entry for key, then the input is returned without scaling.
But this may not be the desired behavior for OOV entries. In some use cases, I may want OOV keys to be mapped to 0, or to some large negative number. It seems fairly application-dependent. It would be good to give the caller control over this behavior.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.