mirror of
https://github.com/nature-of-code/noc-book-2
synced 2024-11-17 07:49:05 +01:00
Notion - Update docs
This commit is contained in:
parent
bfb1480281
commit
2f42eabc94
1 changed files with 2 additions and 2 deletions
|
@ -150,7 +150,7 @@ function activate(sum) {
|
|||
return -1;
|
||||
}
|
||||
}</pre>
|
||||
<h2 id="simple-pattern-recognition-using-a-perceptron">Simple Pattern Recognition Using a Perceptron</h2>
|
||||
<h3 id="simple-pattern-recognition-using-a-perceptron">Simple Pattern Recognition Using a Perceptron</h3>
|
||||
<p>Now that I have explained the computational process of a perceptron, let's take a look at an example of one in action. As I mentioned earlier, neural networks are commonly used for pattern recognition applications, such as facial recognition. Even simple perceptrons can demonstrate the fundamentals of classification. Let’s demonstrate with the following scenario.</p>
|
||||
<figure class="half-width-right">
|
||||
<img src="images/10_nn/10_nn_4.png" alt="Figure 10.4">
|
||||
|
@ -197,7 +197,7 @@ function activate(sum) {
|
|||
</tbody>
|
||||
</table>
|
||||
<p>The output is then the sum of the above three results: <span data-type="equation">0 + 0 + w_\text{bias}</span>. Therefore, the bias, by itself, answers the question of where <span data-type="equation">(0,0)</span> is in relation to the line. If the bias's weight is positive, then <span data-type="equation">(0,0)</span> is above the line; if negative, it is below. Its weight <strong>biases</strong> the perceptron's understanding of the line's position relative to <span data-type="equation">(0,0)</span>!</p>
|
||||
<h2 id="coding-the-perceptron">Coding the Perceptron</h2>
|
||||
<h3 id="coding-the-perceptron">Coding the Perceptron</h3>
|
||||
<p>I am now ready to assemble the code for a <code>Perceptron</code> class. The perceptron only needs to track the input weights, which I can store using an array.</p>
|
||||
<pre class="codesplit" data-code-language="javascript">class Perceptron {
|
||||
constructor() {
|
||||
|
|
Loading…
Reference in a new issue