Get all target values and constraint fulfillment for all parameters. Returns ------- res: list A list of dictionaries with the keys 'target', 'params', and 'constraint'. The value of 'target' is the target value, the value of 'params' is a
(self)
| 652 | return res |
| 653 | |
| 654 | def res(self) -> list[dict[str, Any]]: |
| 655 | """Get all target values and constraint fulfillment for all parameters. |
| 656 | |
| 657 | Returns |
| 658 | ------- |
| 659 | res: list |
| 660 | A list of dictionaries with the keys 'target', 'params', and |
| 661 | 'constraint'. The value of 'target' is the target value, the value |
| 662 | of 'params' is a dictionary with the parameter names as keys and the |
| 663 | parameter values as values, and the value of 'constraint' is the |
| 664 | constraint fulfillment. |
| 665 | |
| 666 | Notes |
| 667 | ----- |
| 668 | Does not report if points are within the bounds of the parameter space. |
| 669 | """ |
| 670 | if self._constraint is None: |
| 671 | params = [self.array_to_params(p) for p in self.params] |
| 672 | |
| 673 | return [{"target": target, "params": param} for target, param in zip(self.target, params)] |
| 674 | |
| 675 | params = [self.array_to_params(p) for p in self.params] |
| 676 | |
| 677 | return [ |
| 678 | {"target": target, "constraint": constraint_value, "params": param, "allowed": allowed} |
| 679 | for target, constraint_value, param, allowed in zip( |
| 680 | self.target, |
| 681 | self._constraint_values, |
| 682 | params, |
| 683 | self._constraint.allowed(self._constraint_values), |
| 684 | ) |
| 685 | ] |
| 686 | |
| 687 | def set_bounds(self, new_bounds: BoundsMapping) -> None: |
| 688 | """Change the lower and upper search bounds. |