dimod.binary.BinaryQuadraticModel.normalize¶
- BinaryQuadraticModel.normalize(bias_range: Union[float, Tuple[float, float]] = 1, quadratic_range: Optional[Union[float, Tuple[float, float]]] = None, ignored_variables: Optional[Iterable[Hashable]] = None, ignored_interactions: Optional[Iterable[Tuple[Hashable, Hashable]]] = None, ignore_offset: bool = False)[source]¶
Normalize the biases of a binary quadratic model.
Normalizes the biases to fall in the provided range(s), and adjusts the offset appropriately.
- Parameters
bias_range – Value/range that the biases of the BQM are scaled to fit within. If
quadratic_range
is provided, this range is used to fit the linear biases.quadratic_range – Value/range that quadratic biases of the BQM are scaled to fit within.
ignored_variables – Biases associated with these variables are not scaled.
ignored_interactions – Biases associated with these interactions, formatted as an iterable of 2-tuples, are not scaled.
ignore_offset – If True, the offset is not scaled.