Description
GitHub Classroom
Lab 4 – List and loops
Vector and matrix manipulation
Now that you know lists and loops you can start working on exciting linear algebra problems
Today, we will address two topics:
1. Dot product computation
2. Matrix averaging
The dot product is a mathematical operation that takes two vectors and produces a scalar value.
Maybe you are already familiar with the dot product?
• Do you know what a correlation is?
• Have you ever heard of attention in AI?
• Have you ever checked the orthogonality between two vectors?
How to compute the dot product?
Let’s compute the angle between two 3D vectors
Task 2: Matrix averaging
Matrix averaging, normalization or standardization is essential for many applications
1. Numerical stability: Normalizing matrices can prevent numerical errors when performing operations such as inversion, eigenvalue calculation, and matrix decomposition.
2. Comparability: Normalizing matrices can make it easier to compare them.
3. Regularization: Normalizing matrices can help prevent overfitting in machine learning models.
4. Preprocessing: Normalizing matrices is often an important preprocessing step in machine learning to improve performance.
Task 2: Matrix averaging
Now let’s average a matrix using nested loops!
Reviews
There are no reviews yet.