###### Instructor solution

###### Cosine similarity formula

###### Cosine similarity example clip

You may exit out of this review and return later without penalty.

You can use this assignment in your class!

Cosine Similarity Practice

*1.*What is cosine similarity?*2.*Write a function to perform cosine similarity in Python.*3.*What is meant if the cosine of two words is 1?*4.*What's the cosine similarity between [-3, 3, 4] and [2, -5, -1]?*5.*What's the cosine similarity between [-68, -92, 21, -19, 54] and [28, 32, 51, -78, -10]?*6.*What's the cosine similarity between [86, -36, -34, -51] and [51, 67, 27, 52]?*7.*What's the cosine similarity between [-53, 81, 96, 3] and [3, 49, 93, -1]?*8.*What's the cosine similarity between [24, 52, -49, -95, 6, -51] and [-87, -20, -51, -34, 50, -47]?*9.*What's the cosine similarity between [-76.81, 5.51] and [44.62, 36.53]?*10.*What's the cosine similarity between [-48, 19, -93, -75] and [74, -73, 12, -37]?*11.*What's the cosine similarity between [-86, 36, 44] and [-68, -70, 76]?*12.*What's the cosine similarity between [89, -6, -93, -47, 65, 94] and [32, -90, 24, 1, -39, -26]?*13.*What's the cosine similarity between [-96.9, -61.6] and [24.7, -14.0]?*14.*What's the cosine similarity between [72, 52, 60] and [-3, -53, 18]?*15.*What's the cosine similarity between [93, 44, -1] and [59, -26, -99]?*16.*What's the cosine similarity between [-27.8, 27.8, -13.6] and [-13.4, -12.3, 16.9]?*17.*What's the cosine similarity between [-76, -50, -74, 80] and [-65, -57, -99, -74]?*18.*What's the cosine similarity between [-67, 18, 3, -1, -38] and [-72, 71, -5, -65, -2]?*19.*What's the cosine similarity between [12, -44, 48, 82, -83] and [-69, -65, -86, -41, 34]?*20.*What's the cosine similarity between [59, -13, -19, 14] and [-20, -9, 88, 96]?*21.*What's the cosine similarity between [31, 28, 81, 4, -48, -4] and [-67, 1, -94, 3, -82, -26]?*22.*What's the cosine similarity between [-79, 45, 1, 28, -93, -88] and [-66, 87, -20, -59, 32, 57]?*23.*What's the cosine similarity between [-81, -39, -16, 0, -54, -27] and [-40, -23, 93, -88, 82, 50]?*24.*What's the cosine similarity between [-61.6, -88.07] and [16.71, -44.59]?*25.*What's the cosine similarity between [-23, 34, 29, 43, 7] and [77, -40, 43, -93, 89]?*26.*What's the cosine similarity between [-4, -34] and [-40, 83]?*27.*What's the cosine similarity between [-7, -71, -30, -55, 31] and [37, -27, 1, 19, 59]?*28.*What's the cosine similarity between [74, -26] and [-64, -56]?*29.*What's the cosine similarity between [-30, -18, 55, 40, 36] and [-89, -2, 16, 1, 24]?*30.*What's the cosine similarity between [12, 88, 58] and [-27, 59, -18]?*31.*What's the cosine similarity between [-53, 0, -27, 70, 6, -56] and [-13, -87, -31, 46, 43, 72]?*32.*What's the cosine similarity between [-5, -96, 69, -45, 98] and [-37, -9, 31, -31, 61]?*33.*What's the cosine similarity between [-87, 36, 51, -93] and [-25, 98, -35, -97]?*34.*What's the cosine similarity between [5, -30, 86, 31, 69, -24] and [-13, 59, 6, 61, -15, -35]?*35.*What's the cosine similarity between [64, 46, 30, 78] and [76, 77, 12, 80]?*36.*What's the cosine similarity between [-80, 2, -68, 45, 9, -45] and [50, -61, 78, 53, -18, 70]?*37.*What's the cosine similarity between [68, 53, 2] and [14, -45, 17]?*38.*What's the cosine similarity between [-26, -57, 88] and [16, 68, -12]?*39.*What's the cosine similarity between [72, 26, -42, -3] and [-73, -4, -11, 85]?*40.*What's the cosine similarity between [20, 46, 16, -92, -28, -10] and [76, -13, 9, 42, -5, 4]?*41.*What's the cosine similarity between [-45.98, 92.16] and [97.2, -85.0]?*42.*What's the cosine similarity between [65, -15, 66, 4] and [-33, 47, 60, -25]?*43.*What's the cosine similarity between [-55, 20, -87, 94] and [-53, 3, 8, 25]?*44.*What's the cosine similarity between [39, 41, -68, -61, -10, -1] and [8, 68, -70, -58, -63, -39]?*45.*What's the cosine similarity between [74, -60, 24, -45] and [-54, -86, -67, 63]?*46.*What's the cosine similarity between [28.29, 87.49, 15.93] and [-36.92, 88.5, -69.07]?*47.*What's the cosine similarity between [45.81, -25.07, 48.55] and [-43.7, 51.12, 5.14]?*48.*What's the cosine similarity between [47, -37] and [-79, -15]?*49.*What's the cosine similarity between [-45, 82, -21, 89, 96] and [-24, 53, 28, 19, -8]?*50.*What's the cosine similarity between [-19, -30] and [26, -17]?*51.*What's the cosine similarity between [31.5, -72.0, 21.8] and [-76.4, -79.6, -6.6]?*52.*What's the cosine similarity between [53, -8, 34, -94] and [-42, 78, 42, 77]?*53.*What's the cosine similarity between [-8, 14, 5, 25] and [-84, -37, -63, 9]?*54.*What's the cosine similarity between [-27, -21, 26] and [79, 71, -91]?*55.*What's the cosine similarity between [-51, -62, -71, 76, -31] and [97, -94, -51, 25, 76]?

By Instructor Alec Kretch (Apr 17, 2022)

You may exit out of this review and return later without penalty.