Found 664 Articles for Machine Learning

How to add annotations in Matplotlib Plots?

Dev Prakash Sharma
Updated on 23-Feb-2021 14:50:37

312 Views

To specify the details of a plot, we use annotations. To create annotations in Matplotlib Plots, we can use the ‘annotate’ method.Exampleimport matplotlib.pyplot as plt import numpy as np #Let us create a plot and use annotation at the point (5,3), x = np.arange(0,4*np.pi,0.1) plt.plot(np.sin(x), 'b-*') a = plt.annotate("(3,0)", xy=(3, 0), xycoords='data', xytext=(4.0,0.5), textcoords='data', arrowprops=dict(arrowstyle="->", color="green", lw=5, connectionstyle=("arc3,rad=0."))) plt.setp(a, size=25) #Display the plot plt.show()Output

How to Capture a pick event and use it to activate or deactivate Line Plots in Matplotlib

Dev Prakash Sharma
Updated on 23-Feb-2021 14:52:11

398 Views

After enabling the pick event property of artists in Matplotlib, the task is to use the pick event to enable and disable the line plots for a given axis in a set of plots.In order to pick a specific line plot, we use Legend.We will use a Binary classification plot to create the ROC Curve. ROC curve or Receiver Operating Characteristics curve is used for diagnostics, weather prediction and other applications. It contains True Negative Rate (TPR) and False Positive Rate (FPR). Using ROC, we will create multiple plots of the curve.Let us Import the libraries first. Here ‘nbAgg’ is used ... Read More

How can TensorFlow Text be used to preprocess sequence modelling?

AmitDiwan
Updated on 22-Feb-2021 07:13:45

108 Views

TensorFlow Text contains collection of text related classes and ops that can be used with TensorFlow 2.0. The library helps in pre-processing which is required by text-based models, and includes other features that are needed for sequence modelling. These features are not present in TensorFlow.Using the ops during text pre-processing is similar to working with Tensorflow graph. This means the user wouldn’t need to worry about tokenization in training being different from tokenization at interference. Ops also helps in managing pre-processing scripts.It can be installed using the below command:pip install -q tensorflow-textTensorFlow Text requires TensorFlow 2.0, and is compatible with ... Read More

How can a Convolutional Neural Network be used to build learning model?

AmitDiwan
Updated on 22-Feb-2021 05:56:20

195 Views

A neural network that contains at least one layer is known as a convolutional layer. A convolutional neural network would generally consist of some combination of the below mentioned layers:Convolutional layersPooling layersDense layersConvolutional Neural Networks have been used to produce great results for a specific kind of problems, such as image recognition.  It is a Deep Learning algorithm that takes an image as input, assigns importance to it, i.e. the algorithm learns to assign weights and biases to values. This helps differentiate one object from the other.The amount of pre-processing required in a ConvNet is lesser than other classification algorithms. ... Read More

How can Tensorflow be used to download flower dataset into the environment?

AmitDiwan
Updated on 19-Feb-2021 17:20:43

301 Views

The flower dataset can be downloaded using a google API that basically links to the flower dataset. The ‘get_file’ method can be used to pass the API as a parameter. Once this is done, the data gets downloaded into the environment.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We will be using the flowers dataset, which contains images of several thousands of flowers. It contains 5 sub-directories, and there is one sub-directory for every class.  We are using the Google Colaboratory to run the below code. Google Colab or Colaboratory helps run Python code ... Read More

How can Keras be used to recreate the model and check its accuracy?

AmitDiwan
Updated on 21-Jan-2021 05:48:28

96 Views

Keras means ‘horn’ in Greek. Keras was developed as a part of research for the project ONEIROS (Open ended Neuro−Electronic Intelligent Robot Operating System). Keras is a deep learning API, which is written in Python. It is a high−level API that has a productive interface that helps solve machine learning problems.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.Keras runs on top of Tensorflow framework. It was built to help ... Read More

How can TensorFlow be used to configure the IMDB dataset to give good performance and create a model?

AmitDiwan
Updated on 19-Jan-2021 13:44:44

80 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.The ‘IMDB’ dataset contains reviews of over 50 thousand movies. This dataset ... Read More

How can the ‘Word2Vec’ algorithm be trained using Tensorflow?

AmitDiwan
Updated on 19-Jan-2021 13:42:20

129 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 network. It is highly scalable, and comes with many popular datasets. It uses GPU computation and automates the management of resources.The ‘tensorflow’ package can be installed ... Read More

What is Keras with respect to Tensorflow?

AmitDiwan
Updated on 19-Jan-2021 13:42:08

87 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 network. It is highly scalable, and comes with many popular datasets. It uses GPU computation and automates the management of resources.It comes with multitude of machine learning ... Read More

Explain how the logistic regression function works with Tensorflow?

AmitDiwan
Updated on 19-Jan-2021 13:39:28

131 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.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 ... Read More

Advertisements