0% found this document useful (0 votes)
10 views

Assignment-1 MLDS Lab

This document discusses creating and visualizing neural networks in Python. It provides an overview of neural networks and their goals, as well as two methods for creating neural networks from scratch or using libraries. It also introduces the ANN Visualizer library for visualizing neural networks with a single line of code using Keras and Graphviz. The objectives are to handle given data for creating and visualizing a neural network using Python.

Uploaded by

Amruta More
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Assignment-1 MLDS Lab

This document discusses creating and visualizing neural networks in Python. It provides an overview of neural networks and their goals, as well as two methods for creating neural networks from scratch or using libraries. It also introduces the ANN Visualizer library for visualizing neural networks with a single line of code using Keras and Graphviz. The objectives are to handle given data for creating and visualizing a neural network using Python.

Uploaded by

Amruta More
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment - 1

Title: Creating and visualizing neural networks for the given data.

Objectives:

1. To handle given data for creating and visualizing neural network.


2. To analyze data using a python programming language.

Theory:

Neural network was inspired by the design and functioning of human brain and
components

Neural Network

A neural network is inexactly founded on how the human cerebrum functions: numerous neurons
associated with different neurons, going data through their associations and terminating when the
contribution to a neuron outperforms a specific edge. Our fake brain organization will comprise
counterfeit neurons and neurotransmitters with data passed between them. The neurotransmitters,
or associations, will be weighted by the neuron's solidarity of effect on deciding the result. These
synaptic loads will go through a streamlining cycle called backpropagation. For every cycle
during the preparation interaction, backpropagation will be utilized to revisit the layers of the
organization and changes the loads as per their commitment to the brain net's blunder.

Neural networks are self-upgrading capacities that guide contributions to the right results. We
can then put another contribution to the capacity, where it will foresee a result in light of its
capacity with the preparation information.

Neural Net's Goal

This neural organization, like every brain organization, should realize the significant elements in
the information to deliver the result. Specifically, this brain net will be given an information
framework with six examples, each with three-element sections comprising zeros and ones
exclusively. For instance, one example in the preparation set might be [0, 1, 1]. The result of
each example will be a solitary one or zero. The result is not entirely set in stone by the number
in the primary component section of the information tests. Utilizing the previous model, the
result for [0, 1, 1] would be 0 because the main segment contains a zero. A model outline will be
given underneath to exhibit the result for each info test.

here are two methods for making a brain network in Python:

o From Scratch - this can be a decent learning exercise, as it will show you how brain
networks work starting from the earliest stage
o Utilizing a Neural Network Library - bundles like Keras and TensorFlow work on the
structure of brain networks by abstracting away the low-level code. Assuming that you're
now acquainted with how brain networks work, this is the quickest and least demanding
method for making one.

Regardless of which strategy you pick, working with a brain organization to make an
expectation is something very similar:

1. Import the libraries. For instance: import numpy as np


2. Define/make input information. For instance, use numpy to make a dataset and a variety
of information values.
3. Add loads and predisposition (if appropriate) to include highlights. These are learnable
boundaries, implying that they can be changed during preparation.

Weights = input boundaries that impact yield

Bias = an additional edge esteem added to the result.

4. Train the organization against known, great information to track down the right qualities
for the loads and inclinations.
5. Test the Network against a bunch of test information to perceive how it performs.
6. Fit the model with hyperparameters (boundaries whose values are utilized to control the
educational experience), compute precision, and make an expectation.

ANN Visualizer:
ANN Visualizer is a python library that enables us to visualize an Artificial Neural Network using
just a single line of code. It is used to work with Keras and makes use of python’s graphviz
library to create a neat and presentable graph of the neural network building.

Need 3 libraries for this demo


 keras
 ANNvisualizer
 graphviz

Install the library using the below commands:


pip3 install keras
pip3 install ann_visualizer
pip install graphviz

Visualize a Neural Network in Python using Graphviz


 Import module.
 Create a new object of Diagraph.
 Add node() and edge() into graph object.
 Save the source code with render() object.

Conclusion:

Here, we studied creating and visualizing neural network for the given data using
python.

You might also like