0
$\begingroup$

I have created a Poisson regression model in Python for predicting the number of orders a company will receive a day based on a dataset of order counts and a number (~5) factors that contribute to those order counts. After some fine tuning of the model, I am happy that it is fitting the data well.

I know that the steps I want to take from here are that of being able to forecast the counts in the future, and after some research I am unsure how to convert what I have, into something that can do this. Ideally I would like to produce a model that can forecast for a nominal amount of days into the future, basing the predictions from the linear data of days of the week and the expected values of the other factors, such as website clicks, current market size/growth etc.

$\endgroup$
0
$\begingroup$

The standard Poisson regression models observations as Poisson distributed with a parameter $\lambda=e^{x\beta}$ for a predictor row vector $x$. Python has presumably given you parameter estimates $\hat{\beta}$.

So you can forecast a future realization's Poisson parameter $\hat{\lambda}=e^{x\hat{\beta}}$, where $x$ is of course the corresponding vector of predictors, as translated into a design matrix row (dummy coding etc.).

Now, $\hat{\lambda}$ is also the expected value of your future realization. If you want a median or other quantile forecast (e.g., for setting safety amounts), you can just extract the quantiles from the $\text{Pois}(\hat{\lambda})$ distribution.

(Note that this approach completely disregards the sampling variability in $\hat{\beta}$, but it is almost always done this way, and usually this makes no major difference.)

$\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.