3
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ You can still do the sin/cos trick, but use a bivariate model. $\endgroup$ Oct 9 '18 at 22:59
1
$\begingroup$

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.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.