<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[What is Artificial Neural Network (Perceptron Model) ?]]></title><description><![CDATA[Understand the Perceptron Model, the foundation of Neural Networks. Learn how inputs, weights, bias, and activation functions work with simple examples.]]></description><link>https://techmojo.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6adb82556826d8d2fe80ec7e/10b98df6-3d95-4278-873d-76051fbac76e.png</url><title>What is Artificial Neural Network (Perceptron Model) ?</title><link>https://techmojo.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 07:55:08 GMT</lastBuildDate><atom:link href="https://techmojo.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[What exactly is 'bias' in a Perceptron model?]]></title><description><![CDATA[Learn why bias is essential in perceptrons and neural networks. Explore weights, bias, linear equations with practical examples.]]></description><link>https://techmojo.hashnode.dev/what-exactly-is-bias-in-a-perceptron-model</link><guid isPermaLink="true">https://techmojo.hashnode.dev/what-exactly-is-bias-in-a-perceptron-model</guid><category><![CDATA[Bias in AI]]></category><category><![CDATA[perception bias]]></category><dc:creator><![CDATA[Himanshu Mishra]]></dc:creator><pubDate>Mon, 26 Oct 2026 17:55:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6adb82556826d8d2fe80ec7e/fb4eb20c-60f5-4681-bf5c-c2c049920da9.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We know that <mark>Prediction</mark> is based on <mark>Activation</mark> <mark>function</mark> in a Perceptron model.</p>
<p>\({\hat y=f(z)}\)</p>
<p>\(z=\sum_{i=1}^{n}w_ix_i+b\)</p>
<p>\(\hat y\) = Predicted output</p>
<p>\({f(z)}\) = Activation function</p>
<p>\({w}\) = Weight (It also means slope)</p>
<p>\({b}\) = Bias (It also means intercept)</p>
<p><strong>We want to understand what exactly is bias(b) in the linear equation and why bias?</strong></p>
<p>Lets take a linear equation (<em>By the way, the linear equation is our model, more specifically linear model, which needs learning to properly fit in the data</em>):</p>
<p>\(y=3x +2\)</p>
<p>Here the <mark>weight</mark> is 3 and <mark>bias</mark> is 2. Let us represent the linear equation (with and without bias) in 2D graph:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6adb82556826d8d2fe80ec7e/3a501d70-aa05-407c-8bac-879269edacf5.png" alt="" style="display:block;margin:0 auto" />

<p>You can notice that both the lines have the same slope (3), but the line with bias is 2 units above the origin.</p>
<p>So with this we understand that without bias, the linear equation passes through origin. With bias, the line intersects the y-axis.</p>
<p><mark>This choice for the linear equation to not let pass through the origin is the fundamental reason why bias is mandatory for a model to predict correctly.</mark></p>
<h3>Let us understand this with an example on why bias is required:</h3>
<p>Consider a model which wants to predict marks obtained based on hours of study. Suppose our model without bias is :</p>
<p>\(y=3x\)</p>
<p>Then as we know, the model (linear equation) passes through origin, hence the relation between hours of study and marks obtained would be:</p>
<table>
<thead>
<tr>
<th>Hours of study (x)</th>
<th>Prediction: Marks obtained (y)</th>
</tr>
</thead>
<tbody><tr>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1</td>
<td>3</td>
</tr>
<tr>
<td>2</td>
<td>6</td>
</tr>
<tr>
<td>3</td>
<td>9</td>
</tr>
</tbody></table>
<p>So we see that the model assumes that the student who studies 0 hours obtains 0 marks, which is <mark>completely wrong to begin with for a model</mark>. Now let us introduce a bias on the same model.</p>
<p>\(y=3x +2\)</p>
<table>
<thead>
<tr>
<th>Hours of study (x)</th>
<th>Prediction: Marks obtained (y)</th>
</tr>
</thead>
<tbody><tr>
<td>0</td>
<td>2</td>
</tr>
<tr>
<td>1</td>
<td>5</td>
</tr>
<tr>
<td>2</td>
<td>8</td>
</tr>
<tr>
<td>3</td>
<td>11</td>
</tr>
</tbody></table>
<p>So now we notice that with bias, even if a student studies 0 hours, <mark>model predicts a sensible output,</mark> in this case marks obtained is 2 for 0 hours of study.</p>
<blockquote>
<p><mark>Conclusion on bias:</mark> We can clearly see in the graph that bias controls the vertical position. It allows the line to move up or down without affecting the slope. Without bias, the linear model is forced to pass through the origin thus allowing the model to predict incorrect values. With bias, the model is mature enough to fit the model in real world data.</p>
</blockquote>
<hr />
<p>If you've made it this far, thank you so much for reading! 😊 If you found this article helpful, please consider bookmarking my blog. Your support would mean a lot and motivate me to keep sharing more! 🚀</p>
]]></content:encoded></item><item><title><![CDATA[What is Artificial Neural Network (Perceptron Model) ?]]></title><description><![CDATA[To understand the topic, let us first understand what is Artificial Neuron. In school days we all have read about biological Neuron. It is a fundamental…]]></description><link>https://techmojo.hashnode.dev/what-is-artificial-neural-network-perceptron-model</link><guid isPermaLink="true">https://techmojo.hashnode.dev/what-is-artificial-neural-network-perceptron-model</guid><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[neural networks]]></category><category><![CDATA[Deep Learning]]></category><category><![CDATA[Perceptron]]></category><dc:creator><![CDATA[Himanshu Mishra]]></dc:creator><pubDate>Sat, 24 Oct 2026 20:27:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6adb82556826d8d2fe80ec7e/a8db4400-8df5-40f1-8345-4731881d2260.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To understand the topic, let us first understand what is Artificial Neuron. In school days we all have read about biological Neuron. It is a fundamental building block of our nervous system. This biological Neuron provides inspiration for <strong>Artificial Neural Networks (ANNs).</strong></p>
<p>Biological (Single Building Block) : <strong>Neuron</strong><br />Artificial (Single Building Block) : <strong>Perceptron</strong></p>
<table>
<thead>
<tr>
<th><mark>Biological Neuron</mark></th>
<th><mark>Artificial Perceptron</mark></th>
</tr>
</thead>
<tbody><tr>
<td>Dendrites</td>
<td>Inputs</td>
</tr>
<tr>
<td>Synapses</td>
<td>Weights</td>
</tr>
<tr>
<td>Cell Body</td>
<td>Weighted Summation</td>
</tr>
<tr>
<td>Axon</td>
<td>Output</td>
</tr>
</tbody></table>
<h3>By now you must be thinking what does a "<mark>Perceptron</mark>" do?</h3>
<p>Perceptron's primary <strong>purpose is to learn patterns from input data and make predictions or classification decisions.</strong> It takes multiple inputs, assigns weights to them, adds a bias, and applies an activation function to produce an output.</p>
<p>Let us understand it in Mathematical terms, its all about school days Linear Equation:</p>
<p>\(y = mx + c\)</p>
<p>\(y = m_1x_1 + m_2x_2 + \cdots + m_nx_n + c\)</p>
<p>\(y = \sum_{i=1}^{n} m_i x_i + c\)</p>
<p>I have represented Linear Equation in three different format for the readers to understand the equation easily. Similarly below is the predicted output equation for Perceptron Model (Single Neuron).</p>
<img src="https://cdn.hashnode.com/uploads/covers/6adb82556826d8d2fe80ec7e/1eb05ba4-d40a-41bc-b414-84e2c13a8e34.png" alt="" style="display:block;margin:0 auto" />

<p>\(z=\sum_{i=1}^{n}w_ix_i+b\)</p>
<p>\({\hat y=f(w_1x_1+w_2x_2+\cdots+w_nx_n+b)}\)</p>
<table>
<thead>
<tr>
<th><mark>Component</mark></th>
<th><mark>Meaning</mark></th>
</tr>
</thead>
<tbody><tr>
<td>\(x_1,x_2,\ldots,x_n\)</td>
<td>Input features</td>
</tr>
<tr>
<td>\(w_1,w_2,\ldots,w_n\)</td>
<td>Weights representing the importance of inputs</td>
</tr>
<tr>
<td>b</td>
<td>Bias that shifts the decision boundary</td>
</tr>
<tr>
<td>f</td>
<td>Activation function</td>
</tr>
<tr>
<td>\(\hat y\)</td>
<td>Predicted output</td>
</tr>
</tbody></table>
<p>So by now you know mathematically how output is predicted via a Perceptron Model (Single Neuron)</p>
<hr />
<h3>Let us solve an example to further understand how output is predicted using Perceptron Model.</h3>
<p><strong>Example</strong>: <mark>Email Spam Detection</mark></p>
<p>Suppose we want to classify whether an email is spam or not. We assume that the perceptron receives three inputs:</p>
<p>\(x_1\): Does the email contain the word "Money"?</p>
<p>\(x_2\): Does the email contain a suspicious link?</p>
<p>\(x_3\): Is the sender unknown?</p>
<p>Assume the perceptron has learned these weights:</p>
<p>\(w1= 0.5, w2= 0.8, w3= 0.3, b= -1\)</p>
<p>For an email where all the three inputs are true x1, x2, x3 = 1 (True):</p>
<p>\(z=(0.5\times1)+(0.8\times1)+(0.3\times1)-1\)</p>
<p>\(z=0.6\)</p>
<p>Applying the step activation function( <strong>1 or 0 means prediction can most likely be true or false</strong> based on z value) :</p>
<p>\(\hat{y} = \begin{cases} 1, &amp; \text{if } z \geq 0 \\ 0, &amp; \text{if } z &lt; 0 \end{cases}\)</p>
<p>Since z=0.6 hence the prediction is True (Spam most likely):</p>
<p>\({\hat y=1}\) (Spam)</p>
<p>Hence the perceptron predicted that the input email is a Spam.</p>
<p>After going through the mathematical example, you might be having two questions in your mind:</p>
<ol>
<li>What exactly is a bias?</li>
<li>What is the meaning of assumption that perceptron has learned weights?</li>
</ol>
<p>For now lets assume that Bias is important because it allows the perceptron to make predictions more flexibly, rather than depending only on the weighted inputs. I will cover these two questions in my next blog.</p>
<hr />
<p>If you've made it this far, thank you so much for reading! 😊 If you found this article helpful, please consider bookmarking my blog. Your support would mean a lot and motivate me to keep sharing more! 🚀</p>
]]></content:encoded></item></channel></rss>