LabelLostUsers#
Data processor#
- class retentioneering.data_processors_lib.label_lost_users.LabelLostUsers(params)[source]#
Create one of synthetic events in each user’s path:
lost_userorabsent_user.- Parameters:
- Only one of parameters could be used at the same time
- timeoutTuple(float, DATETIME_UNITS), optional
Threshold value and its unit of measure. Calculate timedelta between the last event in each user’s path and the last event in the whole eventstream. For users with timedelta greater or equal to selected
timeout, a new synthetic event -lost_userwill be added. For other users paths a new synthetic event -absent_userwill be added.- lost_users_listlist of int or list of str, optional
If the list of user_ids is given new synthetic event -
lost_userwill be added to each user from the list. For other user’s paths will be added new synthetic event -absent_user.
- Returns:
- Eventstream
Eventstreamwith new synthetic events only - one for each user:event_name
event_type
timestamp
lost_user
lost_user
last_event
absent_user
absent_user
last_event
- Raises:
- ValueError
Raised when both
timeoutandlost_users_listare either empty or given.
Notes
See Data processors user guide for the details.
- class retentioneering.data_processors_lib.label_lost_users.LabelLostUsersParams(*, timeout=None, lost_users_list=None)[source]#
A class with parameters for
LabelLostUsersclass.
Eventstream#
- LabelLostUsersHelperMixin.label_lost_users(timeout=None, lost_users_list=None)[source]#
A method of
Eventstreamclass that creates one of the synthetic events in each user’s path:lost_userorabsent_user.- Parameters:
- Only one of parameters could be used at the same time
- timeoutTuple(float, DATETIME_UNITS), optional
Threshold value and its unit of measure. Calculate timedelta between the last event in each user’s path and the last event in the whole eventstream. For users with timedelta greater or equal to selected
timeout, a new synthetic event -lost_userwill be added. For other users paths a new synthetic event -absent_userwill be added.- lost_users_listlist of int or list of str, optional
If the list of user_ids is given new synthetic event -
lost_userwill be added to each user from the list. For other user’s paths will be added new synthetic event -absent_user.
- Returns:
- Eventstream
Input
eventstreamwith new synthetic events.