dimod.higherorder.polynomial.BinaryPolynomial.normalize¶

BinaryPolynomial.normalize(bias_range=1, poly_range=None, ignored_terms=None)[source]

Normalizes the biases of the binary polynomial such that they fall in the provided range(s).

If poly_range is provided, then bias_range will be treated as the range for the linear biases and poly_range will be used for the range of the other biases.

Parameters: bias_range (number/pair) – Value/range by which to normalize the all the biases, or if poly_range is provided, just the linear biases. poly_range (number/pair, optional) – Value/range by which to normalize the higher order biases. ignored_terms (iterable, optional) – Biases associated with these terms are not scaled.