QR decomposition, also known as QR factorization, is a method for decomposing a matrix into the product of an orthogonal matrix and an upper-triangular matrix. It is a useful tool for solving systems of linear equations, computing the inverse of a matrix, and computing the singular value decomposition (SVD) of a matrix. In this blog […]
Python Tips
How to solve system of linear equations with Numpy
In this tutorial, we will learn how to solve a system of linear equations in Python using Numpy. We will see two examples, first with a system of linear equations with two unknowns and. two variables. And the with a system of linear equations with three unknowns and three equations. We will use Numpy’s linalg.solve() […]
How to generate random numbers from Poisson distribution with Numpy
In this post, we will learn how to use Numpy’s Random Generator class to generate random numbers sampled from Poisson distribution using poisson function in Numpy. The Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space satisfying two […]
How to generate random numbers from Normal distribution in Numpy
In this post, we will learn how to generate random numbers from normal distribution in Numpy. A normal distribution, also known as the Gaussian distribution, is a continuous probability distribution that is symmetric around the mean, with most of the data points concentrated within three standard deviations of the mean. Normal distribution is one of […]
How to Randomly permute Numpy Array
In this post, we will learn how to permute or randomize a 1D array and 2D Numpy Array using Numpy. We will use Numpy’s Random Generator class to create generator object with default_rng() and use permutaion() function on the object to permute. Let us get started by importing Numpy. The basic syntax of Numpy’s permutation […]