2
$\begingroup$

I went through the documentation of Facebook Prophet and was able to build a similar model for my time series dataset. The additional regressors I used were numeric. I achieved a reasonable MAPE score. However, I also want to analyse this time series on a zip code level, which adds a categorical variable to the mix. Would one-hot encoding do the trick? I'm doubtful about it's efficiency as I would need to individually add each category (zip code) as a separate additional regressor.

My dataset is in the following format: Zip code | Date | Numeric Attr 1 | Sales (predictor)

I am also open to switching to a different model, should there be a good one which does both time series and regression. Any pointers would be appreciated.

$\endgroup$
1
$\begingroup$

From my understanding Prophet is just a linear regression library that helps to analyze time series with some nice features (like holidays, Fourier transformation, etc.). So from the mathematical standpoint, the regressor must be an ordinal scaled value. The docstring also implicitly says something about it. See the keywords 'additive' and 'multiplicative'. Categorical data is neither of the two. A category is a nominal scale, which can only be counted and if it's ranked, it can be sorted.

Have a nice day.

$\endgroup$

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.