labels¶
Class(es) for constructing training labels at runtime.
- class graphnet.training.labels.Label(key)[source]¶
Bases:
ABC
,Logger
Base Label class for producing labels from single Data instance.
Construct Label.
- Parameters:
key (
str
) – The name of the field in Data where the label will be stored. That is, graph[key] = label.
- property key: str¶
Return value of key.
- class graphnet.training.labels.Direction(key, azimuth_key, zenith_key)[source]¶
Bases:
Label
Class for producing particle direction/pointing label.
Construct Direction.
- Parameters:
key (
str
, default:'direction'
) – The name of the field in Data where the label will be stored. That is, graph[key] = label.azimuth_key (
str
, default:'azimuth'
) – The name of the pre-existing key in graph that will be used to access the azimiuth angle, used when calculating the direction.zenith_key (
str
, default:'zenith'
) – The name of the pre-existing key in graph that will be used to access the zenith angle, used when calculating the direction.