ConstraintResidual#

class pymc_marketing.mmm.budget_optimizer.ConstraintResidual[source]#

One constraint’s value at a plan, with the sense it must satisfy.

constraint_type rather than type, matching Constraint’s own field name. The shorter name would add a second <class>.type target to this module, and the Python domain resolves a bare type cross-reference – which every type[...] annotation in the package emits – by fuzzy-matching any object whose name ends in .type. Two candidates turn that into a build-breaking ambiguity warning.

This name avoids the collision; it does not fix its cause. Those annotations still resolve to ConstraintIterationInfo’s type field instead of the builtin, and the next attribute named type anywhere in the package breaks the docs build the same way. Tracked separately.

Methods

ConstraintResidual.__init__(*args, **kwargs)

ConstraintResidual.clear()

ConstraintResidual.copy()

ConstraintResidual.fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

ConstraintResidual.get(key[, default])

Return the value for key if key is in the dictionary, else default.

ConstraintResidual.items()

ConstraintResidual.keys()

ConstraintResidual.pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

ConstraintResidual.popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

ConstraintResidual.setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

ConstraintResidual.update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

ConstraintResidual.values()

Attributes