How I Build Predictive Analytics Models With AI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Predictive Analytics if you think it sounds complicated that's mainly because it is in most cases building predictive models involve some fairly complex calculations and require special tools so you might also think that those tools tend to be the realm of the data scientist putting Predictive Analytics out of the reach of the average business due to a lack of said data scientist or because it was beyond their budget well that might have been the case a few years AO go but not so much anymore with the Advent of artificial intelligence and machine learning becoming available to all there are now some much more accessible Solutions one of those being pcan in this video we'll take a look at what pcan offers in terms of Predictive Analytics using generative artificial intelligence or gen AI let's jump [Music] [Applause] [Music] in hello and welcome to learn bi online with me Adam finer helping you do more with data Predictive Analytics isn't something I've really covered on this channel so when pan approached me asking if I'd like to check out their tool I took it for a spin and decided it was something that you guys might be interested in too full disclosure pcan are very kindly sponsoring today's video I'm going to be demoing their platform for you but they haven't told me what to say so it's completely my review if you want to check them out for yourself there's a link in the description below if at this point you're asking yourself what is Predictive Analytics it's essentially using data statistical algorithms and machine learning to predict future Behavior Trends and outcomes so this being a business intelligence Channel what are the kinds of predictions that businesses want to make well there are a few very common use cases things like Revenue prediction or churn which is predicting how many existing customers might stop using a product or service in the future churn rate is the use case we're going to look at now using pan so let's jump onto my computer here on Pan's website it says reimagine machine learning with Pan's predictive gen AI or generative artificial intelligence level up your skills and impact with machine learning start your AI Journey today it also says zero data engineering no data scientists needed and coding optional which sounds great you can sign up here for a 14-day free trial and when you do and you log in you'll be greeted by Pan's AI assistant who says I'll assist you in formulating a predictive question I'll then create a SQL notebook to build a training set so what would you like to predict well in our case I want to predict customer churn so I'll send that and the reply comes back great I'd be happy to help you solve your customer churn predictive use case for example a predictive question could be predict weekly which customers will stop making purchases in the next 7 days this is just an example and we can refine it to better suit your needs in order for me to help you phrase your own predictive question all you need to do is to answer four simple questions ready to get started let's start with the first question who or what is the subject of your prediction in this case is it safe to assume that the subject is your customers well that is correct so I'll send yes great so we're predicting something about your customers now let's move on to the second question what is the specific activity or event that you are trying to predict about your customers in the context of customer churn this could be something like customers will stop making purchases or customers will cancel their subscription could you please specify the activity you're interested in predicting well it's stop making purchases that's what we're interested in so we'll send that perfect so we're predicting whether your customers will stop making purchases now on to the third question how far into the future do you want to predict this activity for example do you want to predict if a customer will stop making purchases in the next 7 Days 14 days or perhaps a month please specify the time frame well for us we want a month great so we're predicting whether a customer will stop making purchases in the next month now for the final question do you want to predict this on a recurring basis like daily weekly monthly or is there a specific event after which you want to predict for example do you want to predict this every week for all customers or only for customers after they make a purchase or after they sign up well I actually want to predict this on a monthly basis so I'll send monthly excellent so you want to make this prediction on a monthly basis here is your predictive question predict monthly which customers will stop making purchases in the next month exciting you made it you can use this question as is or we can refine it further would you like to add more details to this question no for me that looks good so I'm going to hit looks good fantastic in order to create a predictive SQL notebook that fits your data requirements we need to review your data sounds good please note that pan strictly adheres to data security compliance standards being ISO 271 and sock 2 so certified sure let's continue with my data let's talk data to predict customer churn we need to have historical data about your customer's purchase Behavior do you have a table that contains records of your customer purchases this table should include a unique identifier for each customer like a customer ID and the date of each purchase if you have such a table could you please upload it as a CSV file using the attachment button next to the chat input line so that's this one here I'll hit that I've got this transactions file here so we'll upload that and we'll send it so pcan analyzes the file and uh finds all the different columns that are in the source file and also attributes a data type to each so um we need say this looks good great now let's identify the necessary columns in your table we need to find one the column that holds the date of each purchase this is mandatory as Pon cannot build a model without this column and number two the column that holds the unique identifier for each customer this is also mandatory could you please tell me the names of these columns in your table so we have the date column here and right at the top we have the customer ID column so I'm just going to say date and customer uncore ID perfect so we have the date of each purchase in the dates column the unique identifier for each customer in the customer ID column just to confirm are these the correct columns that we should use for the prediction yes wonderful here's a summary of the information you've provided Okay so we've got the predictive question that we formulated a minute ago uh and information about the data schema the table and the columns that we need so if that all looks good we're going to hit generate notebook and it'll start the process of generating the predictive notebook now this might take a minute or two so let's jump forward to once it's done and here we are in the generated notebook or notbook as we're working with pcan of course so using this pcan notebook you'll be able to train an ml or machine learning model that answers your predictive question the one that we formulated a minute ago so the celles below contain queries SQL queries that were automatically generated based on your predictive question running them will create a training Set uh using pans format comprised of two parts so the two parts there's a core set which is a table with historical examples of customers who did or did not stop making purchases and attribute tables so additional tables with relevant information about the customers so if we go down here we see Finding relevant customers for our core set we're trying to learn how to make a monthly prediction on customers as a basis to learn from our training set first needs to have a table with a row for each pair of customer and each month so this first query here it says this will return all days weeks or months in the given time frame and you can run these different queries independently let me just run this one here and the result or at least a preview of the result will appear below here and this uh the name being given to this cell is monthly sampling helper table okay if we keep going down next we'll write a query that will find relevant customer per sampled data so that's this query here now obviously you don't need to know SQL you can just run these queries but obviously it does help um to understand SQL a little bit to know what's going on with these queries let's just run this there we go success uh the label our positive and negative examples in order to train a model we need to give it both positive and negative examples in our context the positive examples are customers who stop making purchases in the next month after each sampled month um so this query below will'll Now find positive and negative examples from historical data let's run this and there we go did the customer stop making purchases within next month and for each customer ID we've got yes and no if we keep going down additional useful data to help train the model as mentioned it's important to include additional tables with information about our prediction subjects at pan we call these attribute tables we used your data to create a sample attribute table so that's this one here here attribute one using the file that we uploaded for additional data features and we can see here it's taken some of the other fields from that file let's run this [Music] query and there we go it's successfully run that query too if you want you can just click this button here to run them all but if you want to sort of understand step by step what's going on and the results that are being returned then you can just do one by one one so and that's it um we're now ready for pcan to train the model let's review what we did so we created a table the core set that samples the history of customers determining whether they stop making purchases or not per each sample date which serves as uh positive and negative examples the model can learn from and then secondly we added additional tables the attribute tables that provide more information for each of the customers up to each sample date this extra data enhances the model ability to infer patterns and make accurate predictions makes sense exciting the final step would be to click train model at the top that's this uh purple button here let's hit that and we have two options in terms of training mode we have fastest and production quality obviously production quality takes several hours so for our purposes we're going to stick to fastest uh data mapping and we're just going to validate and train obviously this is going to take a while so let's jump forward once that's run we end up in the model tab where first off we can see the model's evaluation in terms of its performance we can see it has a Precision of 66.4% which is 2.6 times better than rule-based logic and 3.9 times better than a random guess we can see other things like the performance details threshold configuration and also the top top contributing columns to the model predictions we can see here that payment recency is contributing 69.9% of the model's prediction so we can see here this column significantly dominates your model's prediction suggesting possible overdependence and potential issues we'll sort that out in a minute so in the model output tab we can see a sample of the rows so in terms of the customer and the probability the the classification and the veracity of the result so let's go back to queries we can see here that notebooks are locked once a model is sent to training so if we did want to edit this model in any way perhaps by adding more data we would need to duplicate it which I can do here or I'll just go back to this screen here where we can see the notebook we've previously created I'm going to click here and select duplicate and open up this new copy so in terms of importing or adding new data we have this part section here where we can choose to add new data there's this customers file in fact I've already included that here so I can generate this as an attribute this will create a new cell so we can see here that this new customers information could help better train the model so when we run all this new data will be in included so that's adding CSV data but what about other data sources well if I come down to here I can choose to add data and create a new connection and we can see a menu of all of the different data sources that we have at our disposable so we have relational databases like SQL server and MySQL we have data warehouses like Google bigquery and Amazon redshift and other data sources like Salesforce and hub spot also we can see coming soon Google ads and green plum if you don't see your data source on this list you can click here and suggest a new on for development so we've seen how to predict customer churn but what other Solutions are available from pcan Straight Out of the Box well in terms of user acquisition we've got things like marketing mix modeling predictive campaign Ras or return on ad spend campaign optimization using scan and Lead scoring with predictive analytics for customer engagement as well as customer churn we've got customer winback and upsell and cross sell and in terms of supply chain we've got demand forecasting now if you're worried about not having any data to practice this with not to worry pcan has you covered if we go to their main page here we actually have two tutorial notebooks that you can play around with so don't hesitate to do that so a massive thank you to pcan for sponsoring today's video it really does help out the channel and keeps the content coming if you want to check them out which I highly recommend you do I'll leave a link in the description or just head on over to pan. a thanks so much for watching and I'll see you soon for another video Until then bye
Info
Channel: Adam Finer - Learn BI Online
Views: 7,088
Rating: undefined out of 5
Keywords: machine learning, predictive analytics, artificial intelligence, ai, data science, what is predictive analysis, data analytics, steps involved in predictive analysis, predictive analysis example, what is predictive analytics, predictive analytics tools, data science for beginners, data analytics for beginners, machine learning algorithms, how predictive analytics is used in a real world setting, predictive analytics in big data, predictive analytics in big data analytics
Id: 0K1ESOC8CXg
Channel Id: undefined
Length: 15min 44sec (944 seconds)
Published: Thu Feb 08 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.