class monad.targets.ModalityAttribute
monad.targets.ModalityAttributeContains main entity attribute data source defined in the pretrain phase.
Properties
ModalityAttribute.attribute
ModalityAttribute.attributeValue of the attribute.
def target_fn(history: Events, future: Events, attributes: Attributes, ctx: Dict) -> np.ndarray:
...
# here we get value of the age attribute from the datasource customers
city = attributes["customers"]["age"].attribute
...| Returns |
|---|
str
ModalityAttribute.dataset_name
ModalityAttribute.dataset_nameThe name of the data source from which the attribution is derived.
| Returns |
|---|
str
ModalityAttribute.column_name
ModalityAttribute.column_nameThe name of the column from which the attribution is derived.
| Returns |
|---|
str
