tensorflow / tensorflow/transform

scale_to_z_score_per_key should give caller control over OOV behavior

Open
#252 6 comments 0 reactions 2 assignees View on GitHub

@iindyk is already working on this.

Since Nov 8, 2021.

stat:contributions welcome type:feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.