Why doesn't perceptron's implementation follow the formula in <python machine learning>?
<p>I'm beginner in machine learning. I begin my study with the book <a href="https://rads.stackoverflow.com/amzn/click/com/1783555130" rel="nofollow noreferrer" rel="nofollow noreferrer">python machine learning</a> and some videos online. </p>

<p>I'm confused by the implementation of Perceptron in "python machine learning". This is the formula:</p>

<p><a href="https://i.stack.imgur.com/LbiHK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LbiHK.png" alt="enter image description here"></a></p>

<p>And this is the python implementation for the formula:
<a href="https://i.stack.imgur.com/ZpuLu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZpuLu.png" alt="enter image description here"></a></p>

<p>But by the formula, it's W * X, not X * W in the implementation. They're not same for matrix.(For <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html" rel="nofollow noreferrer">numpy dot</a>, if X is 2-D array, it's matrix multiplication.). Why does the implementation not follow the formula?</p>

<p>The actual values in above python codes from the Iris-example in the book are these:</p>

<pre><code>w[1:]:  [-0.68  1.82]

X: [[ 3.3   0.  ]
    [ 3.32  0.  ]
    [ 3.34  0.  ]
      ..., 
    [ 7.94  6.08]
    [ 7.96  6.08]
    [ 7.98  6.08]]
</code></pre>

<p>Thanks.</p>