Q1 (20): Compute the clusters for the normalized data of the following dataset (Age and Income) using k-means clustering (k=2) and Manhattan Distance function. Row ID Age (years) Income (thousand riyals per month) A 20 5000 B 35 15000 C 45 12000 D 40 10000 Table 2 Data Normalization: Min-Max Normalization (for numerical attributes): (vi-minA) (maxA-minA) Row ID Age (years) A B C D Income (thousand riyals per month) NOTE: You should pick A and B as initial center points (i.e. C1=A, C2=B) Step 1: Centroid-1 (C1) Centroid-2 (C2) Row ID Distance C1 Distance C2 Cluster Assignment A B C D Step 2: Centroid-1 (C1) Centroid-2 (C2) Row ID Distance C1 Distance C2 Cluster Assignment A B C D Would you stop at this point in k-means algorithm or would you continue?
Added by Heather C.
Close
Step 1
- For Age: min = 20, max = 45, range = 25. -> A: (20-20)/25 = 0.000 -> B: (35-20)/25 = 15/25 = 0.600 -> C: (45-20)/25 = 25/25 = 1.000 -> D: (40-20)/25 = 20/25 = 0.800 - For Income: min = 5000, max = 15000, range = 10000. -> A: (5000-5000)/10000 = 0.000 Show more…
Show all steps
Your feedback will help us improve your experience
Hannah Wilds and 55 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Question No. 3: Given are the points A = (3,4), B = (4,4), C = (4,3), D = (-3,6), E = (-4,-3), F = (-3,-3). Starting from initial clusters Cluster1 = {A} which contains only the point A and Cluster2 = {D} which contains only the point D, run the K-means clustering algorithm and report the final clusters. Use L1 distance as the distance between points which is given by d ((x1, y1), (x2, y2)) = | x1 – x2 | + | y1 – y2 |. Draw the points on a 2-D grid and check if the clusters make sense. You may stop the clustering process if it is found that two iterations have the same clusters, otherwise, at least 4 iterations are required. [4] Given are the 1-dimensional points A = 2, B = 3, C = 4, D = 9, E = 10, F = 11. Compute complete-linkage hierarchical clustering using d (x, y) = |x – y| as the distance between points. And also draw a dendrogram of it. [2]
Sri K.
An individual's income varies with his or her age. The following table shows the median income $I$ of males of different age groups within the United States for $2006 .$ For each age group, let the class midpoint represent the independent variable, $x$. For the class "65 years and older," we will assume that the class midpoint is 69.5. CAN'T COPY THE FIGURE (a) Use a graphing utility to draw a scatter diagram of the data. Comment on the type of relation that may exist between the two variables. (b) Use a graphing utility to find the quadratic function of best fit that models the relation between age and median income. (c) Use the function found in part (b) to determine the age at which an individual can expect to earn the most income. (d) Use the function found in part (b) to predict the peak income earned. (c) With a graphing utility, graph the quadratic function of best fit on the scatter diagram.
Linear and Quadratic Functions
Build Quadratic Models from Verbal Descriptions and from Data
An individual's income varies with age. The table shows the median income I of individuals of different age groups within the United States for a certain year. For each age group, let the class midpoint represent the independent variable x. For the class "65 years and older," assume that the class midpoint is 69.5. Age | Class Midpoint, x | Median Income, I 15-24 years | 19.5 | $10,963.00 25-34 years | 29.5 | $32,131.00 35-44 years | 39.5 | $41,636.00 45-54 years | 49.5 | $44,692.00 55-64 years | 59.5 | $41,477.00 65 years and older | 69.5 | $23,500.00 (a) Using Excel, find the quadratic function of best fit the median income with respect to class midpoint age. (b) Use the function found in part (a) to determine the age at which an individual can expect to earn the most income.
Donna D.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD