Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data used in plotCoef #36

Open
kreamas opened this issue Nov 15, 2018 · 1 comment
Open

Data used in plotCoef #36

kreamas opened this issue Nov 15, 2018 · 1 comment

Comments

@kreamas
Copy link

kreamas commented Nov 15, 2018

Hi, I'm trying to retrieve the raw data used in plotCoef.

I'm in the idea that the red line is taken via

.getLatentState(filterType='backwardSmoother', name='x')

but my issue is that I haven't found what are the values taken to plot the probability bands for such latent state

I thought that using

.getLatentCov(filterType='backwardSmoother', name='x')

would give me such numbers (by adding and substracting them from the Latent State) but such numbers are not the same as those that were plotted.

Am I doing and / or interpreting something wrong?

Thanks in advance

@wwrechard
Copy link
Owner

Hi Kreamas

The latent state plot function is done here:

def plotLatentState(time, coordinates, result, options, name):

The marginal variance is obtained from the diagonal entry of the latent covariance matrix:

var = [abs(item[dimension, dimension])
, which is the same as you described.

It then calls to a specific function for getting the confidence interval:

upper, lower = getInterval(data, var, p=options.confidence)
using the mean and variance from the previous steps. For p = 95%, the result is around [mean - 2 * sqrt(var), mean + 2 * sqrt(var)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants