Reputation: 2133
I know about sklearn.preprocessing.Imputer
but does Tensorflow have built-in functions to do this as well?
Upvotes: 4
Views: 7853
Reputation: 755
In case your imputation cannot be the same for all entries as suggested before, you may want to use tensorflow-transform
.
For example, if you want to use the mean or the median as the value to impute for the missing values in the corresponding entries, you can not do so with a default one as such values are dynamic and depend on the whole dataset (or a subset depending on your needs/rules).
Check out one of the examples on how you would do that in the official repository.
Upvotes: 5
Reputation: 549
As far as I know, there isn't a handy function that does the same thing as sklearn.preprocessing.Imputer
.
There are a few ways of dealing with missing values using built-in functions:
record_defaults
field. tf.where
(example)Upvotes: 1