pyanno4rt.optimization.components
Components module.
The module aims to provide methods and classes to handle dose-related and outcome model-based component functions for the optimization problem.
Overview
Conventional component template class. |
|
Machine learning component template class. |
|
Radiobiology component template class. |
|
Decision tree NTCP component class. |
|
Decision tree TCP component class. |
|
Dose uniformity component class. |
|
Equivalent uniform dose (EUD) component class. |
|
K-nearest neighbors NTCP component class. |
|
K-nearest neighbors TCP component class. |
|
Logistic regression NTCP component class. |
|
Logistic regression TCP component class. |
|
Linear-quadratic Poisson TCP component class. |
|
Lyman-Kutcher-Burman (LKB) NTCP component class. |
|
Maximum dose-volume histogram (Maximum DVH) component class. |
|
Mean dose component class. |
|
Minimum dose-volume histogram (Minimum DVH) component class. |
|
Naive Bayes NTCP component class. |
|
Naive Bayes TCP component class. |
|
Neural network NTCP component class. |
|
Neural network TCP component class. |
|
Random forest NTCP component class. |
|
Random forest TCP component class. |
|
Squared deviation component class. |
|
Squared overdosing component class. |
|
Squared underdosing component class. |
|
Support vector machine NTCP component class. |
|
Support vector machine TCP component class. |
- |
Classes
- class pyanno4rt.optimization.components.ConventionalComponentClass(name, parameter_name, parameter_category, parameter_value, embedding, weight, rank, bounds, link, identifier, display)[source]
Conventional component template class.
- Parameters:
name (str) – Name of the component class.
parameter_name (tuple) – Name of the component parameters.
parameter_category (tuple) – Category of the component parameters.
parameter_value (tuple) – Value of the component parameters.
embedding ({'active', 'passive'}) – 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) – Weight of the component function.
rank (int) – Rank of the component in the lexicographic order.
bounds (None or list) – Constraint bounds for the component.
link (None or list) – Other segments used for joint evaluation.
identifier (None or str) – Additional string for naming the component.
display (bool) – Indicator for the display of the component.
- name
See ‘Parameters’.
- Type:
str
- parameter_name
See ‘Parameters’.
- Type:
tuple
- parameter_category
See ‘Parameters’.
- Type:
tuple
- parameter_value
See ‘Parameters’.
- Type:
list
- embedding
See ‘Parameters’.
- Type:
{‘active’, ‘passive’}
- weight
See ‘Parameters’.
- Type:
float
- rank
See ‘Parameters’.
- Type:
int
- bounds
See ‘Parameters’.
- Type:
list
- link
See ‘Parameters’.
- Type:
list
- identifier
See ‘Parameters’.
- Type:
None or str
- display
See ‘Parameters’.
- Type:
bool
- adjusted_parameters
Indicator for the adjustment of the parameters due to fractionation.
- Type:
bool
- RETURNS_OUTCOME
Indicator for the outcome focus of the component.
- Type:
bool
- DEPENDS_ON_MODEL
Indicator for the model dependency of the component.
- Type:
bool
Overview
Methods Get the value of the parameters.
set_parameter_value(*args)Set the value of the parameters.
Get the value of the weight.
set_weight_value(*args)Set the value of the weight.
compute_value(*args)abc Compute the component value.
compute_gradient(*args)abc Compute the component gradient.
Members
- get_parameter_value()[source]
Get the value of the parameters.
- Returns:
Value of the parameters.
- Return type:
list
- set_parameter_value(*args)[source]
Set the value of the parameters.
- Parameters:
*args (tuple) – Keyworded parameters. args[0] should give the value to be set.
- get_weight_value()[source]
Get the value of the weight.
- Returns:
Value of the weight.
- Return type:
float
- class pyanno4rt.optimization.components.MachineLearningComponentClass(name, parameter_name, parameter_category, model_parameters, embedding, weight, rank, bounds, link, identifier, display)[source]
Machine learning component template class.
- Parameters:
name (str) – Name of the component class.
parameter_name (tuple) – Name of the component parameters.
parameter_category (tuple) – Category of the component parameters.
model_parameters (dict) –
Dictionary with the data handling & learning model parameters:
- model_labelstr
Label for the machine learning model.
- model_folder_pathNone or str, default=None
Path to a folder for loading an external machine learning model.
- data_pathstr
Path to the data set used for fitting the machine learning model.
- feature_filterdict, default={‘features’: [], ‘filter_mode’: ‘remove’}
Dictionary with a list of feature names and a value from {‘retain’, ‘remove’} as an indicator for retaining/removing the features prior to model fitting.
- label_namestr
Name of the label variable.
- label_boundslist, default=[1, 1]
Bounds for the label values to binarize into positive (value lies inside the bounds) and negative class (value lies outside the bounds).
- time_variable_nameNone or str, default=None
Name of the time-after-radiotherapy variable (unit should be days).
- label_viewpoint{‘early’, ‘late’, ‘long-term’, ‘longitudinal’, ‘profile’}, default=’longitudinal’
Time of observation for the presence of tumor control and/or normal tissue complication events. The options can be described as follows:
’early’ : event between 0 and 6 months after treatment
’late’ : event between 6 and 15 months after treatment
’long-term’ : event between 15 and 24 months after treatment
’longitudinal’ : no period, time after treatment as covariate
’profile’ : TCP/NTCP profiling over time, multi-label scenario with one label per month (up to 24 labels in total).
- fuzzy_matchingbool, default=True
Indicator for the use of fuzzy string matching to generate the feature map (if False, exact string matching is applied).
- preprocessing_stepslist, default=[‘Identity’]
Sequence of labels associated with preprocessing algorithms to preprocess the input features.
The following preprocessing steps are currently available:
’Identity’
Identity’StandardScaler’
StandardScaler’Whitening’
Whitening
- architecture{‘input-convex’, ‘standard’}, default=’input-convex’
Type of architecture for the neural network model.
- max_hidden_layersint, default=2
Maximum number of hidden layers for the neural network model.
- tune_spacedict, default={}
Search space for the Bayesian hyperparameter optimization.
- tune_evaluationsint, default=50
Number of evaluation steps (trials) for the Bayesian hyperparameter optimization.
- tune_score{‘AUC’, ‘Brier score’, ‘Logloss’}, default=’Logloss’
Scoring function for the evaluation of the hyperparameter set candidates.
- tune_splitsint, default=5
Number of splits for the stratified cross-validation within each hyperparameter optimization step.
- inspect_modelbool, default=False
Indicator for the inspection of the machine learning model.
- evaluate_modelbool, default=False
Indicator for the evaluation of the machine learning model.
- oof_splitsint, default=5
Number of splits for the stratified cross-validation within the out-of-folds evaluation step.
- write_featuresbool, default=True
Indicator for writing the iteratively calculated feature vectors into a feature history.
- display_optionsdict, default={‘graphs’: [‘AUC-ROC’, ‘AUC-PR’, ‘F1’], ‘kpis’: [‘Logloss’, ‘Brier score’, ‘Subset accuracy’, ‘Cohen Kappa’, ‘Hamming loss’, ‘Jaccard score’, ‘Precision’, ‘Recall’, ‘F1 score’, ‘MCC’, ‘AUC’]}
Dictionary with the graph and KPI display options.
embedding ({'active', 'passive'}) – 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) – Weight of the component function.
rank (int, default=1) – Rank of the component in the lexicographic order.
bounds (None or list) – Constraint bounds for the component.
link (None or list) – Other segments used for joint evaluation.
identifier (None or str) – Additional string for naming the component.
display (bool) – Indicator for the display of the component.
- name
See ‘Parameters’.
- Type:
str
- parameter_name
See ‘Parameters’.
- Type:
tuple
- parameter_category
See ‘Parameters’.
- Type:
tuple
- parameter_value
Value of the component parameters.
- Type:
list
- embedding
See ‘Parameters’.
- Type:
{‘active’, ‘passive’}
- weight
See ‘Parameters’.
- Type:
float
- rank
See ‘Parameters’.
- Type:
int
- bounds
See ‘Parameters’.
- Type:
list
- link
See ‘Parameters’.
- Type:
list
- identifier
See ‘Parameters’.
- Type:
None or str
- display
See ‘Parameters’.
- Type:
bool
- model_parameters
See ‘Parameters’.
- Type:
dict
- data_model_handler
Initial variable for the object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
None
- model
Initial variable for the object used to preprocess, tune, train, inspect and evaluate the machine learning model.
- Type:
None
- adjusted_parameters
Indicator for the adjustment of the parameters due to fractionation.
- Type:
bool
- RETURNS_OUTCOME
Indicator for the outcome focus of the component.
- Type:
bool
- DEPENDS_ON_MODEL
Indicator for the model dependency of the component.
- Type:
bool
Overview
Methods Get the value of the parameters.
set_parameter_value(*args)Set the value of the parameters.
Get the value of the weight.
set_weight_value(*args)Set the value of the weight.
abc Add the machine learning model to the component.
compute_value(*args)abc Compute the component value.
compute_gradient(*args)abc Compute the component gradient.
Members
- get_parameter_value()[source]
Get the value of the parameters.
- Returns:
Value of the parameters.
- Return type:
list
- set_parameter_value(*args)[source]
Set the value of the parameters.
- Parameters:
*args (tuple) – Keyworded parameters. args[0] should give the value to be set.
- get_weight_value()[source]
Get the value of the weight.
- Returns:
Value of the weight.
- Return type:
float
- class pyanno4rt.optimization.components.RadiobiologyComponentClass(name, parameter_name, parameter_category, parameter_value, embedding, weight, rank, bounds, link, identifier, display)[source]
Radiobiology component template class.
- Parameters:
name (str) – Name of the component class.
parameter_name (tuple) – Name of the component parameters.
parameter_category (tuple) – Category of the component parameters.
parameter_value (tuple) – Value of the component parameters.
embedding ({'active', 'passive'}) – 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) – Weight of the component function.
rank (int, default=1) – Rank of the component in the lexicographic order.
bounds (None or list) – Constraint bounds for the component.
link (None or list) – Other segments used for joint evaluation.
identifier (None or str) – Additional string for naming the component.
display (bool) – Indicator for the display of the component.
- name
See ‘Parameters’.
- Type:
str
- parameter_name
See ‘Parameters’.
- Type:
tuple
- parameter_category
See ‘Parameters’.
- Type:
tuple
- parameter_value
See ‘Parameters’.
- Type:
list
- embedding
See ‘Parameters’.
- Type:
{‘active’, ‘passive’}
- weight
See ‘Parameters’.
- Type:
float
- rank
See ‘Parameters’.
- Type:
int
- bounds
See ‘Parameters’.
- Type:
list
- link
See ‘Parameters’.
- Type:
list
- identifier
See ‘Parameters’.
- Type:
None or str
- display
See ‘Parameters’.
- Type:
bool
- adjusted_parameters
Indicator for the adjustment of the parameters due to fractionation.
- Type:
bool
- RETURNS_OUTCOME
Indicator for the outcome focus of the component.
- Type:
bool
- DEPENDS_ON_MODEL
Indicator for the model dependency of the component.
- Type:
bool
Overview
Methods Get the value of the parameters.
set_parameter_value(*args)Set the value of the parameters.
Get the value of the weight.
set_weight_value(*args)Set the value of the weight.
compute_value(*args)abc Compute the component value.
compute_gradient(*args)abc Compute the component gradient.
Members
- get_parameter_value()[source]
Get the value of the parameters.
- Returns:
Value of the parameters.
- Return type:
list
- set_parameter_value(*args)[source]
Set the value of the parameters.
- Parameters:
*args (tuple) – Keyworded parameters. args[0] should give the value to be set.
- get_weight_value()[source]
Get the value of the weight.
- Returns:
Value of the weight.
- Return type:
float
- class pyanno4rt.optimization.components.DecisionTreeNTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassDecision tree NTCP component class.
This class provides methods to compute the value and the gradient of the decision tree NTCP component, as well as to add the decision tree model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the decision tree model.
- Type:
object of class
DecisionTreeModel
- parameter_value
Value of the decision tree model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the decision tree model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.DecisionTreeTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassDecision tree TCP component class.
This class provides methods to compute the value and the gradient of the decision tree TCP component, as well as to add the decision tree model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the decision tree model.
- Type:
object of class
DecisionTreeModel
- parameter_value
Value of the decision tree model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the decision tree model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.DoseUniformity(embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassDose uniformity component class.
This class provides methods to compute the value and the gradient of the dose uniformity component.
- Parameters:
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
- class pyanno4rt.optimization.components.EquivalentUniformDose(target_eud=None, volume_parameter=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassEquivalent uniform dose (EUD) component class.
This class provides methods to compute the value and the gradient of the EUD component.
- Parameters:
target_eud (int or float) – Target value for the EUD.
volume_parameter (int or float) – Dose-volume effect parameter.
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
- class pyanno4rt.optimization.components.KNeighborsNTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassK-nearest neighbors NTCP component class.
This class provides methods to compute the value and the gradient of the k-nearest neighbors NTCP component, as well as to add the k-nearest neighbors model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the k-nearest neighbors model.
- Type:
object of class
KNeighborsModel
- parameter_value
Value of the k-nearest neighbors model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the k-nearest neighbors model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.KNeighborsTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassK-nearest neighbors TCP component class.
This class provides methods to compute the value and the gradient of the k-nearest neighbors TCP component, as well as to add the k-nearest neighbors model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the k-nearest neighbors model.
- Type:
object of class
KNeighborsModel
- parameter_value
Value of the k-nearest neighbors model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the k-nearest neighbors model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.LogisticRegressionNTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassLogistic regression NTCP component class.
This class provides methods to compute the value and the gradient of the logistic regression NTCP component, as well as to add the logistic regression model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the logistic regression model.
- Type:
object of class
LogisticRegressionModel
- parameter_value
Value of the logistic regression model coefficients.
- Type:
list
- intercept_value
Value of the logistic regression model intercept.
- Type:
None or list
- bounds
See ‘Parameters’. Transformed by the inverse sigmoid function.
- Type:
list
Overview
Methods Get the value of the intercept.
set_intercept_value(*args)Set the value of the intercept.
Add the logistic regression model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- get_intercept_value()[source]
Get the value of the intercept.
- Returns:
Value of the intercept.
- Return type:
list
- set_intercept_value(*args)[source]
Set the value of the intercept.
- Parameters:
*args (tuple) – Keyworded parameters. args[0] should give the value to be set.
- class pyanno4rt.optimization.components.LogisticRegressionTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassLogistic regression TCP component class.
This class provides methods to compute the value and the gradient of the logistic regression TCP component, as well as to add the logistic regression model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the logistic regression model.
- Type:
object of class
LogisticRegressionModel
- parameter_value
Value of the logistic regression model coefficients.
- Type:
list
- intercept_value
Value of the logistic regression model intercept.
- Type:
None or list
- bounds
See ‘Parameters’. Transformed by the inverse sigmoid function.
- Type:
list
Overview
Methods Get the value of the intercept.
set_intercept_value(*args)Set the value of the intercept.
Add the logistic regression model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- get_intercept_value()[source]
Get the value of the intercept.
- Returns:
Value of the intercept.
- Return type:
list
- set_intercept_value(*args)[source]
Set the value of the intercept.
- Parameters:
*args (tuple) – Keyworded parameters. args[0] should give the value to be set.
- class pyanno4rt.optimization.components.LQPoissonTCP(alpha=None, beta=None, volume_parameter=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.RadiobiologyComponentClassLinear-quadratic Poisson TCP component class.
This class provides methods to compute the value and the gradient of the linear-quadratic Poisson TCP component.
- Parameters:
alpha (int or float) – Alpha coefficient for the tumor volume (in the LQ model).
beta (int or float) – Beta coefficient for the tumor volume (in the LQ model).
volume_parameter (int or float) – Dose-volume effect parameter.
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
- class pyanno4rt.optimization.components.LymanKutcherBurmanNTCP(tolerance_dose_50=None, slope_parameter=None, volume_parameter=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.RadiobiologyComponentClassLyman-Kutcher-Burman (LKB) NTCP component class.
This class provides methods to compute the value and the gradient of the LKB NTCP component.
- Parameters:
tolerance_dose_50 (int or float) – Tolerance value for the dose at 50% tumor control.
slope_parameter (int or float) – Slope parameter.
volume_parameter (int or float) – Dose-volume effect parameter.
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
- class pyanno4rt.optimization.components.MaximumDVH(target_dose=None, quantile_volume=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassMaximum dose-volume histogram (Maximum DVH) component class.
This class provides methods to compute the value and the gradient of the maximum DVH component.
- Parameters:
target_dose (int or float) – Target value for the dose.
quantile_volume (int or float) – Volume level at which to evaluate the dose quantile.
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
- class pyanno4rt.optimization.components.MeanDose(target_dose=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassMean dose component class.
This class provides methods to compute the value and the gradient of the mean dose component.
- Parameters:
target_dose (int or float) – Target 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
- class pyanno4rt.optimization.components.MinimumDVH(target_dose=None, quantile_volume=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassMinimum dose-volume histogram (Minimum DVH) component class.
This class provides methods to compute the value and the gradient of the minimum DVH component.
- Parameters:
target_dose (int or float) – Target value for the dose.
quantile_volume (int or float) – Volume level at which to evaluate the dose quantile.
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
- class pyanno4rt.optimization.components.NaiveBayesNTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassNaive Bayes NTCP component class.
This class provides methods to compute the value and the gradient of the naive Bayes NTCP component, as well as to add the naive Bayes model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the naive Bayes model.
- Type:
object of class
NaiveBayesModel
- parameter_value
Value of the naive Bayes model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the naive Bayes model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.NaiveBayesTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassNaive Bayes TCP component class.
This class provides methods to compute the value and the gradient of the naive Bayes TCP component, as well as to add the naive Bayes model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the naive Bayes model.
- Type:
object of class
NaiveBayesModel
- parameter_value
Value of the naive Bayes model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the naive Bayes model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.NeuralNetworkNTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassNeural network NTCP component class.
This class provides methods to compute the value and the gradient of the neural network NTCP component, as well as to add the neural network model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the neural network model.
- Type:
object of class
NeuralNetworkModel
- parameter_value
Value of the neural network model parameters.
- Type:
list
- bounds
See ‘Parameters’. Transformed by the inverse sigmoid function.
- Type:
list
Overview
Methods Add the neural network model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.NeuralNetworkTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassNeural network TCP component class.
This class provides methods to compute the value and the gradient of the neural network TCP component, as well as to add the neural network model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the neural network model.
- Type:
object of class
NeuralNetworkModel
- parameter_value
Value of the neural network model parameters.
- Type:
list
- bounds
See ‘Parameters’. Transformed by the inverse sigmoid function.
- Type:
list
Overview
Methods Add the neural network model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.RandomForestNTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassRandom forest NTCP component class.
This class provides methods to compute the value and the gradient of the random forest NTCP component, as well as to add the random forest model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the random forest model.
- Type:
object of class
RandomForestModel
- parameter_value
Value of the random forest model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the random forest model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.RandomForestTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassRandom forest TCP component class.
This class provides methods to compute the value and the gradient of the random forest TCP component, as well as to add the random forest model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the random forest model.
- Type:
object of class
RandomForestModel
- parameter_value
Value of the random forest model parameters.
- Type:
list
- bounds
See ‘Parameters’.
- Type:
list
Overview
Methods Add the random forest model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.SquaredDeviation(target_dose=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassSquared deviation component class.
This class provides methods to compute the value and the gradient of the squared deviation component.
- Parameters:
target_dose (int or float) – Target 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
- class pyanno4rt.optimization.components.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
- class pyanno4rt.optimization.components.SquaredUnderdosing(minimum_dose=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.ConventionalComponentClassSquared underdosing component class.
This class provides methods to compute the value and the gradient of the squared underdosing component.
- Parameters:
minimum_dose (int or float) – Minimum 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
- class pyanno4rt.optimization.components.SupportVectorMachineNTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassSupport vector machine NTCP component class.
This class provides methods to compute the value and the gradient of the support vector machine NTCP component, as well as to add the support vector machine model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the support vector machine model.
- Type:
object of class
SupportVectorMachineModel
- parameter_value
Value of the primal/dual support vector machine model coefficients.
- Type:
list
- decision_function
Decision function for the fitted kernel type.
- Type:
callable
- decision_gradient
Decision gradient for the fitted kernel type.
- Type:
callable
- bounds
See ‘Parameters’. Transformed by the inverse Platt scaling function.
- Type:
list
Overview
Methods Add the support vector machine model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
- class pyanno4rt.optimization.components.SupportVectorMachineTCP(model_parameters, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]
Bases:
pyanno4rt.optimization.components.MachineLearningComponentClassSupport vector machine TCP component class.
This class provides methods to compute the value and the gradient of the support vector machine TCP component, as well as to add the support vector machine model.
- Parameters:
model_parameters (dict) – Dictionary with the data handling & learning model parameters, see the class
MachineLearningComponentClass.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.
- data_model_handler
The object used to handle the dataset, the feature map generation and the feature (re-)calculation.
- Type:
object of class
DataModelHandler
- model
The object used to preprocess, tune, train, inspect and evaluate the support vector machine model.
- Type:
object of class
SupportVectorMachineModel
- parameter_value
Value of the primal/dual support vector machine model coefficients.
- Type:
list
- decision_function
Decision function for the fitted kernel type.
- Type:
callable
- decision_gradient
Decision gradient for the fitted kernel type.
- Type:
callable
- bounds
See ‘Parameters’. Transformed by the inverse Platt scaling function.
- Type:
list
Overview
Methods Add the support vector machine model to the component.
compute_value(*args)Compute the component value.
compute_gradient(*args)Compute the component gradient.
Members
Attributes
- pyanno4rt.optimization.components.component_map