Event timestamp hist#
Class#
- class retentioneering.tooling.event_timestamp_hist.event_timestamp_hist.EventTimestampHist(eventstream)[source]#
- Plot the distribution of events over time. Can be useful for detecting time-based anomalies, and visualising general timespan of the eventstream. - Parameters:
- eventstreamEventstreamType
 
 - See also - TimedeltaHist
- Plot the distribution of the time deltas between two events. 
- UserLifetimeHist
- Plot the distribution of user lifetimes. 
- Eventstream.describe
- Show general eventstream statistics. 
- Eventstream.describe_events
- Show general eventstream events statistics. 
 - Notes - See Eventstream user guide for the details. - fit(raw_events_only=False, event_list=None, lower_cutoff_quantile=None, upper_cutoff_quantile=None, bins=20)[source]#
- Calculate values for the histplot. - Parameters:
- raw_events_onlybool, default False
- If - True- statistics will only be shown for raw events. If- False- statistics will be shown for all events presented in your data.
- event_listlist of str, optional
- Specify events to be displayed. 
- lower_cutoff_quantilefloat, optional
- Specify time distance quantile as the lower boundary. The values below the boundary are truncated. 
- upper_cutoff_quantilefloat, optional
- Specify time distance quantile as the upper boundary. The values above the boundary are truncated. 
- binsint or str, default 20
- Generic bin parameter that can be the name of a reference rule or the number of bins. Passed to numpy.histogram_bin_edges. 
 
- Returns:
- None
 
 
 - plot(width=6.0, height=4.5)[source]#
- Create a sns.histplot based on the calculated values. - Parameters:
- widthfloat, default 6.0
- Width in inches. 
- heightfloat, default 4.5
- Height in inches. 
 
- Returns:
- matplotlib.axes.Axes
- The matplotlib axes containing the plot. 
 
 
 - property values#
- Returns:
- tuple(np.ndarray, np.ndarray)
- The first array contains the values for histogram. 
- The first array contains the bin edges. 
 
 
 
 
Eventstream#
- Eventstream.event_timestamp_hist(event_list=None, raw_events_only=False, lower_cutoff_quantile=None, upper_cutoff_quantile=None, bins=20, width=6.0, height=4.5, show_plot=True)[source]#
- Plot distribution of events over time. Can be useful for detecting time-based anomalies, and visualising general timespan of the eventstream. - Parameters:
- show_plotbool, default True
- If - True, histogram is shown.
- See other parameters’ description
 
- Returns:
- EventTimestampHist
- A - EventTimestampHistclass instance with given parameters.