by Suf | Feb 5, 2022 | Programming, Python, Tips
The transpose of a matrix is a flipped version of the original matrix. We can transpose a matrix by switching its rows with its columns. We widely use the transpose of the matrix in linear algebra, physics, and computer science. This tutorial will go through how to...
by Suf | Feb 1, 2022 | Programming, Python, Tips
The factorial of a positive integer n is the multiplication operation of all integers smaller than or equal to n. The notation of the factorial is the exclamation mark, n!. For example, the factorial of 5 is: 5! = 5 * 4 * 3 * 2 * 1 = 120 This tutorial will go through...
by Suf | Jan 24, 2022 | Programming, Python, Tips
The Cartesian product of two sets A and B denoted A x B is the set of all possible ordered pairs (a, b), where a is in A and b is in B. We can get the Cartesian product between two lists saved as a 2D list in Python. This tutorial will go through different methods to...
by Suf | Dec 8, 2021 | Data Science, Programming, Python, Tips
Distances measures are essential tools for machine learning. A distance measure is a score that summarises how different two objects are in the problem domain. Usually, we calculate distance measures on rows of data, like strings representing text documents. Specific...