/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4 warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}" exercise2(): Get a datafile in text format from the class website. Read the data from the datafile. Print the first five lines. Compute some statistical measurements. Normalize the data, and recompute the statistics. When finished, delete the datafile. "faithful_data.txt" contains 272 rows and 2 columns. First five lines of data: [[ 3.6 79. ] [ 1.8 54. ] [ 3.333 74. ] [ 2.283 62. ] [ 4.533 85. ]] Statistics for data: data.shape: (272, 2) np.min(data,axis=0): [ 1.6 43. ] np.mean(data,axis=0): [ 3.48778309 70.89705882] np.max(data,axis=0): [ 5.1 96. ] np.std(data,axis=0): [ 1.13927121 13.56996002] np.var(data,axis=0): [ 1.29793889 184.14381488] One-cluster energy E = 544.0000000000002 One-cluster center Z: [[4.91232871e-16 4.15619336e-16]] Graphics saved as "exercise2_one_cluster.png" Two-cluster energy E = 79.57595948827704 Two-cluster centers Z: [[ 0.70970327 0.67674488] [-1.26008539 -1.20156744]] Graphics saved as "exercise2_two_clusters.png" 3-cluster energy E = 56.34949369601642 3-cluster centers Z: [[-1.27243544 -1.20871494] [ 0.88086224 0.89735086] [ 0.42228532 0.30345458]] exercise2(): Normal end of execution.