Found 33676 Articles for Programming

How can Tensorflow be used to prepare the dataset with stackoverflow questions using Python?

AmitDiwan
Updated on 18-Jan-2021 12:08:02

138 Views

Tensorflow is a machine learning framework that is provided by Google. It is an open-source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes.The ‘tensorflow’ package can be installed on Windows using the below line of code −pip install tensorflowTensor is a data structure used in TensorFlow. It helps connect edges in a flow diagram. This flow diagram is known as the ‘Data flow graph’. Tensors are nothing but multidimensional array or a list. We are using the Google Colaboratory to run the below code. ... Read More

How can Matplotlib be used to create three-dimensional scatter plot using Python?

AmitDiwan
Updated on 18-Jan-2021 12:07:55

189 Views

Matplotlib is a popular Python package that is used for data visualization. Visualizing data is a key step since it helps understand what is going on in the data without actually looking at the numbers and performing complicated computations. It helps in communicating the quantitative insights to the audience effectively.Matplotlib is used to create 2 dimensional plots with the data. It comes with an object oriented API that helps in embedding the plots in Python applications. Matplotlib can be used with IPython shells, Jupyter notebook, Spyder IDE and so on.It is written in Python. It is created using Numpy, which ... Read More

How can Tensorflow be used to iterate through the dataset and display sample data using Python?

AmitDiwan
Updated on 18-Jan-2021 12:05:56

375 Views

Tensorflow is a machine learning framework that is provided by Google. It is an open-source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes. It has optimization techniques that help in performing complicated mathematical operations quickly. This is because it uses NumPy and multi-dimensional arrays. These multi-dimensional arrays are also known as ‘tensors’. The framework supports working with deep neural networks. It is highly scalable and comes with many popular datasets. It uses GPU computation and automates the management of resources. It comes with a ... Read More

Implement mean shift algorithm in Python

AmitDiwan
Updated on 18-Jan-2021 12:05:16

469 Views

There are many types of clustering algorithms in Machine Learning. These algorithms can be implemented in Python. In this article, let us discuss and implement the ‘Mean−Shift’ algorithm using Python. It is a clustering algorithm that is used as an unsupervised learning method.In this algorithm, no assumptions are made. This implies that it a non−parametric algorithm. This algorithm assigns data points to certain clusters iteratively, which is done by shifting these data points towards highest density of data points.This high density of data points is known as the centroid of the cluster. The different between Mean shift algorithm and K ... Read More

Check if all rows of a matrix are circular rotations of each other in Python

Yaswanth Varma
Updated on 30-Jul-2025 16:38:27

202 Views

Matrices are used to represent and manipulate structured data (such as grids, patterns). While working with matrix manipulation, we may find scenarios where to determine whether all the rows in a given matrix are circular rotations of one another. Circular Rotation in a Matrix A circular rotation of a list (or array) is a transformation where elements are shifted to the left (or right), and the element at the end will be wrapped around to the beginning. For example, if the original row is [1, 2, 3], its circular rotations are: [2, 3, 1] (left-rotated ... Read More

Check if all levels of two trees are anagrams or not in Python

Arnab Chakraborty
Updated on 18-Jan-2021 12:09:11

225 Views

Suppose, we are provided with two binary trees. We have to check if each level of a binary tree is an anagram of the other binary tree's same level. We return True if it is an anagram, otherwise we return False.So, if the input is like, then the output will be True.To solve this, we will follow these steps −tree_1 is the root node of the first tree and tree_2 is the root node of the second tree.if tree_1 is same as null and tree_2 is same as null, thenreturn Trueif tree_1 is same as null or tree_2 is same ... Read More

How can Tensorflow be used to load the dataset which contains stackoverflow questions using Python?

AmitDiwan
Updated on 18-Jan-2021 12:04:10

184 Views

Tensorflow is a machine learning framework that is provided by Google. It is an open-source framework used in conjunction with Python to implement algorithms, deep learning applications, and much more. It is used in research and for production purposes. It has optimization techniques that help in performing complicated mathematical operations quickly.This is because it uses NumPy and multi-dimensional arrays. These multi-dimensional arrays are also known as ‘tensors’. The framework supports working with a deep neural networks. It is highly scalable and comes with many popular datasets. It uses GPU computation and automates the management of resources. It comes with multitude ... Read More

Check if absolute difference of consecutive nodes is 1 in Linked List in Python

Arnab Chakraborty
Updated on 18-Jan-2021 12:04:45

143 Views

Suppose, we have a singly linked list where each node contains an integer value. We have to find out if the absolute difference between two successive nodes is 1.So, if the input is like start_node->5->6->7->8->7->6->5->4, then the output will be True.To solve this, we will follow these steps −temp := start_nodewhile temp is not null, doif temp.link is same as null, thencome out from the loopif |value of (temp) - value of (temp.link)| is not same as 1, thenreturn Falsetemp := temp.linkreturn TrueExampleLet us see the following implementation to get better understanding − Live Demoimport math class link_node:    def __init__(self, ... Read More

How can Matplotlib be used to three-dimensional line plots using Python?

AmitDiwan
Updated on 18-Jan-2021 12:03:03

164 Views

Matplotlib is a popular Python package that is used for data visualization. Visualizing data is a key step since it helps understand what is going on in the data without actually looking at the numbers and performing complicated computations.It helps in communicating the quantitative insights to the audience effectively. Matplotlib is used to create 2 dimensional plots with the data. It comes with an object oriented API that helps in embedding the plots in Python applications. Matplotlib can be used with IPython shells, Jupyter notebook, Spyder IDE and so on.It is written in Python. It is created using Numpy, which ... Read More

How can Matplotlib be used to create multiple plots iteratively in Python?

AmitDiwan
Updated on 18-Jan-2021 12:02:04

523 Views

Matplotlib is a popular Python package that is used for data visualization. Visualizing data is a key step since it helps understand what is going on in the data without actually looking at the numbers and performing complicated computations. It helps in communicating the quantitative insights to the audience effectively.Matplotlib is used to create 2 dimensional plots with the data. It comes with an object oriented API that helps in embedding the plots in Python applications. Matplotlib can be used with IPython shells, Jupyter notebook, Spyder IDE and so on.It is written in Python. It is created using Numpy, which ... Read More

Advertisements