From the course: Customer Insights and Consumer Analytics for Organizations: Tools and Analysis
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Customer journey analysis with Python
From the course: Customer Insights and Consumer Analytics for Organizations: Tools and Analysis
Customer journey analysis with Python
- [Instructor] The ability to see the future is a skill typically reserved for oracles. But with the power of data, we can predict future events. In this video, we'll look at how to use Python and prediction algorithms to improve the customer journey. We're going to use the Scikit learn library to power our prediction algorithm. We'll first import the linear models, linear regression sub library. So, we'll do that this way. We'll go from sklearn.linear_model import linear progression and then go 'head and run that. And then next, we'll assign a data frame to two different variables. So, we'll do that this way, we'll say x=df[['customer_journey_progress_program']] Which is one of the variables from our data frame. And then we'll assign y this way. We'll say y=df['experience']. And then let's go 'head and run that. And so, now we'll assign the linear regression functionality to the variable name lm. And so, we'll do that this way, we'll say lm=linearregression() and then we'll apply our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.