Showing posts with label Neural Networks. Show all posts
Showing posts with label Neural Networks. Show all posts

Sunday, December 31, 2006

Neural Networks Attempt in Haskell (Quite a Failure Though...)

I ported the python version of BPNN into Haskell. Gotta admit that the porting was really a piece of cake: writing the Haskell code is just liking copying a mathematics textbook! However, it did killed some of my brain cells to try to use maps and folds.

Finally I realized that the double loops in the python code was trying to do matrix and vector multiplication... and after several hours' work I fixed my program to work properly. Though the learning procedure seems to converge slower than the python version, due to some unknown reasons.

Well, now the program is killing my memory chips... and the hard disk for virtual memory's sake. It runs quite slow when I try to use it to predict the average GDP of China... perhaps it's actually too huge for it. However, I'll try it thru the night. Let's see tomorrow morning if it eventually gives out any results. It's consuming more than 70% of the mem, while only 0.7% of the CPU time. I don't give it too much hope though.

Just a try. And seems to be quite a failure. But Haskell seems really fun when used this way~~