retentioneering / retentioneering-tools

Retentioneering: product analytics, data-driven CJM optimization, marketing analytics, web analytics, transaction analytics, graph visualization, process mining, and behavioral segmentation in Python. Predictive analytics over clickstream, AB tests, machine learning, and Markov Chain simulations.
https://doc.retentioneering.com/stable/doc/index.html
Other
798 stars 122 forks source link

Step Matrix Guidance #33

Closed invictus2010 closed 1 year ago

invictus2010 commented 4 years ago

Love this library! I was using the step matrix method like so:

df.rete.step_matrix(max_steps=24, targets=['Confirmation'])

However, I was looking over a 48 hr period. Does this method have any session logic? For instance if User X went Home -> Product, exited the application, and then returned 4 hrs later to the home screen, this would be treated as his third screen correct? It would not start his journey over--correct?

tokedo commented 4 years ago

You can plot step_matrix by sessions as well!

In this case you need to pre-process your data by creating a separate column in your dataframe with session_ids. You can use function data = data.rete.split_sessions(thresh=14400, session_col='user_sessions') where 14400 is 4hrs in seconds. Function rete.split_sessions() will be more documented in the future updates as well as included in a separate upcoming guide about data pre-processing for Rete in general.

So the solution for you will look like:

df = df.rete.split_sessions(thresh=14400, session_col='user_sessions')

retentioneering.config.update({'user_col': 'user_sessions'})

df.rete.step_matrix();

Again more convenient functions and guides to pre-process data will come soon!

invictus2010 commented 4 years ago

@tokedo man you guys have thought of everything!

boum2078 commented 2 years ago

Hi @tokedo and all, was the split by session documented yet...it would be interesting to extend this library such that it ll give you average stats on several sessions over an extended period of time !

ChernyshovAnton commented 1 year ago

The commentary answered the original question.

At the end of April 2023, we will be moving to the version 3 of the library. You can use pip to install packages into your beta version: pip install retentioneering --pre

Documentation on the SplitSessions data processor is available for version 3: User guide API Reference