pyanno4rt.optimization.components._squared_overdosing
Squared overdosing component.
Overview
Squared overdosing component class. |
|
Compute the component value. |
|
Compute the component gradient. |
Classes
- class pyanno4rt.optimization.components._squared_overdosing.SquaredOverdosing(maximum_dose=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassSquared overdosing component class.
This class provides methods to compute the value and the gradient of the squared overdosing component.
- Parameters:
maximum_dose (int or float) – Maximum value for the dose.
embedding ({'active', 'passive'}, default='active') – Mode of embedding for the component. In ‘passive’ mode, the component value is computed and tracked, but not considered in the optimization problem, unlike in ‘active’ mode.
weight (int or float, default=1.0) – Weight of the component function.
rank (int, default=1) – Rank of the component in the lexicographic order.
bounds (None or list, default=None) – Constraint bounds for the component.
link (None or list, default=None) – Other segments used for joint evaluation.
identifier (None or str, default=None) – Additional string for naming the component.
display (bool, default=True) – Indicator for the display of the component.
- parameter_value
Value of the component parameters.
- Type:
list
Overview
Methods compute_value(*args)Return the component value from the jitted ‘compute’ function.
compute_gradient(*args)Return the component gradient from the jitted ‘differentiate’ function.
Members
- compute_value(*args)[source]
Return the component value from the jitted ‘compute’ function.
- Parameters:
*args (tuple) – Keyworded parameters, where args[0] must be the dose vector(s) to evaluate.
- Returns:
Value of the component function.
- Return type:
float
- compute_gradient(*args)[source]
Return the component gradient from the jitted ‘differentiate’ function.
- Parameters:
*args (tuple) – Keyworded parameters, where args[0] must be the dose vector(s) to evaluate and args[1] the corresponding segment(s).
- Returns:
Value of the component gradient.
- Return type:
ndarray
Functions
- pyanno4rt.optimization.components._squared_overdosing.compute(dose, parameter_value)
Compute the component value.
- Parameters:
dose (tuple) – Values of the dose in the segment(s).
parameter_value (list) – Value of the component parameters.
- Returns:
Value of the component function.
- Return type:
float
- pyanno4rt.optimization.components._squared_overdosing.differentiate(dose, parameter_value, number_of_voxels, segment_indices)
Compute the component gradient.
- Parameters:
dose (tuple) – Values of the dose in the segment(s).
parameter_value (list) – Value of the component parameters.
number_of_voxels (int) – Total number of dose voxels.
segment_indices (tuple) – Indices of the segment(s).
- Returns:
Value of the component gradient.
- Return type:
ndarray