Skip to content

pymc3.effective_n can return negative results #1770

Closed
@aseyboldt

Description

@aseyboldt

In traces with negative autocorrelation pymc3 sometimes returns negative estimates for the number of effective samples:

import pymc3

class DummyTrace:
    varnames = ['a']
    nchains = 2
    def get_values(self, *args, **kwargs):
        return [[0, 1, 0, 1], [0, 1, 0, 1]]
    
pymc3.effective_n(DummyTrace())

This returns {'a': -8.0}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions