Niharika Aitam has Published 168 Articles

Compute the weighted average of a given NumPy array

Niharika Aitam

Niharika Aitam

Updated on 09-Aug-2023 09:53:37

514 Views

Weighted average is a type of average in which each array element will be multiplied by a weight factor before calculating the mean of the data elements. The weight of each data point determines its contribution to all its overall average. Calculating weighted average This is used to calculate ... Read More

Compute the Reciprocal for all elements in a NumPy array

Niharika Aitam

Niharika Aitam

Updated on 09-Aug-2023 09:50:48

209 Views

The reciprocal of a number is defined as the multiplicative inverse of that number, when we have a non-zero number ‘a’ then the reciprocal of ‘a’ will be ‘b’, Hence, a * b = 1. In other words, reciprocal of ‘a’ is given as ‘1/a’. The reciprocal() function We can ... Read More

Compute the outer product of two given vectors using NumPy in Python

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 19:35:47

152 Views

The Outer product of two vectors is the matrix obtained by multiplying each element of the vector A with each element in the vector B. The outer product of the vectors a and b is given as a ⊗ b. The following is the mathematical formula for calculating the outer ... Read More

Compute the median of the flattened NumPy array

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 18:17:02

56 Views

MedianThe median is the statistical measure for the central tendency that represents the middle value of the sorted list of values. In other words, we can say that the median is the value which separates the upper half of the dataset from the lower half of the dataset. The ... Read More

Compute the mean, standard deviation, and variance of a given NumPy array

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 18:08:11

189 Views

Mean, Standard Deviation and Variance are the statistical measures which are used to describe the distribution of the given dataset data. In Numpy library, we have the functions to calculate the mean, standard deviation and variance of the arrays. Let’s see one by one in detail. Mean Mean is also ... Read More

Compute the inverse of a matrix using inv() function of NumPy

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 18:02:58

65 Views

The inverse matrix is a matrix that gives a multiplicative identity when multiplied with its original matrix. It is denoted by A-1. The inverse matrix can be calculated for the square matrices with the n x n size. The mathematical formula given for calculating the inverse matrix is as ... Read More

Compute the inner product of vectors for-D arrays using NumPy in Python

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 17:44:42

97 Views

Inner product is one of the most important operations in the linear algebra mathematical operations, which takes two vectors as input and gives the scalar value as the output. It is also known as the Dot product or the scalar product. The inner product of the two vectors is given ... Read More

Compute the histogram of nums against the bins using NumPy

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 17:41:41

66 Views

In python, for creating histograms we have the numpy, matplotlib and seaborn libraries. In Numpy, we have the function namely histogram() to work with the histogram data. The input argument for the histogram() function is the nums and bins. The nums are used to create the numerical data. Before proceeding ... Read More

Compute the histogram of a set of data using NumPy in Python

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 17:39:36

91 Views

A Histogram is the graphical representation of the dataset distribution. It represents the data in the form of series of bars, where the range of data values represented by each bar and height of the bar represents the frequency of the data values defined within the range. These are mainly ... Read More

Compute the factor of a given array by Singular Value Decomposition using NumPy

Niharika Aitam

Niharika Aitam

Updated on 07-Aug-2023 17:36:42

92 Views

Singular Value Decomposition (SVD) is the matrix factorization technique which divides the matrix into three parts namely left singular matrix, a diagonal singular matrix and right singular matrix. SVD is powerful tool used in linear algebra and it has number of applications in data analysis, machine Learning and signal ... Read More

Advertisements