Skip to content

Instantly share code, notes, and snippets.

@ntakouris
Created September 19, 2020 08:34
Show Gist options
  • Save ntakouris/1e7b03bc278dad51631edd45b7027135 to your computer and use it in GitHub Desktop.
Save ntakouris/1e7b03bc278dad51631edd45b7027135 to your computer and use it in GitHub Desktop.
def _preprocessing_fn(inputs: Dict[Text, Any], dense_float_feature_keys, input_feature_keys) -> Dict[Text, Any]:
outputs = {}
for key in [k for k in dense_float_feature_keys if k in input_feature_keys]:
outputs[transformed_name(key)
] = tft.scale_to_z_score(inputs[key])
return outputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment