dimod.AdjDictBQM.normalize¶
-
AdjDictBQM.
normalize
(bias_range=1, quadratic_range=None, ignored_variables=None, ignored_interactions=None, ignore_offset=False)¶ Normalizes the biases of the binary quadratic model to fall in the provided range(s), and adjusts the offset appropriately.
If
quadratic_range
is provided,bias_range
is used for the linear biases andquadratic_range
for the quadratic biases.- Parameters
bias_range (number/pair) – Value/range that the biases of the BQM is scaled to fit within. If
quadratic_range
is provided, this range is used to fit the linear biases.quadratic_range (number/pair) – The BQM is scaled so that the quadratic biases fit within this range.
ignored_variables (iterable, optional) – Biases associated with these variables are not scaled.
ignored_interactions (iterable[tuple], optional) – Biases associated with these interactions, formatted as an iterable of 2-tuples, are not scaled.
ignore_offset (bool, default=False) – If True, the offset is not scaled.