WESTERN GOVERNORS UNIVERSITY / D797
Machine Learning
Data Preparation
& Analysis
Customer behavior segmentation using a reproducible Python workflow
COMPREHENSIVE WORKED EXAMPLE
Data quality review | Cleaning and transformation | Normalization | K-means clustering |
Algorithm analysis
Course D797 - Artificial Intelligence and Machine Learning Foundations
Project InsightStream Digital Services (fictional case)
Edition October 2026
Scope Original educational example using synthetic records; not official WGU task instructions or an evaluator-approved
submission.
INDEPENDENT EDUCATIONAL RESOURCE | OCTOBER 2026
,D797 / MACHINE LEARNING DATA PREPARATION TECHNICAL REPORT
Executive summary
This report demonstrates a complete, reproducible data-preparation workflow for an
applied machine learning problem. A fictional subscription business wishes to understand
differences in spending and engagement and to establish a sound foundation for future
cancellation prediction.
The analysis begins with 326 synthetic observations, including six deliberately duplicated records.
Following exact-duplicate removal, 320 distinct customers remain. A Python preprocessing pipeline
standardizes categorical values, identifies invalid numerical entries, imputes missing data and rescales
numerical features. The resulting dataset is complete and ready for exploratory segmentation.
Two candidate behavioral segments emerge from K-means clustering. Their principal differences concern
monthly expenditure and recent logins. The highest silhouette coefficient among two through five
candidate clusters is 0.3479, obtained with two clusters. The result is useful as a demonstration of
exploratory analysis but is not evidence of causal relationships or production-ready customer profiles.
The report also explains why logistic regression is a reasonable initial baseline for a separate, future
supervised cancellation model. That predictive model is proposed, not trained. The distinction prevents
clustering outcomes from being misconstrued as predictions.
Evidence boundary. This is an independently developed, D797-aligned worked example. The complete
official 2026 assessment instructions, rubric, task identifier, and submission-file requirements were not
available for verification. No claim of evaluator approval or exact rubric compliance is made.
At a glance
Input records Prepared records Best tested k Silhouette
326 synthetic rows 320 distinct accounts 2 clusters 0.3479
All summary statistics and illustrations in this report were reproduced by running the accompanying Python script on the
synthetic dataset. Results should be interpreted solely within that artificial case.
Original synthetic-data example · October 2026 01
, D797 / MACHINE LEARNING DATA PREPARATION TECHNICAL REPORT
Contents
Executive summary 1
Contents 2
1. Business context and research objectives 3
2. Dataset specification and provenance 3
3. Data-quality audit 4
4. Cleaning decisions and feature preparation 6
5. Exploratory machine learning design 7
6. Results and interpretation 8
7. Proposed future predictive model 10
8. Ethics, privacy, and reproducibility 11
9. Limitations and next steps 11
10. Conclusion 12
Appendix A. Running the complete example 12
Appendix B. Full Python source code 13
Appendix C. References and notes 17
How to read this report
Sections 1-5 establish the business context, data structure, and cleaning decisions. Sections 6-8 document
exploratory clustering and considerations for future supervised modeling. Sections 9-10 address limits and
conclusions. The appendices supply the reproducible Python program, a file manifest, and supporting
references.
Original synthetic-data example · October 2026 02
Machine Learning
Data Preparation
& Analysis
Customer behavior segmentation using a reproducible Python workflow
COMPREHENSIVE WORKED EXAMPLE
Data quality review | Cleaning and transformation | Normalization | K-means clustering |
Algorithm analysis
Course D797 - Artificial Intelligence and Machine Learning Foundations
Project InsightStream Digital Services (fictional case)
Edition October 2026
Scope Original educational example using synthetic records; not official WGU task instructions or an evaluator-approved
submission.
INDEPENDENT EDUCATIONAL RESOURCE | OCTOBER 2026
,D797 / MACHINE LEARNING DATA PREPARATION TECHNICAL REPORT
Executive summary
This report demonstrates a complete, reproducible data-preparation workflow for an
applied machine learning problem. A fictional subscription business wishes to understand
differences in spending and engagement and to establish a sound foundation for future
cancellation prediction.
The analysis begins with 326 synthetic observations, including six deliberately duplicated records.
Following exact-duplicate removal, 320 distinct customers remain. A Python preprocessing pipeline
standardizes categorical values, identifies invalid numerical entries, imputes missing data and rescales
numerical features. The resulting dataset is complete and ready for exploratory segmentation.
Two candidate behavioral segments emerge from K-means clustering. Their principal differences concern
monthly expenditure and recent logins. The highest silhouette coefficient among two through five
candidate clusters is 0.3479, obtained with two clusters. The result is useful as a demonstration of
exploratory analysis but is not evidence of causal relationships or production-ready customer profiles.
The report also explains why logistic regression is a reasonable initial baseline for a separate, future
supervised cancellation model. That predictive model is proposed, not trained. The distinction prevents
clustering outcomes from being misconstrued as predictions.
Evidence boundary. This is an independently developed, D797-aligned worked example. The complete
official 2026 assessment instructions, rubric, task identifier, and submission-file requirements were not
available for verification. No claim of evaluator approval or exact rubric compliance is made.
At a glance
Input records Prepared records Best tested k Silhouette
326 synthetic rows 320 distinct accounts 2 clusters 0.3479
All summary statistics and illustrations in this report were reproduced by running the accompanying Python script on the
synthetic dataset. Results should be interpreted solely within that artificial case.
Original synthetic-data example · October 2026 01
, D797 / MACHINE LEARNING DATA PREPARATION TECHNICAL REPORT
Contents
Executive summary 1
Contents 2
1. Business context and research objectives 3
2. Dataset specification and provenance 3
3. Data-quality audit 4
4. Cleaning decisions and feature preparation 6
5. Exploratory machine learning design 7
6. Results and interpretation 8
7. Proposed future predictive model 10
8. Ethics, privacy, and reproducibility 11
9. Limitations and next steps 11
10. Conclusion 12
Appendix A. Running the complete example 12
Appendix B. Full Python source code 13
Appendix C. References and notes 17
How to read this report
Sections 1-5 establish the business context, data structure, and cleaning decisions. Sections 6-8 document
exploratory clustering and considerations for future supervised modeling. Sections 9-10 address limits and
conclusions. The appendices supply the reproducible Python program, a file manifest, and supporting
references.
Original synthetic-data example · October 2026 02