Added functionality to have multiple target for regression task
Description
Added a functionality to use an alternate target based on condition set.
For example, in jet pT regression task, if we would like to replace the original truth pT target pt_a to pt_b when the jets have a label that is not equal to 4. This can be done by having the following config.
data:
multi_target:
- input_name: jets
sel_label: label
opp: '!='
value: 4
old: pT_a
new: pT_b
We can also use this functionality to build custom targets based on the condition.
For example, in GN3 pT regression, if we would like to add a pT regression task specifically for \tau jets. We can set up the task config in the following way
- class_path: salt.models.RegressionTask
init_args:
name: regression_with_custom_labels
input_name: jets
targets: pt_label_handle
Then with the following multi_target config block
data:
multi_target:
- input_name: jets
sel_label: HadronGhostTruthLabelID
opp: '=='
value: 15
old: pt_label_handle
new: pt_visFromTruthTaus
The label pt_label_handle would take the value of pt_visFromTruthTaus for \tau jets and have the remaining target set to be nans.
Todo:
-
Write a test -
Documentation
Review checklist:
-
CI Passing -
Comments addressed -
Source branch is up to date with target
Edited by Wei Sheng Lai