From the course: Python for AI Projects: From Data Exploration to Impact
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Training Purchase Prediction Models - Python Tutorial
From the course: Python for AI Projects: From Data Exploration to Impact
Training Purchase Prediction Models
- [Instructor] Next, we'll build two functions for our purchase prediction models, one using logistic regression and another using Optuna-tuned LightGBM as part of our Explore California case study. Unlike our earlier models, we won't need a manual train test split. Our dataset already includes train, validation, and test flags in the period column, which will feed directly into the pipeline. We'll also handle missing values in our pipeline by imputing zeros, which works well for our mix of Booleans and numeric features. This time, we'll use an ROC curve instead of a confusion matrix to visualize performance. The area under the curve, also known as AUC, shows the balance between true positives and false positives, offering a good trade-off between precision and recall. Finally, we'll use our model outputs with SHAP and LIME to explore built-in explainability tools in Python. This field, known as explainable AI, helps…
Contents
-
-
-
-
-
(Locked)
Data exploration4m 56s
-
(Locked)
Preparing Customer Data for Predictions for Machine Learning5m 47s
-
(Locked)
Training data pipeline6m 46s
-
(Locked)
Building Classification Pipelines in Python7m 47s
-
(Locked)
Model fitting7m 14s
-
(Locked)
Model metrics5m 39s
-
(Locked)
Training Purchase Prediction Models6m 58s
-
(Locked)
-
-