Gaurav Kumar has Published 49 Articles

What is the use of scipy.interpolate.interp1d class of SciPy python library?

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 11:48:18

180 Views

The scipy.interpolate.interp1d(x, y, kind, axis, copy, bounds_error, fill_value, assumesorted) class of SciPy library, as name implies, is used to interpolate a 1-Dimensional function. Here, x and y are the arrays of values which are used to approximate some function, say f; y=f(x). The output of this class is a function ... Read More

What is the difference between SciPy and NumPy?

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 11:47:50

1K+ Views

NumPy, stands for Numerical Python, is used for the manipulation of elements of numerical array data. SciPy, stands for Scientific Python, is used for numerical computations in Python. Both these packages provide extended functionality to work with Python. Let’s understand some basic differences between NumPy and SciPy −Functional differences − NumPy ... Read More

SciPy is built upon which core packages?

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 11:47:25

107 Views

SciPy is built upon the following core packages −Python − Python, a general-purpose programming language, is dynamically typed and interpreted. It is well suited for interactive work and quick prototyping. It is also powerful to write AI and ML applications.NumPy − NumPy is a base N-dimensional array package for SciPy that allows ... Read More

How do I install Python SciPy?

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 11:35:14

428 Views

We can install Python SciPy with the help of following methods −Scientific Python Distributions − There are various scientific Python distributions that provide the language itself along with the most used packages. The advantage of using these distributions is that they require little configuration and work on almost all the setups. ... Read More

What are various sub-packages in Python SciPy library?

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 11:29:20

687 Views

To cover different scientific computing domains, SciPy library is organized into various sub-packages. These sub-packages are explained below −Clustering package (scipy.cluster) − This package contains clustering algorithms which are useful in information theory, target detection, compression, communications, and some other areas also. It has two modules namely scipy.cluster.vq and scipy.cluster.hierarchy. As ... Read More

What is SciPy and why should we use it?

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 11:27:50

297 Views

SciPy, pronounced as “Sigh Pie”, is an ecosystem of Python open-source libraries for performing Mathematical, Scientific, and Engineering computations. SciPy stands for Scientific Python and is comprised of the following core packages, called SciPy ecosystem −NumPy − NumPy is a base N-dimensional array package for SciPy that allows us to efficiently ... Read More

Calculating the Minkowski distance using SciPy

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 10:38:44

450 Views

The Minkowski distance, a generalized form of Euclidean and Manhattan distance, is the distance between two points. It is mostly used for distance similarity of vectors. Below is the generalized formula to calculate Minkowski distance in n-dimensional space −$$\mathrm{D= \big[\sum_{i=1}^{n}|r_i-s_i|^p\big]^{1/p}}$$Here, si and ri are data points.n denotes the n-space.p represents ... Read More

Calculating the Manhattan distance using SciPy

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 10:24:49

642 Views

The Manhattan distance, also known as the City Block distance, is calculated as the sum of absolute differences between the two vectors. It is mostly used for the vectors that describe objects on a uniform grid such as a city block or chessboard. Below is the generalized formula to calculate ... Read More

Calculating Euclidean distance using SciPy

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 10:24:02

530 Views

Euclidean distance is the distance between two real-valued vectors. Mostly we use it to calculate the distance between two rows of data having numerical values (floating or integer values). Below is the formula to calculate Euclidean distance −$$\mathrm{d(r, s) =\sqrt{\sum_{i=1}^{n}(s_i-r_i)^2} }$$Here, r and s are the two points in Euclidean ... Read More

Implementing K-means clustering of Diabetes dataset with SciPy library

Gaurav Kumar

Gaurav Kumar

Updated on 14-Dec-2021 08:59:17

615 Views

The Pima Indian Diabetes dataset, which we will be using here, is originally from the National Institute of Diabetes and Digestive and Kidney Diseases. Based on the following diagnostic factors, this dataset can be used to place a patient in ether diabetic cluster or non-diabetic cluster −PregnanciesGlucoseBlood PressureSkin ThicknessInsulinBMIDiabetes Pedigree ... Read More

Advertisements