Numpy Articles

Page 44 of 81

Extracting the real and imaginary parts of a NumPy array of complex numbers

Rohan Singh
Rohan Singh
Updated on 10-Jul-2023 6K+ Views

In Python, we can extract the real and imaginary parts of a NumPy array of the complex number using the real and imag attributes of the array, respectively. Numpy is a Python library that is used for complex calculations and also provides support for complex numbers. In this article, we will understand how we can extract the real and imaginary parts separately of a complex number. Understanding Complex Number in Numpy In Numpy we represent a complex number as a combination of the real and imaginary parts using the complex data type. We can create a complex number in ...

Read More

Convert a NumPy array to a Pandas series

Gireesha Devara
Gireesha Devara
Updated on 30-May-2023 2K+ Views

A Numpy array is an N-dimensional array also called a ndarray, it is a main object of the NumPy library. In the same way, the pandas series is a one-dimensional data structure of the pandas library. Both pandas and NumPy are validly used open-source libraries in python. Below we can see the one-dimensional numpy array. NumPy array array([1, 2, 3, 4]) The pandas Series is a one-dimensional data structure with labeled indices and it is very similar to a one-dimensional NumPy array. Pandas Series: 0 1 1 2 2 3 ...

Read More

Convert a NumPy array to Pandas dataframe with headers

Gireesha Devara
Gireesha Devara
Updated on 30-May-2023 2K+ Views

Both pandas and NumPy are validly used open-source libraries in python. Numpy stands for Numerical Python. This is the core library for scientific computing. A Numpy array is a powerful N-dimensional array object which is in the form of rows and columns. NumPy array array([[1, 2], [3, 4]]) Pandas provide high-performance data manipulation and analysis tools in Python, it allows us to work with tabular data like spreadsheets, CSV, and SQL data. And it has data structures like DataFrame and Series that are mainly used for analyzing the data. DataFrame is a 2-dimensional labeled data structure used to ...

Read More

Ridge and Lasso Regression Explained

Premansh Sharma
Premansh Sharma
Updated on 13-Apr-2023 21K+ Views

Introduction Two well-liked regularization methods for linear regression models are ridge and lasso regression. They help to solve the overfitting issue, which arises when a model is overly complicated and fits the training data too well, leading to worse performance on fresh data. Ridge regression reduces the size of the coefficients and prevents overfitting by introducing a penalty element to the cost function of linear regression. The squared coefficient total is directly proportional to this penalty component. Adversely, a penalty term is added in lasso regression that is proportionate to the total of the absolute values of the coefficients. This ...

Read More

How To Access Different Rows Of A Multidimensional Numpy Array?

Shashank Dharasurkar
Shashank Dharasurkar
Updated on 28-Mar-2023 2K+ Views

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

DeepWalk Algorithm

Mithilesh Pradhan
Mithilesh Pradhan
Updated on 23-Mar-2023 744 Views

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
Parth Shukla
Updated on 16-Jan-2023 27K+ Views

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
Mithilesh Pradhan
Updated on 30-Dec-2022 2K+ Views

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
Mithilesh Pradhan
Updated on 30-Dec-2022 764 Views

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
Sohail Tabrez
Updated on 27-Dec-2022 2K+ Views

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
Showing 431–440 of 802 articles
« Prev 1 42 43 44 45 46 81 Next »
Advertisements