<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Python-for-Machine-Learning%2FC3%2FArtificial-Neural-Networks%2FEnglish</id>
		<title>Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Python-for-Machine-Learning%2FC3%2FArtificial-Neural-Networks%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;action=history"/>
		<updated>2026-05-13T07:28:27Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;diff=57048&amp;oldid=prev</id>
		<title>Madhurig at 14:38, 17 July 2025</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;diff=57048&amp;oldid=prev"/>
				<updated>2025-07-17T14:38:46Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:38, 17 July 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Hover over the files&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Hover over the files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| I have created Artificial neural networks. Ipynb file for the demonstration.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| I have created &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Artificial neural networks. Ipynb&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;file for the demonstration.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Press '''Ctrl+Alt+T '''keys&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Press '''Ctrl+Alt+T '''keys&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 134:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 134:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Artificial Neural Networks.ipynb''' file&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Artificial Neural Networks.ipynb''' file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| We can see the Jupyter Notebook Home page has opened in the web browser.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| We can see the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Jupyter Notebook Home&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;page has opened in the web browser.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Click the''' Artificial neural networks dot ipynb''' file to open it.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Click the''' Artificial neural networks dot ipynb''' file to open it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;diff=57044&amp;oldid=prev</id>
		<title>Madhurig at 09:49, 16 July 2025</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;diff=57044&amp;oldid=prev"/>
				<updated>2025-07-16T09:49:52Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;amp;diff=57044&amp;amp;oldid=57003&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;diff=57003&amp;oldid=prev</id>
		<title>Nirmala Venkat: Created page with &quot;     &lt;div style=&quot;margin-left:1.27cm;margin-right:0cm;&quot;&gt;&lt;/div&gt; {| border=&quot;1&quot; |- || '''Visual Cue''' || '''Narration''' |- || Show Slide: '''Welcome and Title Slide''' || Welcom...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Python-for-Machine-Learning/C3/Artificial-Neural-Networks/English&amp;diff=57003&amp;oldid=prev"/>
				<updated>2025-07-03T12:18:34Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;     &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt; {| border=&amp;quot;1&amp;quot; |- || &amp;#039;&amp;#039;&amp;#039;Visual Cue&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039; |- || Show Slide: &amp;#039;&amp;#039;&amp;#039;Welcome and Title Slide&amp;#039;&amp;#039;&amp;#039; || Welcom...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|| Show Slide: '''Welcome and Title Slide'''&lt;br /&gt;
|| Welcome to the Spoken Tutorial on''' Artificial Neural Networks'''&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|| In this tutorial, we will learn about&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;The fundamentals of '''Artificial Neural Networks (ANN)'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Implementing '''Multi- Layer Perceptron (MLP)''' classification &amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Evaluating the performance of a trained '''MLP''' model&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
|| To record this tutorial, I am using&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Ubuntu Linux 24.04'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Jupyter Notebook IDE'''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
|| To follow this tutorial,&lt;br /&gt;
&lt;br /&gt;
The learner must have basic knowledge of '''Python.'''&lt;br /&gt;
&lt;br /&gt;
For pre-requisite Python tutorials, please visit this website.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
Code-Files&lt;br /&gt;
||&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;The files used in this tutorial are provided in the '''Code files '''link.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Please download and extract the files.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Make a copy and use them while practicing.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Artificial Neural Network'''&lt;br /&gt;
||&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Artificial Neural Networks''' are models inspired by the human brain’s processing.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Neurons''' receive '''inputs''', adjust '''weights''', and pass''' outputs''' to other neurons.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''ANNs '''have '''input''', '''hidden''', and '''output''' layers to process and learn patterns.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Artificial Neural Network'''&lt;br /&gt;
||&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Each connection in '''ANN''' has a '''weight''' that helps it to make better predictions.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''ANNs''' learn by adjusting '''weights '''based on''' errors''' to improve accuracy.&amp;lt;/div&amp;gt;&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Multi-Layer Perceptron'''&lt;br /&gt;
||&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''MLP''' is a type of '''ANN''' with '''multiple hidden layers''' that enhance feature learning.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;It processes data through '''interconnected neurons''' in a forward direction.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''MLP''' is widely used for '''classification''' and''' regression''' tasks in machine learning.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''ANN Architecture'''&lt;br /&gt;
&lt;br /&gt;
'''arch.png'''&lt;br /&gt;
|| Let’s look at the architecture of an '''Artificial Neural Network'''.&lt;br /&gt;
&lt;br /&gt;
'''The Input Layer''' receives the data from the dataset.The number of input neurons matches the number of input features.'''Hidden Layers''' process these inputs through weighted connections.These layers help the network learn complex patterns.The number of hidden '''neurons''' depends on task complexity.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''ANN Architecture'''&lt;br /&gt;
&lt;br /&gt;
'''arch.png'''&lt;br /&gt;
|| '''The Output Layer''' produces the final prediction or classification.The number of '''output neurons''' matches the number of output classes.'''Weights''' are updated during training to optimize performance.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Artificial Neuron Model'''&lt;br /&gt;
&lt;br /&gt;
'''neuron.png'''&lt;br /&gt;
|| Now, let's break this down further by understanding a '''single neuron'''.&lt;br /&gt;
&lt;br /&gt;
Each''' neuron '''receives inputs along with a''' bias '''value.&lt;br /&gt;
&lt;br /&gt;
Each input has a '''weight''' that determines its importance.&lt;br /&gt;
&lt;br /&gt;
The '''summation function''' adds the '''weighted inputs''' and '''bias'''.&lt;br /&gt;
&lt;br /&gt;
The '''activation function''' decides the '''neuron’s''' output.&lt;br /&gt;
&lt;br /&gt;
The output is then passed to the next layer in the network.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Hover over the files&lt;br /&gt;
|| I have created Artificial neural networks. Ipynb file for the demonstration.&amp;quot;&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
&lt;br /&gt;
Type '''conda activate ml'''&lt;br /&gt;
&lt;br /&gt;
Press '''Enter'''&lt;br /&gt;
|| Let us open the Linux terminal by pressing '''Ctrl, Alt and T '''keys together.&lt;br /&gt;
&lt;br /&gt;
Activate the machine learning environment as shown.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| To go to the '''Downloads '''folder,&lt;br /&gt;
&lt;br /&gt;
Type '''cd Downloads'''&lt;br /&gt;
&lt;br /&gt;
Type '''jupyter notebook'''&lt;br /&gt;
|| I have saved my code file in the '''Downloads '''folder.&lt;br /&gt;
&lt;br /&gt;
Please navigate to the respective folder of your code file location.&lt;br /&gt;
&lt;br /&gt;
Then type, '''jupyter space notebook '''and press '''Enter.'''&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Jupyter Notebook Home Page:Click on&lt;br /&gt;
&lt;br /&gt;
'''Artificial Neural Networks.ipynb''' file&lt;br /&gt;
|| We can see the Jupyter Notebook Home page has opened in the web browser.&lt;br /&gt;
&lt;br /&gt;
Click the''' Artificial neural networks dot ipynb''' file to open it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#000000;&amp;quot;&amp;gt;Note that each cell will have the output displayed in this file.&amp;lt;/div&amp;gt;&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''import pandas as pd'''&lt;br /&gt;
'''import numpy as np'''&lt;br /&gt;
'''import matplotlib.pyplot as plt'''&lt;br /&gt;
'''import seaborn as sns'''&lt;br /&gt;
|| First, we import the necessary libraries for ANN.&lt;br /&gt;
&lt;br /&gt;
Make sure to Press '''Shift '''and '''Enter '''to execute the code in each cell.&lt;br /&gt;
&lt;br /&gt;
We will use the '''Breast Cancer Wisconsin''' dataset from '''sklearn''' library.&lt;br /&gt;
&lt;br /&gt;
The dataset has '''30 features''' describing breast tumor characteristics.&lt;br /&gt;
&lt;br /&gt;
The target variable is '''0''' for '''malignant tumors '''and '''1''' for '''benign tumors'''.&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''data = load_breast_cancer()'''&lt;br /&gt;
|| We load the dataset using the '''load underscore breast underscore cancer''' function.&lt;br /&gt;
&lt;br /&gt;
Then, we create a dataframe using a '''pd dot dataframe''' for data handling.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''bcancer_df.tail() '''&lt;br /&gt;
|| To inspect the dataset, we display the last five rows using the '''tail''' function.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Only narration&lt;br /&gt;
&lt;br /&gt;
Highlight&lt;br /&gt;
&lt;br /&gt;
'''bcancer_df.shape'''&lt;br /&gt;
|| The''' shape''' function returns the number of rows and columns in the dataframe.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''print(&amp;quot;Feature names:&amp;quot;, data.feature_names)'''&lt;br /&gt;
|| '''data dot feature underscore names''' displays the columns of different '''tumor '''characteristics.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''print(&amp;quot;Target names:&amp;quot;, data.target_names)'''&lt;br /&gt;
&lt;br /&gt;
|| Next we display the class labels of the target variable.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''plt.figure(figsize=(12,6)) '''&lt;br /&gt;
'''plt.show()'''&lt;br /&gt;
|| We create a boxplot to compare '''mean radius''' across classes.&lt;br /&gt;
&lt;br /&gt;
'''Malignant''' tumors are shown in red and '''benign''' tumors in green.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show output&lt;br /&gt;
|| Whiskers in a box plot represent the range of data within a certain boundary.&lt;br /&gt;
&lt;br /&gt;
Outliers are values far from the rest of the data and appear as small dots.&lt;br /&gt;
&lt;br /&gt;
In this plot, the '''malignant''' class has a higher mean radius with more variation.&lt;br /&gt;
&lt;br /&gt;
The '''benign''' class has a lower mean radius with fewer outliers.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Only Narration&lt;br /&gt;
&lt;br /&gt;
Highlight&lt;br /&gt;
&lt;br /&gt;
'''scaler = RobustScaler() '''&lt;br /&gt;
'''df_scaled = pd.DataFrame( '''&lt;br /&gt;
'''scaler.fit_transform(bcancer_df.iloc[:, :-1]), '''&lt;br /&gt;
|| Now, let’s preprocess the dataset.&lt;br /&gt;
&lt;br /&gt;
To handle outliers, we normalize the features using '''Robust Scaler'''. It scales values based on the '''median''' and '''IQR''', making it resistant to '''outliers'''.&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''X = bcancer_df.drop(columns=[&amp;quot;target&amp;quot;]) '''&lt;br /&gt;
'''y = bcancer_df['target']'''&lt;br /&gt;
|| We define '''X''' as the feature set by dropping the '''target''' column.&lt;br /&gt;
&lt;br /&gt;
The '''y''' variable stores the '''target classes''' for classification.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)'''&lt;br /&gt;
|| Next, we split the data into '''training '''and '''testing '''sets.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''mlp_relu = MLPClassifier(hidden_layer_sizes=(100, 50), activation='relu', max_iter=1000, random_state=42) '''&lt;br /&gt;
&lt;br /&gt;
'''mlp_relu.fit(X_train, y_train)'''&lt;br /&gt;
|| We then initialize the '''MLP''' model for classification.&lt;br /&gt;
&lt;br /&gt;
Using the''' MLPClassifier''' function, we define '''mlp underscore relu'''.&lt;br /&gt;
&lt;br /&gt;
It has '''two hidden layers''', the first with '''100 neurons '''and second with '''50 neurons'''.&lt;br /&gt;
&lt;br /&gt;
The model uses the '''Rectified Linear Unit '''i.e '''ReLU activation function''' for faster convergence.&lt;br /&gt;
&lt;br /&gt;
'''ReLU '''helps the '''MLP''' to train effectively.&lt;br /&gt;
&lt;br /&gt;
The model is trained for a maximum of '''1000 iterations''' to optimize performance.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''y_train_pred_relu = mlp_relu.predict(X_train)'''&lt;br /&gt;
|| Once trained, we predict class labels for''' X_train''' using our model.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''print(&amp;quot;Training Accuracy (ReLU):&amp;quot;, format(accuracy_score(y_train, y_train_pred_relu), &amp;quot;.3f&amp;quot;)) '''&lt;br /&gt;
|| We then calculate the '''training accuracy''' using the '''accuracy underscore score'''.&lt;br /&gt;
&lt;br /&gt;
The result is formatted to three decimal places and printed.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show output&lt;br /&gt;
|| The MLP model achieves a training accuracy of '''92.2%''' using ReLU activation.&lt;br /&gt;
&lt;br /&gt;
This indicates that the model has learned well from the training data.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''plt.plot(mlp_relu.loss_curve_, label=&amp;quot;Training Loss&amp;quot;, color=&amp;quot;blue&amp;quot;) '''&lt;br /&gt;
&lt;br /&gt;
'''plt.xlabel(&amp;quot;Iterations&amp;quot;) '''&lt;br /&gt;
&lt;br /&gt;
'''plt.ylabel(&amp;quot;Loss&amp;quot;) '''&lt;br /&gt;
|| We plot the '''training loss curve''' to track the learning progress.&lt;br /&gt;
&lt;br /&gt;
The '''x-axis''' represents''' iterations,''' while the y-axis shows the '''loss value'''.&lt;br /&gt;
&lt;br /&gt;
A decreasing '''loss curve''' indicates effective training.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show output&lt;br /&gt;
|| The''' training loss curve''' shows how the model's''' error''' decreases over iterations.&lt;br /&gt;
&lt;br /&gt;
Initially, the '''loss''' is high but quickly drops, showing rapid learning.&lt;br /&gt;
&lt;br /&gt;
After 20 iterations, the loss stabilizes, indicating model '''convergence'''.&lt;br /&gt;
&lt;br /&gt;
Model '''convergence''' means training has optimized weights, with minimal further gain.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''y_pred_relu = mlp_relu.predict(X_test) '''&lt;br /&gt;
&lt;br /&gt;
'''accuracy_relu = accuracy_score(y_test, y_pred_relu) '''&lt;br /&gt;
|| Next, we predict the class labels on the test data.&lt;br /&gt;
&lt;br /&gt;
We calculate and print the testing accuracy.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show output&lt;br /&gt;
|| The model achieves a testing accuracy of '''95.9%'''.&lt;br /&gt;
&lt;br /&gt;
This indicates strong generalization to unseen data.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''y_probs = mlp_relu.predict_proba(X_test)[:, 1] '''&lt;br /&gt;
&lt;br /&gt;
'''fpr, tpr, _ = roc_curve(y_test, y_probs) '''&lt;br /&gt;
&lt;br /&gt;
'''roc_auc = auc(fpr, tpr) '''&lt;br /&gt;
&lt;br /&gt;
|| We further evaluate the performance using a ROC curve.&lt;br /&gt;
&lt;br /&gt;
The curve shows the balance between '''true positive rate''' and '''false positive rate'''.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show output&lt;br /&gt;
|| The''' Area under the curve''' i.e, '''AUC value of 0.99''' confirms the model’s strong classification ability.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Highlight&lt;br /&gt;
&lt;br /&gt;
'''print(&amp;quot;\nMLP with ReLU activation - Classification Report:&amp;quot;) '''&lt;br /&gt;
|| Finally, we display the '''classification report''' of the model.&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show output&lt;br /&gt;
|| The output indicates that the model performs well in both classes with above 95% precision.&lt;br /&gt;
&lt;br /&gt;
The other metrics like recall and F1-score suggest that it correctly identifies most positive instances.&lt;br /&gt;
&lt;br /&gt;
Thus, the model has learnt to classify whether the patient has breast cancer or not. &lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:'''Summary'''&lt;br /&gt;
|| This brings us to the end of the tutorial. Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt about&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;The fundamentals of '''Artificial Neural Networks (ANN)'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Implementing '''Multi- Layer Perceptron (MLP)''' classification &amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Evaluating the performance of a trained '''MLP''' model&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment '''&lt;br /&gt;
|| As an assignment, please do the following&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Use''' activation='logistic' '''instead of '''activation='relu''''&amp;lt;/div&amp;gt;&lt;br /&gt;
* &amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;Evaluate the performance using accuracy and classification report for test set&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment Solution'''&lt;br /&gt;
|| After execution, we should get the accuracy and classification report as shown here.&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''FOSSEE Forum'''&lt;br /&gt;
|| &amp;lt;span style=&amp;quot;background-color:#ffffff;&amp;quot;&amp;gt;For any general or technical questions on &amp;lt;/span&amp;gt;'''Python for'''&lt;br /&gt;
&lt;br /&gt;
'''Machine Learning'''&amp;lt;span style=&amp;quot;background-color:#ffffff;&amp;quot;&amp;gt;, visit the&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;background-color:#ffffff;&amp;quot;&amp;gt;''' FOSSEE forum'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;background-color:#ffffff;&amp;quot;&amp;gt; and post your question.&amp;lt;/span&amp;gt;&lt;br /&gt;
|- style=&amp;quot;border:1pt solid #000000;padding:0.176cm;&amp;quot;&lt;br /&gt;
|| Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank You'''&lt;br /&gt;
|| This is '''Anvita Thadavoose Manjummel''', a FOSSEE Summer Fellow 2025, IIT Bombay signing off&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nirmala Venkat</name></author>	</entry>

	</feed>