API Reference

ModalityAttribute

class monad.targets.ModalityAttribute

Contains main entity attribute data source defined in the pretrain phase.

Properties

ModalityAttribute.attribute

Value 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

The name of the data source from which the attribution is derived.

Returns

str

ModalityAttribute.column_name

The name of the column from which the attribution is derived.

Returns

str