shape of m.predictive_samples
- Linguagem predominante
- Python
- Estrelas
- 20.4k
- Forks
- 4.6k
- Merge médio
- 19h 52min
- PRs com merge (30d)
- 1
Descrição
The doc string for `predictive_samples` states: `The shape of each output will be (nforecast x nsamples), where nforecast is the number of points being forecasted (the number of rows in the input dataframe) and nsamples is the number of posterior samples drawn. This is the argument uncertainty_samples in the Prophet constructor, which defaults to 1000.`
https://github.com/facebook/prophet/blob/e41ed25646f44f713c110c30c07c678e4a07728e/python/fbprophet/forecaster.py#L1402
This is correct if `mcmc_samples=0`. However, if `mcmc_samples` is anything else, then the `nsamples` element of `predictive_samples` is not equal to `uncertainty_samples`. Here are some examples:
These ones match the doc string, that `nsamples` will equal `uncertainty_samples`:
`Prophet(uncertainty_samples=10, mcmc_samples=0)` --> `nsamples` = 10
`Prophet(uncertainty_samples=100, mcmc_samples=0)` --> `nsamples` = 100
But these ones don't match:
`Prophet(uncertainty_samples=10, mcmc_samples=2)` --> `nsamples` = 12
`Prophet(uncertainty_samples=10, mcmc_samples=3)` --> `nsamples` = 16
`Prophet(uncertainty_samples=10, mcmc_samples=4)` --> `nsamples` = 16
`Prophet(uncertainty_samples=10, mcmc_samples=20)` --> `nsamples` = 40
I don't see the pattern. How is `nsamples` calculated?
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.