class monad.targets.ModalityEvents
monad.targets.ModalityEventsContains main entity events data source defined in the pretrain phase.
Properties
ModalityEvents.events
ModalityEvents.eventsValues of the feature.
def target_fn(history: Events, future: Events, attributes: Attributes, ctx: Dict) -> np.ndarray:
...
# here we get values of the price feature from the datasource transactions
price_values = future["transactions"]["price"].events
...| Returns |
|---|
numpy.ndarray
ModalityEvents.timestamps
ModalityEvents.timestampsTimestamps of the events.
def target_fn(history: Events, future: Events, attributes: Attributes, ctx: Dict) -> np.ndarray:
...
# here we get values of the price feature from the datasource transactions
timestamps = future["transactions"]["price"].timestamps
...| Returns |
|---|
numpy.ndarray[numpy.float64]
ModalityEvents.dataset_name
ModalityEvents.dataset_nameThe name of the data source from which the feature is derived.
| Returns |
|---|
str
ModalityEvents.column_name
ModalityEvents.column_nameThe name of the column from which the feature is derived.
| Returns |
|---|
str
Methods
ModalityEvents.__getitem__(self, i)
ModalityEvents.__getitem__(self, i)| Parameters |
|---|
i: int | list[int] | slice | numpy.ndarray[numpy.int64] | numpy.ndarray[numpy.bool]
Index or list of indexes of events.
| Returns |
|---|
ModalityEvents with the chosen subset of events.
ModalityEvents.__len__(self)
ModalityEvents.__len__(self)The number of events.
| Returns |
|---|
int
