Found 1132 Articles for Numpy

How To Access Different Rows Of A Multidimensional Numpy Array?

Shashank Dharasurkar
Updated on 28-Mar-2023 18:04:14
NumPy Multidimensional Arrays As the name suggests, Multidimensional Arrays are a technique that can be described as a way of defining and storing data in a format that has more than two dimensions (2D). Python allows the implementation of Multidimensional Arrays by nesting a list function inside another list function. Here are some examples on how we can create single and multidimensional arrays in Python using Numpy. Single Dimensional Array Example import numpy as np simple_arr = np.array([0, 1, 2, 3, 4]) print(simple_arr ) Output [0 1 2 3 4] Algorithm Import the NumPy library Use ... Read More

Region and Edge Based Segmentation

Mithilesh Pradhan
Updated on 23-Mar-2023 17:00:52
Introduction Image Segmentation is the process of dividing a digital image into smaller groups so that processing and analyzing the larger images becomes easier and simpler. Region and Edge-based segmentation are different types of Image Segmentation. Before diving into Region and Edge based Segmentation, let us have a brief overview of how segmentation is done. Image Segmentation In simpler terms, segmentation is the process of assigning specific labels to pixels in an image. A group of pixels with the same label become a segment of the larger image. For example, below are two images with their segmentation. In the ... Read More

DeepWalk Algorithm

Mithilesh Pradhan
Updated on 23-Mar-2023 16:17:07
Introduction The graph is a very useful data structure that can represent co-interactions. These co-interactions can be encoded by neural networks as embeddings to be used in different ML Algorithms. This is where the DeepWalk algorithm shines. In this article, we are going to explore the DeepWalk algorithm with a Word2Vec example. Let us learn more about Graph Networks on which the core of this algorithm is based. The Graph If we consider a particular ecosystem, a graph generally represents the interaction between two or more entities. A Graph Network has two objects – node or vertex and edge. ... Read More

Correlation Between Categorical and Continuous Variables

Parth Shukla
Updated on 16-Jan-2023 12:43:41
Introduction In machine learning, the data and the knowledge about its behavior is an essential things that one should have while working with any kind of data. In machine learning, it is impossible to have the same data with the same parameters and behavior, so it is essential to conduct some pre-training stages meaning that it is necessary to have some knowledge of the data before training the model. The correlations are something every data scientist or data analyst wants to know about the data as it reveals essential information about the data, which could help one perform feature engineering ... Read More

Implementation of Whale Optimization Algorithm

Mithilesh Pradhan
Updated on 30-Dec-2022 11:29:40
Introduction Whale Optimization Algorithm is a technique for solving optimization problems in Mathematics and Machine Learning. It is based on the behavior of humpback whales which uses operators like prey searching, encircling the prey, and forging bubble net behavior of humpback whales in the ocean. It was given by Mirjalili and Lewis in 2016. In this article, we are going to look into the different phases of the WOA algorithm A History of Humpback Whales Humpback whales are one of the largest mammals on Earth. They have a special type of hunting mechanism known as the bubble−net hunting mechanism. They ... Read More

Image Recognition using MobileNet

Mithilesh Pradhan
Updated on 30-Dec-2022 11:25:08
Introduction The process of identifying an object or feature with an image is known as Image Recognition. Image recognition finds its place in diverse domains be it Medical imaging, automobiles, security, or detecting defects. What is MobileNet and Why is it so Popular? MobileNet is deep learning CNN model developed using depth−wise separable convolutions. This model highly decreases the number of parameters when compared to other models of the same depth. This model is lightweight and is optimized to run on mobile and edge devices. There are three versions of Mobilenet released so far.ie MobileNet v1, v2 and v3. Mobilenet ... Read More

Simple Linear Regression in Machine Learning

Sohail Tabrez
Updated on 27-Dec-2022 11:20:14
Introduction: Simple Linear Regression The "Supervised Machine Learning" algorithm of regression is used to forecast continuous features. The simplest regression procedure, linear regression fits a linear equation or "best fit line" to the observed data in an effort to explain the connection between the dependent variable one and or more independent variables. There are two versions of linear regression depending on the number of characteristics used as input Multiple Linear Regression Simple Linear Regression In this article, we will be exploring the concept of Simple Linear Regression. Simple Linear Regression Model A form of regression method called simple ... Read More

Convert a polynomial to Hermite_e series in Python

AmitDiwan
Updated on 11-Mar-2022 05:35:07
To convert a polynomial to a Hermite series, use the hermite_e.poly2herme() method in Python Numpy. Convert an array representing the coefficients of a polynomial ordered from lowest degree to highest, to an array of the coefficients of the equivalent Hermite series, ordered from lowest to highest degree. The method returns a 1-D array containing the coefficients of the equivalent Hermite series. The parameter pol, is a 1-D array containing the polynomial coefficientsStepsAt first, import the required library −import numpy as np from numpy.polynomial import hermite_e as HCreate an array using the numpy.array() method −c = np.array([1, 2, 3, 4, 5])Display ... Read More

Convert a Hermite_e series to a polynomial in Python

AmitDiwan
Updated on 11-Mar-2022 05:33:16
To convert a Hermite_e series to a polynomial, use the hermite_e.herme2poly() method in Python Numpy. Convert an array representing the coefficients of a Hermite_e series, ordered from lowest degree to highest, to an array of the coefficients of the equivalent polynomial (relative to the “standard” basis) ordered from lowest to highest degree. The method returns a 1-D array containing the coefficients of the equivalent polynomial (relative to the “standard” basis) ordered from lowest order term to highest. The parameter c, is a 1-D array containing the Hermite series coefficients, ordered from lowest order term to highest.StepsAt first, import the required ... Read More

Remove small trailing coefficients from Hermite_e polynomial in Python

AmitDiwan
Updated on 11-Mar-2022 05:31:14
To remove small trailing coefficients from Hermite_e polynomial, use the hermite_e.hermetrim() method in Python Numpy. The method returns a 1-d array with trailing zeros removed. If the resulting series would be empty, a series containing a single zero is returned.The “Small” means “small in absolute value” and is controlled by the parameter tol; “trailing” means highest order coefficient(s), e.g., in [0, 1, 1, 0, 0] (which represents 0 + x + x**2 + 0*x**3 + 0*x**4) both the 3-rd and 4-th order coefficients would be “trimmed. The parameter c is a 1-d array of coefficients, ordered from lowest order to ... Read More
1 2 3 4 5 ... 114 Next
Advertisements