ISYE 6501
Introduction to Analytic Model
Homework 2 (Summer 2024)
Georgia Institute of Technology.
, lOMoARcPSD| 43283024
ISYE HW 2
HT
2024-05-27
Question 4.1 Describe a situation or problem from your job, everyday life, current events, etc., for which
a clustering model would be appropriate. List some (up to 5) predictors that you might use.
The primary difference between classification and clustering is the known versus unknown response. Clus-
tering could be used to identify patterns in a disease spreading in a population. For example, public health
officials could use clustering to identify hotspots, understand transmission dynamics, and allocate resources
more effectively. Clusters can also reveal groups of cases that share characteristics such as geographic lo-
cation, demographics, etc. Some predictors might include: 1. location 2. demographics 3. date of disease
onset 4. socioeconomic status 5. pre-existing conditions
Question 4.2 Use the R function kmeans to cluster the points as well as possible. Report the best combi-
nation of predictors, your suggested value of k, and how well your best clustering predicts flower type.
a. Finding number of k (clusters) First, we run the kmeans algorithm multiple times with different k-
values. Using an ‘elbow plot’ of the sum squared error, we find that k = 3 is a good number to start
with because this is the point where the reduction in SSE slows down significantly as k increases. This
‘elbow’ point suggests that adding more than 3 clusters doesn’t significantly improve the clustering.
iris_data <- read.table("week 2 data-summer/iris.txt", header=TRUE)
set.seed(123)
Total_Sum <- NULL
K <- (1:10)
for (i in K){
cl <- kmeans(iris_data[,-5],centers = i)
Total_Sum = c(Total_Sum, cl$tot.withinss)
}
plot(K, Total_Sum,type = "b")
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller saraciousstuvia. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $14.49. You're not tied to anything after your purchase.