Found 47 Articles for Scientific Computing

Implementing K-means clustering with SciPy by splitting random data in 2 clusters?

Gaurav Kumar
Updated on 14-Dec-2021 08:42:53

295 Views

K-means clustering algorithm, also called flat clustering, is a method of computing the clusters and cluster centers (centroids) in a set of unlabeled data. It iterates until we find the optimal centroid. The clusters, we might think of a group of data points whose inter-point distances are small as compared to the distances to the point outside of that cluster. The number of clusters identified from unlabeled data is represented by ‘K’ in K-means algorithm.Given an initial set of K centers, the K-means clustering algorithm can be done using SciPy library by executing by the following steps −Step1− Data point ... Read More

Which SciPy package is used to implement Clustering?

Gaurav Kumar
Updated on 23-Nov-2021 12:49:59

103 Views

Clustering is one among the most useful unsupervised ML methods. It is used to find the relationship patterns and similarity among the input data samples. After finding these patterns, unsupervised algorithm clusters the data samples having similarities into groups as illustrated in the diagram below −Anomaly detection, image segmentation, medical imaging, social network analysis, and market segmentation are some common applications for clustering. K-means and Hierarchical are the two most common forms of clustering.To implement clustering, SciPy provides us a clustering package (scipy.cluster) which further has two modules as given below −scipy.cluster.vq module − This SciPy module provides functions for k-means ... Read More

To work with SciPy, do I need to import the NumPy functions explicitly?

Gaurav Kumar
Updated on 23-Nov-2021 12:39:42

206 Views

When SciPy is imported, you do not need to explicitly import the NumPy functions because by default all the NumPy functions are available through SciPy namespace. But as SciPy is built upon the NumPy arrays, we must need to know the basics of NumPy.As most parts of linear algebra deals with vectors and matrices only, let us understand the basic functionalities of NumPy vectors and matrices.Creating NumPy vectors by converting Python array-like objectsLet us understand this with the help of following example−Exampleimport numpy as np list_objects = [10, 20, 30, 40, 50, 60, 70, 80, 90] array_new = np.array(list_objects) print ... Read More

What is the difference between SciPy and NumPy?

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 has a faster processing speed than SciPy. The functions defined in NumPy library are not in depth whereas SciPy library consists of detailed versions of the functions. SciPy is built on NumPy and it is recommended to use both libraries altogether for fast and efficient scientific and mathematical computations.Array concept − ... Read More

SciPy is built upon which core packages?

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 us to efficiently work with data in numerical arrays. It is the fundamental package for numerical computation.Matplotlib − Matplotlib is used to create comprehensive 2-dimensional charts and plots from data. It also provides us basic 3-dimensional plotting.The SciPy library − It is one of the core packages providing us many user-friendly and ... Read More

What are various sub-packages in Python SciPy library?

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 the name entails, the first module i.e., vq module supports only vector quantization and k-meansalgorithms. Whereas the second module i.e., hierarchy module provides functions for agglomerative and hierarchical clustering.Constants(scipy.constants) − It contains mathematical and physical constants. Mathematical constants include pi, golden and golden_ratio. Physical constants include c, speed_of_light, planck, gravitational_constant, etc.Legacy ... Read More

What is SciPy and why should we use it?

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 work with data in arrays.Matplotlib − Matplotlib is used to create comprehensive 2-D charts and plots from data.Pandas − Pandas is an open-source Python package used to organize and analyze our data.Apart from SciPy ecosystem, there are other related but distinct entities SciPy refers to −Community − It refers to the community of ... Read More

Advertisements