程序代写代做 algorithm MATH 368, Summer 2020 Dr. Andreas Alpers Project 3

MATH 368, Summer 2020 Dr. Andreas Alpers Project 3
Submit your solutions to andreas.alpers@liverpool.ac.uk no later than 8 May 2020. Use the subject line ‘MATH368 P3’ in your email.
Student IDs:
Exercise 1. Old Faithful is a well-studied geyser located in Yellowstone National Park in Wyoming, USA. We focus here on a data set recorded in 1990, which measured the time be- tween eruptions and the duration of the eruption, both taken in minutes. This data set was based on 272 observations of Old Faithful’s eruptions.
(a) Download the data set from https://www.stat.cmu.edu/~larry/all-of-statistics/ =data/faithful.dat and compute the mean waiting time ∆t1 between eruptions and the mean duration ∆t2 of the eruptions.
Looking at the scatter plot we see that the average waiting times and durations are rarely observed. Old Faithful has apparently two eruptive modes: short duration eruptions followed by a short interval, and a long duration eruption followed by a long interval. We want to analyze this further.
Old Faithful geyser (Yellowstone National Park, USA)
100
90
80
70
60
50
40
1.5 2 2.5 3 3.5 4 4.5 5 5.5
Eruption times (mins)
(b) Normalize the data (i.e., scale the data in such a way that all data lies in the interval [0, 1] × [0, 1]) and provide a scatter plot of the normalized data.
∆t1 = ∆t2 =
Page 1 of 3
Waiting times to next eruptions (mins)

(c) Implement the k-means algorithm in matlab (as stopping criterion stop if the number of iterations exceeds 10 or the SSE value does not decrease anymore).
(d) Cluster the normalized data into 2 clusters using your k-means implementation (from 10 runs of k-means with random initial seeds, report the result with the lowest SSE). Provide a scatter plot of your clustering and report the corresponding SSE.
Page 2 of 3

(e) Which two cluster centers do you obtain?
(f) Matlab has a built-in function kmeans. Repeat task (d) using matlab’s kmeans. Do you observe a difference in terms of results and computation times?
c1 = c2 =
Page 3 of 3