Professional Documents
Culture Documents
45 - Linear Algebra - 1
45 - Linear Algebra - 1
Flight Route Plan: From Nagpur, 5 destinations (GHY, PATNA, JPR, GOA, Chennai)
Assumptions:
Longitude on x-axis and latitude on y-axis if we draw on graph. But if you write N/S (latitude) is first per
convention
Distance measurements = Haversine distance / great circle distance = but for now we assume flat
surface so take Euclidean distance
Source = np.array([Nagpur])
A vector is a quantity or phenomenon that has two independent properties: magnitude and direction.
The term also denotes the mathematical or geometrical representation of such a quantity.
Vector Space = i, j = any vector in R2 can be created by i, j = spaces is the span(=Linear combination) of
basis vector
similarity_mat = cosine_similarity(vectors)
idx = [‘A’, ‘B’, ‘C’, ‘D’, ‘E’]
sns.heatmap()
====
similarity_mat = cosine_similarity(sparse_pivot)
User ID 1 2 3 4 5
Movie 2
Independence
To break a vector into the components, the components need to be linearly independently.
Matrix is collection of vectors. A = m * n = m vectors of size n
(AB)T = BT * AT