検索対象: When Life is Linear From Computer Graphics to Bracketology

◎ 2015 by The Mathematical Association of America (lncorporated) Library 0f Congress Contr01 Number: 2014959438 Print edition ISBN: 978-0-88385-649-9 EIectronic edition ISBN: 978-0-88385-988-9 Printed ⅲ the United States of America Current Printing (last digit): 10 9 8 7 6 5 4 3 2

62 When Life is Linear alumm g1V1ng rank. Excluding the columns for the score and name 0f the college, we will use the remaining columns in Table 7.5 t0 find a linear combination tO create the score. The only column that is changed is that for SAT scores, which is reported as a range like 1 引 住 ー 1530 for Williams College. Since we will want one number per column, we will take the average of the range, which for Williams would be 1420. Given there are fourteen columns Of data, we need only the data om the top fourteen colleges that correspond t0 data from the rows for WiIIiams C011ege t0 the US Naval Academy. This creates the linear system 17 3 71 4 92 4 1420 91 7 93 1 97 6 58 92 1425 84 13 5 7 70 2 9 94 1 98 10 57 91 6 1440 84 15 7 74 2 8 93 4 97 9 46 87 6 1385 86 1 8 17 68 1 9 94 1 1 96 3 55 87 2 1460 90 14 20 70 1 8 94 1 98 6 43 87 8 1410 83 16 14 68 1 10 93 6 96 14 50 89 12 1390 78 引 12 69 1 8 93 14 95 10 46 88 12 1415 78 引 16 65 1 9 97 4 97 27 58 83 2 1400 94 25 5 79 1 8 94 6 96 15 44 14 1390 71 14 4 86 2 85 9 94 1 1 96 21 43 88 14 1395 74 23 20 68 0.3 8 95 6 97 13 33 83 10 1360 82 28 15 69 0 1 1 99 6 96 37 53 89 1 1500 95 22 18 67 2 8 97 21 98 1 8 33 88 46 に 70 53 7 24 61 0 9 94 25 97 1 21 Easy enough t0 solve. Keep ⅲ mind, solving the system produces weights that compute the exact overall score for the fourteen schools. SO, we now apply them t0 the remaming sch001s and qee the predicted scores. Here, we see how P00 日 y we've done. For example, Washington and Lee's overall score was 88 ; our method predicts 73.7. Wesleyan scored 86 although we predict Ⅱ 8. Also, CoIby and CoIgate both scored 84 and our method gives them scores Of 88 and 96. SO, we may seem at a loss. But, as is Often the case in mathematics, meeting a dead end may mean that only a slight change ln perspective will lead t0 a fruitful new direction. Like the example with OIympic data, we weren't using all the data. Using least squares enabled us t0 include more gold medaltimes and can let us include more schools here. We'll only use the first 20 schools so we have a few 厄 代 against which t0 test our method. This would produce the system D2()x14W14xI 0 8 -6 4- 4 00 、 ) っ ~ 1 0 一 0- 9- 9 一 8 一 0 9- 9 一 9 一 9 一 9- 0 ノ 一 9- 9- 9 一 8- 8 8 一 S20 x い

Zombie Math—Decomposing requirement 0f 6 , 480 十 1 0 十 5 090 numbers or about 3.5 % 0f the onginal 10 singular values, and 10 row vectors Of 「 . This correlates tO a storage age savings again. This matr1X reqtllres stormg 1 0 column vectors Of し , approximation t0 , 4 is depicted ⅲ Figure 9.2 (b). Let's 0k at the stor- Let's increase the rank Of our approximation. The closest rank 10 representation Of the onginal data. small fraction Of the 0 ロ g ⅲ 引 data! Great savings on storage, but not a great stormg only 13 58 numbers or 0.35 % 0f the original data. That's a very singular value, and 509 numbers from に (the first row). SO, ー reqmres whereas , can be stored with 648 numbers 什 om U (the first column),l storage savings. The onginal matnx stored 648 ( 509 ) = 329 , 832 numbers in Figure 9.2 (a). An advantage 0fthis low rank approximation can be in the A 648 by 509 pixel image (b) of AIbrecht Dürer's prmt Me ん 〃 勧 0 / . Figure 9.1 . The grayscale image (a) ofthe data contained in the matrix in ( 9 」 ). Can you tell which is which? print.ln (c) and (d), we see the closest rank 50 approximation and the original print. Figu re 9.2. The closest rank ー (a) and rank 1 0 (b) 叩 proximations to the Dürer

96 When Life is Linear 17 18 19 20 FINISH 16 ■ 一 ■ 6 7 8 9 10 4 3 2 1 5 START HERE Figure 10.3. A larger game of snakes and Ladders. Something about the board becomes evident when you ok at for mcreasing 〃 . Regardless 0fthe value 0f 〃 , the 1 ()th and Ⅱ th elements of vn equal 0. This means you never have a chance tO reach these squares. Take a moment and Ok at the board. lt was constructed for this tO happen. One could also find squares that are more and less likely to be reached. This could help you determine rewards t0 offer on different squares. ln the end, Markov chains can tell you a lot about a game—even helping you lmprove or design it. Break out your board games, see which can be modeled with a Markov chain, and answer your own questions and maybe add your own rules! 10.2 GoogIe's Rankings ofWeb Pages Search engines like Google's are big business. ln 2005 , Goog に founders Larry Page and Sergey Brm each had a net worth Of more than 10 billion dollars. Less than 10 years earlier in 1998 , the duo had dropped out of graduate school at Stanford and were working out 0f a garage on their search engine business. There iS alSO big business for businesses ln search engines. HOW often dO you search the lnternet when shopping or researching items tO purchase? The ー ″ Street ノ 0 Ⅲ ・ 〃 記 reported that 39 % ofweb users ok at only the first search result returned from a search engine and 29 % view only a few results.

115 Mining fO 「 Meaning Table 11.1. Ratings 可 、 Ⅲ ・ 0 〃 Ov 夜 ・ Six Mo ⅵ い . Melody Mike Lydia 5 4 3 3 5 5 Sam Movie ー Movie 2 Movie 3 Movie 4 Movie 5 Movie 6 recommendations, you had Netflix's dataset Of users ratings, which are inte- gers from 1 t0 5 , for all movies. Then, your program would give an anticipated rating for films for a user. This isn't recommending a film, it is supplying a prediction for how a film will be rated by a user. the competition, Netflix supplied data on which you could test your ideas. When you thought you had something, you'd test your recommenda- tion method by predicting ratings ofmowes and users ln another dataset that had actual ratings Of movies. げ your predictions were at least 10 % better than the recommendation system Netflix used, Netflix would wrlte a check for a million dollars! TO dO our analysis, we'll store the data, not surpnsingly, ⅲ a matr1X. A column one user's ratings for all the movles with a 0 being a movie that wasn't rated. SO, a row contains all the ratings for one mowe. When the Netflix competition was announced, initial work quickly led tO improvement over the existing recommendation system. lt didn't reach the magic 10 % but the stndes were impressive, nonetheless. The key was the SVD, which we've seen and used earlier. We saw in Chapter 9 how the SVD can be used in data compresslon where a lot 0f data is expressed by SO, let's represent our recommendation data in compressed form and use that t0 d0 our analysis. Suppose we have Sam, Me10dy, Mike, and Lydia recommending SIX mOV1es as seen in Table 1 1.l Ⅵ で store the data in a matrlx with six rows and four columns 5 5 0 5 0 3 5 4 0 3 3 4 5 3 0 0 5 4 4 5 5 4 5 5 less.

6 lt's EIementary, My Dear Watson 6 」 Visual Operation 6.2 Being Cryptic 7 Math to the Max . 7.1 Dash ofMath 7.2 Linear Path to CoIIege 7.3 Going Cocoa for Math 8 Stretch and Shrink . 8.1 Getting Some Definition 8.2 Getting Graphic 8.3 Finding Groupies 8.4 Seeing the Pr1ncipal 9 Zombie Math—Decomposing ・ 9.1 A Singularly VaIuabIe Matnx Decomposition 9.2 Feeling Compressed 9.3 ln a Blur 9.4 Losing Some Memory 10 What Are the Chances? . 10.1 Down the Chute 10.2 Google's Rankings of Web Pages 10.3 EnJOYing the Chaos Ⅱ Mining for Meaning . 11.1 Slice and Dice 1 1 .2 Movie with not Much Dimens10n 11.3 Presidential Library of Eigenfaces 11.4 Recommendation—Seeing Stars 12 Who's Number 1 ? . 12.1 Getting Massey 12.2 CoIIey Method 12.3 Rating Madness 12.4 March MATHness 12.5 Adding Weight to the Madness 12.6 World Cup Rankings 13 End ofthe Line . B ibli ogr 叩 hy . lndex Contents 44 46 50 55 55 60 64 69 69 71 72 76 81 86 88 90 92 92 96 101 . 106 106 1 19 121 121 123 125 127 . 131 . 133 . 135

50 When Life is Linear After zeroing out all the elements in the first column under the main diagonal, we got the matr1X system 26 ー 39 The values in the second and last rows changed because they were 引 so affected by the addition of a multiple of the first row. SO, the n 引 process of Gaussian elimination on the image ⅲ Fig- ure 6.5 (a) produces the image in (b). ln the last three sectlons, we've seen three types of row operations needed t0 solve a linear system. Amazingly, we only need these three oper- at10ns and no more. At one level, SOlVing a linear system can seem simple. Keep in mind, though, the process Of solving a linear system is a common and important procedure in scientific computing. ln the next section, we apply linear algebra t0 cryptography. っ ~ -4 1 1 0 0- 6.2 Being Cryptic Billions Of dollars are spent on online purchases resulting in credit card numbers flying through the lnternet. For such transactlons, you want to be on a secure site. Secur1ty comes from the encryptlon Of the data. Ⅵ 市 i 厄 essentially gibbensh for almost anyone, encrypted data can be decrypted by the receiver. Why can't others decipher it? Broadly speaking, many of the most secure encryption techniques are based on factorlng really huge numbers. How big? l'm referrmg to a number of the size of 1 quattuorvig- intillion, which is 10 t0 the 75th power. Keep ⅲ mind that the number of atoms in the observable universe is estimated tO be 10 tO the 80th power. Such techniques rely heavily on number theory, which as we'll see in this sectlon can overlap with linear algebra. Let's start with one Of simplest encryption methods named the Caesar cipher after Julius Caesar. TO begin, letters are enumerated in alphabetical order from 0 to 25 as seen below, which will also be helpful for reference. 0 わ 一 6 一 0 ・ 」 9 8 12 16 17 18 円 20 21 22 23 24 25 14 15

82 When Life is Linear matr1X. Let'S consider a matr1X that has more rows than columns: 1 4 5 6 7 8 9 10 1 1 0 Performing the SVD on a matr1X returns three matrlces, which are denoted U, ン and に For 召 , our SVD calculator would calculate ー 0.1520 ー 0.3940 ー 0.6359 ー 0.6459 2 L0244 0 0 ー 0.6012 ー 0.3096 ー 0.7367 0.2369 0.3626 0.4883 ー 0.7576 0 7.98 Ⅱ 0.8684 0.2160 ー 0.4365 0.0936 0 0 an d 0 0.5255 ー 0.6881 ー 0.2682 0.6742 ー 0.4064 0.9122 ー 0.0 引 8 The product し will equal B, where U is a matr1X with the same number of rows and columns as B and 「 and ! will have the same number of columns as U. Further, and ! have the same number ofrows as columns. ! iS a d / 4g0 〃 / 川 4 な ⅸ , WhiCh means it only contmns nonzero values on the diagonal, which are called the 豆 〃 g ″ / の ・ Ⅷ ん . We will assume that the singular values 0f are ordered om highest t0 lowest with the highest appearmg ⅲ the upper lefthand corner 0fthe matnx. lt is interesting that the columns Of U and the rows Of / 7 ' in the SVD are related tO our computatlons for PCA in Section 8.4. While the matr1X product U ! 「 equals B, the three matnces can be used tO approximate B, but that's getting a bit ahead Of ourselves. Before discussing the approximation ofmatrlces, let us think a bit about the approximation Of numbers. What dO we mean when we say a number a good approximation tO another number? Generally, we are referring tO distance. For example, 3.1111 would be considered a closer approximatlon to 兀 than 3.0. Similarly, we can define distance for matrices. One such measure is the Frobenius norm, which is denoted as ⅱ 川 レ , defined as the square root of

61 Math the Max —a linear system, strai ghtfo ハ vard 54 86 89 41 92 86 81 94 63 一 1 9 一 一 4 8 一 マ ′ 8 S01ving, we find that 0.1165 月 B 0.2284 C 0.6187 ls this the scaling used? fact, no. The weights were 0.2 0.3 、 VhiCh were not recovered since the exact score was not reported. For instance, 0.2 ( 54 ) 十 0.3 ( 86 ) 十 0.5 ( 89 ) = 81.1 , which was reported as 81. The rounding from 81.1 (computed value) t0 81 (reported value) caused us t0 find different weights ⅲ our calculation. Still, this gave a good sense 0f the weights and especially their relative importance. For example, raismg freshman retention by 1 % will result in a higher overall score than ratsing the percent 0f classes with fewer than 20 students even by 2 %. Now, suppose another college, U2, reported data 0f 71 , 79 , and 89 for percent 0f classes with fewer than 20 students, percent 0f faculty that are full-time, and freshman retention, respectively. U2 's score would be 82. Since the formula involves three unknowns , 召 , and C, we need only the data for three schools, which we 」 ust used. But, we could use U2's data and overall score tO check our method. Using our earlier computed weights, 0.1165 ( 71 ) 十 0.2284 ( 79 ) 十 ( 0.6187 ) 89 = 8L3813 , which affrms that our weights are close, although not exact. Let's try this type 0f approach on the し & ル 硼 & ル 初 ・ / d 火 0 data from 2 田 3 for nationalliberal arts schools ranked in the top 25 , found at the end of the ch 叩 ter in Table 7.5. The data contains information on the college's overall score as measured on itS academic reputation, selectivity rank, SAT (VM) 25th -75 percentile, percent 0f freshmen in top 10 % 0f their high schOOl class, acceptance rate, faculty resource rank, percent Of classes with fewer than 20 , percent Of classes with greater than or equal to 50 students, student/faculty ratio, percent 0f faculty that are full-time, graduation retentlon rank, freshman retention, financial resources rank and