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_user or absent_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_user will be added. For other users paths a new synthetic event - absent_user will be added.

lost_users_listlist of int or list of str, optional

If the list of user_ids is given new synthetic event - lost_user will be added to each user from the list. For other user’s paths will be added new synthetic event - absent_user.

Returns:
Eventstream

Eventstream with 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 timeout and lost_users_list are 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 LabelLostUsers class.

Eventstream#

LabelLostUsersHelperMixin.label_lost_users(timeout=None, lost_users_list=None)[source]#

A method of Eventstream class that creates one of the synthetic events in each user’s path: lost_user or absent_user .

Parameters:
See parameters description

LabelLostUsers

Returns:
Eventstream

Input eventstream with new synthetic events.