#2842·darts

Add One-Hot Encoder to Time Axis Encoders

Author: konsramCreated Jul 7, 2025Updated Aug 14, 2026
Labelsfeature requestpr_welcome

Is your feature request related to a current problem? Some models may perform better with some datetime attributes being one hot encoded. Currently, we have to use the datetime_attribute_timeseries() function to generate these encodings. Using this function for only one-hot encoded attributes and the add_encoder parameter for others requires more custom code from users.

Describe proposed solution Adding a OneHotTemporalEncoder class which generates one hot encodings for date time attributes. The encoder should be used by SequentialEncoder and by the add_encoder parameter of models.