1
$\begingroup$

Found this in a book: $$H=max\{0,X\cdot W^{(1)}+b^{(1)}\}$$ $$max\{0,\begin{bmatrix} 0& 0 \\0 &1\\ 1 &0\\ 1&1\end{bmatrix} \cdot \begin{bmatrix} -0.4& 0.1 & 0.9 \\0.8 & -0.2 & -0.7\end{bmatrix} +\begin{bmatrix} 0.6&-0.4& -0.7 \end{bmatrix}= \begin{bmatrix} 0.6 & -0.4 & -0.7 \\ 1.4&-0.6&-1.4\\0.2& -0.3&0.2\\1&-0.5& -0.5\end{bmatrix}\}$$

What kind of multiplication is this? It's definitely not matrix multiplication. It's not point wise ($\odot$) and I guess you can't call that scalar product. Bit confusing since such a multiplication has never been mentioned before in the book.

$\endgroup$

migrated from stats.stackexchange.com Aug 8 '18 at 12:26

This question came from our site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.

3
$\begingroup$

It seems to be that the term $b^{(1)} = \begin{bmatrix} 0.6&-0.4& -0.7 \end{bmatrix}$ is simply shorthand for: $$\begin{bmatrix} 0.6&-0.4& -0.7 \\0.6&-0.4& -0.7 \\0.6&-0.4& -0.7 \\0.6&-0.4& -0.7 \end{bmatrix}$$

and then you are left with regular matrix multiplication:

$$\begin{bmatrix} 0& 0 \\0 &1\\ 1 &0\\ 1&1\end{bmatrix} \cdot \begin{bmatrix} -0.4& 0.1 & 0.9 \\0.8 & -0.2 & -0.7\end{bmatrix} +\begin{bmatrix} 0.6&-0.4& -0.7 \\0.6&-0.4& -0.7 \\0.6&-0.4& -0.7 \\0.6&-0.4& -0.7 \end{bmatrix}= \begin{bmatrix} 0.6 & -0.4 & -0.7 \\ 1.4&-0.6&-1.4\\0.2& -0.3&0.2\\1&-0.5& -0.5\end{bmatrix}$$

$\endgroup$
  • 1
    $\begingroup$ well yes i know. that's called broadcasting. but thats not the part im interested in. i wonder what kind of multiplication that is. $\endgroup$ – Mr.Sh4nnon Aug 7 '18 at 11:26
  • 3
    $\begingroup$ The initial part is standard matrix multiplication of a $4\times 2$ by a $2\times 3$ matrix, yielding a $4\times 3$ matrix. $\endgroup$ – Stephan Kolassa Aug 7 '18 at 11:29
  • $\begingroup$ ou... well, i see the problem now^^ so silly. thank you guys $\endgroup$ – Mr.Sh4nnon Aug 7 '18 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.