Hi Henrik,

> For reference, the article / tutorial:
> https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1

Nice!


> (de colM (M Cn)
>    (make
>       (for Col M
>          (link (car (nth Col Cn)))) ) )
> 
> ## Transpose matrix: https://en.wikipedia.org/wiki/Transpose
> (de trM (M)
>    (make
>       (for N (length (car M))    # Number of columns.
>          (link (colM M N)) ) ) )

Note that there are some matrix manipulation tasks in RosettaCode.

For example, the matrix transposition is simply:

   (de matTrans (Mat)
      (apply mapcar Mat list) )


Matrix multiplication (for 2 matrices) in RosettaCode is

   (de matMul (Mat1 Mat2)
      (mapcar
         '((Row)
            (apply mapcar Mat2
               '(@ (sum */ Row (rest) (1.0 .))) ) )
         Mat1 ) )

Not sure if this fits your needs ...

♪♫ Alex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to