dimod.higherorder.polynomial.BinaryPolynomial.normalize#

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

Normalize biases of the binary polynomial to fit the provided range(s).

If poly_range is provided, bias_range is used as the range for linear biases only while poly_range is used for other biases.

Parameters:
  • bias_range (number/pair) – Value/range by which to normalize all biases, or, if poly_range is provided, just the linear biases.

  • poly_range (number/pair, optional) – Value/range by which to normalize higher-order biases.

  • ignored_terms (iterable, optional) – Biases associated with these terms are not scaled.