ConstraintResidual#
- class pymc_marketing.mmm.budget_optimizer.ConstraintResidual[source]#
One constraint’s value at a plan, with the sense it must satisfy.
constraint_typerather thantype, matchingConstraint’s own field name. The shorter name would add a second<class>.typetarget to this module, and the Python domain resolves a baretypecross-reference – which everytype[...]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’stypefield instead of the builtin, and the next attribute namedtypeanywhere in the package breaks the docs build the same way. Tracked separately.Methods
ConstraintResidual.__init__(*args, **kwargs)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.pop(key[, default])If the key is not found, return the default if given; otherwise, raise a KeyError.
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]
Attributes