Predicting a cyclic target

3

2

I'm familiar with using trigonometric functions to transform cyclic variables for use as features in training a model (most commonly hour of the day or month of the year); I'm now trying to figure out the best way of doing this for using these types of variables as the target for my model. (Imagine a model predicting the month when a particular event is most likely to occur, for instance). Neither using a strictly-increasing representation (so that January, 2018 is close to December, 2017 but very far from January, 2017) nor treating the month as a categorical variable is ideal, but the trigonometric encoding done for features requires both sin and cos parts to have a unique representation of each month, so using one of the two isn't a workable approach either. Is there a better option that I'm missing?

Silenced Temporarily

Posted 2018-10-09T19:20:51.507

Reputation: 141

You can still do the sin/cos trick, but use a bivariate model. – shadowtalker – 2018-10-09T22:59:40.583

Answers

1

The relevant terminology is "multi-output" or "multi-target" regression/classification. A survey article from a few years ago has some good discussion. This functionality is implemented in many packages (for instance, in sklearn (where it extends the functionality of other regressors, rather than being an independent implementation) and in R.

Silenced Temporarily

Posted 2018-10-09T19:20:51.507

Reputation: 141

Keras‘ functional API also provides a good way to model multi-targets. See this post for a minimal example: https://datascience.stackexchange.com/a/64350/71442

– Peter – 2019-12-07T12:07:14.467