Skip to content

BUG: CategoricalGibbsMetropolis doesn't respect the tune parameter #7997

@Armavica

Description

@Armavica

Describe the issue:

I think that this PR changed the behaviour of the CategoricalGibbsMetropolis sampler which now treats all tune and draws as draws. By comparison, the behaviour of BinaryGibbsMetropolis was unchanged, so I am guessing that this change was unintended.

If intended I find this behaviour confusing and we should probably emit a warning message to clarify?

Reproduceable code example:

import pymc as pm
with pm.Model():
    pm.Categorical("cat", [0.02, 0.08, 0.9])
    idata = pm.sample(draws=20, tune=20)
# Sampling 4 chains for 0 tune and 40 draw iterations (0 + 160 draws total)
# Returns an idata object with 40 draws

Error message:

PyMC version information:

PyMC Version: 5.24 to current

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions