LabelCroppedPaths#
Data processor#
- class retentioneering.data_processors_lib.label_cropped_paths.LabelCroppedPaths(params)[source]#
Create new synthetic event(s) for each user based on the timeout threshold:
cropped_left
orcropped_right
- Parameters:
- left_cutoffTuple(float, DATETIME_UNITS), optional
Threshold value with its unit of measure. The timedelta between the last event in each user’s path and the first event in the whole eventstream is calculated. For users with the timedelta less than the selected
left_cutoff
, the newcropped_left
event is added.- right_cutoffTuple(float, DATETIME_UNITS), optional
Threshold value with its unit of measure. The timedelta between the first event in each user’s path and the last event in the whole eventstream is calculated. For users with timedelta less than the selected
right_cutoff
, the newcropped_right
event is added.
- Returns:
- Eventstream
Eventstream containing only the generated synthetic events, for users whose paths satisfy the specified cut-offs.
event_name
event_type
timestamp
cropped_left
cropped_left
first_event
cropped_right
cropped_right
last_event
- Raises:
- ValueError
If both of
left_cutoff
andright_cutoff
are empty.
See also
TimedeltaHist
Plot the distribution of the time deltas between two events.
UserLifetimeHist
Plot the distribution of user lifetimes.
Notes
See Data processors user guide for the details.
- class retentioneering.data_processors_lib.label_cropped_paths.LabelCroppedPathsParams(*, left_cutoff=None, right_cutoff=None)[source]#
A class with parameters for
LabelCroppedPaths
class.
Eventstream#
- LabelCroppedPathsHelperMixin.label_cropped_paths(left_cutoff, right_cutoff)[source]#
A method of
Eventstream
class that creates new synthetic event(s) for each user based on the timeout threshold:cropped_left
andcropped_right
.- Parameters:
- See parameters description
- Returns:
- Eventstream
Input
eventstream
with new synthetic events.