• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 18 pages
Other

WGU D603 Machine Learning – Task 2: Clustering Techniques | K-Means Hospital Patient Clustering Analysis, Python Code & Complete Solutions | 2026/2027 Updated

Document preview thumbnail
Preview 3 out of 18 pages

WGU D603 Machine Learning – Task 2: Clustering Techniques | K-Means Hospital Patient Clustering Analysis, Python Code & Complete Solutions | 2026/2027 Updated

Content preview

WESTERN GOVERNORS UNIVERSITY | D603 MACHINE LEARNING




WGU D603 – MACHINE LEARNING
TASK 2: CLUSTERING TECHNIQUES
Hospital Patient Clustering Analysis Using K-means
Western Governors University
Course: D603 – Machine Learning
Assessment: Task 2 – Clustering Techniques
Method: K-means clustering, standardized quantitative patient attributes
Dataset: medical_clean.csv
Program: Master of Science in Data Analytics
Academic period: 2026/2027




D603 • TASK 2 – CLUSTERING TECHNIQUES | PAGE 1

, WESTERN GOVERNORS UNIVERSITY | D603 MACHINE LEARNING




EXECUTIVE SUMMARY
Healthcare organizations need credible approaches to understanding how patient populations
differ in service utilization, financial characteristics, hospitalization duration, and clinical
measurements. Clustering is an unsupervised machine learning technique that can organize
similar patient records without requiring a predefined target outcome. This project applies K-
means clustering to quantitative variables from the medical_clean.csv hospital dataset to
examine whether patient segments could inform care coordination and resource planning.
The source assessment reports 10,000 hospital observations. Seven fields were selected for
clustering: Age, Income, TotalCharge, VitD_levels, Doc_visits, Children, and Initial_days. Five
represent measured quantities and two are discrete counts; all seven can be represented
numerically. Missing values are addressed through median imputation and each feature is
standardized so that variables with large raw scales, such as income and charges, do not
dominate Euclidean distance. K-means is assessed using within-cluster sum of squares (inertia),
silhouette scores, initialization stability, and a two-dimensional principal component analysis
(PCA) display.
The source report includes descriptive summaries for four patient segments containing 1,993,
2,182, 3,434, and 2,391 records. Their reported average ages lie between 53.2 and 54.0 years,
average annual incomes between $39,792 and $40,947, and readmission percentages between
36.2% and 37.4%. This limited variation does not, by itself, demonstrate clinically distinct risk
levels. Moreover, the source figure highlights a two-cluster selection whereas the written
narrative claims a four-cluster optimum. Accordingly, the four-segment results are presented as
the reported four-cluster scenario, while determining the statistically preferred value of k remains
a reproducibility step using the actual source CSV. No unsupported optimal-k score or additional
cluster centroid is invented.
The recommended organizational action is to evaluate the usefulness of these quantitative
segments in a controlled analytics pilot, test whether they reveal substantive differences in
hospital resource use, and measure any operational interventions before expanding them.
Patient segment membership should not function as an independent diagnosis or an automatic
basis for clinical treatment.


REPORT CONTENTS
A. GitLab Repository – project structure, version control, and evidence record
B. Purpose and Goals – organizational research question and measurable goals
C. Clustering Technique – K-means operation, assumptions, and libraries
D. Data Preparation – data inventory, treatment, standardization, and exports
E. Determining the Number of Clusters – inertia, silhouette, and selection criteria
F. Analysis and Interpretation – quality, segment findings, limitations, and recommendations
G. Panopto Demonstration – demonstration content and submission evidence
H. Sources for Third-Party Code – package documentation and attribution
I. References – source documents and technical references
Appendix A. Reproducible Python Analysis
Appendix B. Outputs, Quality Checks, and Evidence Inventory




D603 • TASK 2 – CLUSTERING TECHNIQUES | PAGE 2

, WESTERN GOVERNORS UNIVERSITY | D603 MACHINE LEARNING




A. GITLAB REPOSITORY
A.1 Repository purpose and organization
The GitLab repository provides version control and an auditable record of how the clustering
analysis progresses from the source dataset to a prepared matrix, cluster-selection diagnostics,
fitted K-means labels, cluster profiles, and documented recommendations. Using GitLab
separates the source data and code from derived analytical outputs and allows a reviewer to
identify when feature selection, scaling, cluster estimation, and figures were introduced.
The project uses the following directory structure:
D603_Task2_Clustering/
├── README.md
├── d603_kmeans_analysis.py
├── medical_clean.csv
├── clustering_outputs/
│ ├── patient_clustering_cleaned.csv
│ ├── patient_cluster_assignments.csv
│ ├── four_cluster_profile.csv
│ ├── four_cluster_centroids.csv
│ ├── k_selection_diagnostics.csv
│ ├── k_selection.png
│ ├── cluster_pca.png
│ ├── cluster_sizes.png
│ └── analysis_summary.json
└── requirements.txt

The source file medical_clean.csv is referenced by the assessment material; it is not attached to
the supplied PDF. The files in clustering_outputs/ are reproducible outputs created when the
companion Python analysis is executed with that CSV. A README.md should state the software
requirements, command for running the code, and description of each exported artifact.

A.2 Version-control procedure
The repository development sequence is: (1) initialize the project; (2) record the raw-data
specification; (3) select the seven numerical attributes; (4) implement missing-data treatment
and scaling; (5) fit candidate cluster solutions; (6) create the four-cluster report; (7) generate
diagnostics and figures; and (8) document results and limitations. Commits should preserve
meaningful stages, for example, Import and validate seven clustering features, Implement
scaling and K-means comparison, Generate segment profiles and PCA graphics, and Document
analysis findings.

A.3 Repository submission evidence
The uploaded assessment includes a screenshot of a GitLab project and states that its repository
address is supplied separately in the evaluator comments. The actual project URL is not
contained in the supplied PDF. Consequently, the screenshot documents that a repository
interface appeared in the source material but cannot independently verify access, ownership,
contents, or a submitted URL. A working repository link must be provided through the
assessment’s required submission channel; substituting an invented link would not constitute
evidence.




D603 • TASK 2 – CLUSTERING TECHNIQUES | PAGE 3

Document information

Uploaded on
October 27, 2026
Number of pages
18
Written in
2026/2027
Type
Other
Person
Unknown
$17.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Wiseman
3.9
(1688)
Sold
8637
Followers
3914
Items
31806
Last sold
12 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions