UnixTimestampEncoder
Last updated
Last updated
Compatibility: datetime
data
The UnixTimestampEncoder
transforms data that represents dates and times into numerical values using the Unix time (aka Epoch time). The transformed value is the number of nanoseconds that have passed since Jan 1, 1970 00:00:00.000000 UTC.
missing_value_replacement
: Add this argument to replace missing values during the transform phase
(default) 'mean'
Replace all missing values with the average value.
'random'
Replace missing values with a random value. The value is chosen uniformly at random from the min/max range.
'mode'
Replace all missing values with the most frequently occurring value
<number>
Replace all missing values with the specified number (0
, -1
, 0.5
, etc.)
None
Deprecated. Do not replace missing values. The transformed data will continue to have missing values.
(deprecated) model_missing_values
: Use the missing_value_generation
parameter instead.
missing_value_generation
: Add this argument to determine how to recreate missing values during the reverse transform phase
(default) 'random'
Randomly assign missing values in roughly the same proportion as the original data.
'from_column'
Create a new column to store whether the value should be missing. Use it to recreate missing values. Note: Adding extra columns uses more memory and increases the RDT processing time.
None
Do not recreate missing values.
enforce_min_max_values
: Add this argument to allow the transformer to learn the min and max allowed values from the data.
(default) False
Do not learn any min or max values from the dataset. When reverse transforming the data, the values may be above or below what was originally present.
True
Learn the min and max values from the input data. When reverse transforming the data, any out-of-bounds values will be clipped to the min or max value.
datetime_format
: Add this argument to tell the transformer how to read your datetime column if it's in a specific format that isn't easy to identify.
(default) None
Automatically detect the format. The transformer is able to detect common format such as "02/15/22"
, "15/02/22 22:30"
, "02-15-2022 10:30PM"
etc.
<string>
Read the format according to instructions in the <string>
. For eg. to represent a datetime like "Feb 15, 2022 10:23:45 AM"
, you can use the format string: "%b %d, %Y %I:%M:%S %p"
.
For more info, see .