News for hackers. Stuff that matters.
Re:Show HN: Single neuron neural network written in COBOL by atum47 on Thursday September 03, 2020 @09:15PM (#24370807)
Hi everyone, I made this a while ago just for fun. Perceptron was one of the first algorithms I wrote back in college when I was taking machine learning classes. So I thought how cool would be to write something fairly modern (not really) like a neural network using old tech like cobol. Hope you like it.
Re:Show HN: Single neuron neural network written in COBOL by ryan_j_naughton on Thursday September 03, 2020 @10:15PM (#24371100)
Interestingly, perceptrons and Cobol are almost the same age.

"The perceptron algorithm was invented in 1958"[1]

"COBOL was designed in 1959 by CODASYL and was partly based on the programming language FLOW-MATIC designed by Grace Hopper."[2]

[1] https://en.wikipedia.org/wiki/Perceptron

[2] https://en.wikipedia.org/wiki/COBOL

Re:Show HN: Single neuron neural network written in COBOL by atum47 on Thursday September 03, 2020 @10:17PM (#24371114)
yeah, when I was writing the comment I remember my teacher telling us that neural networks were invented a long time ago and now (2017 when I took the class) they were coming back. that's why I wrote (not really)
Re:Show HN: Single neuron neural network written in COBOL by im3w1l on Thursday September 03, 2020 @10:21PM (#24371134)
When classifying it's often a good idea to feed the prediction into a sigmoid-function.

I have never seen cobol code before, only heard about it so thanks for posting some. What do rows like "01 ERR PIC S99V9999." mean?

Re:Show HN: Single neuron neural network written in COBOL by __palo_alto__ on Thursday September 03, 2020 @10:43PM (#24371225)
I think the perceptron algorithm does not include a sigmoid, just a stepwise activation. https://en.wikipedia.org/wiki/Perceptron
Re:Show HN: Single neuron neural network written in COBOL by atum47 on Thursday September 03, 2020 @10:27PM (#24371162)
ERR is the name of my variable "error" S indicates that this value is signed 99 is two digits V is a decimal separator and the other 9999 are 4 decimal places

http://www.csis.ul.ie/cobol/course/DataDeclaration.htm

Re:Show HN: Single neuron neural network written in COBOL by jecel on Thursday September 03, 2020 @10:53PM (#24371262)
And the 01 at the start of the line is the level number as explained in the link. It is how Cobol declared nested records, which Fortran and Algol lacked but became popular through PL/I, Pascal and C.
Re:Show HN: Single neuron neural network written in COBOL by bbunix on Thursday September 03, 2020 @10:29PM (#24371172)
I think 01 line number ERR what you think it means PIC S99V9999 is like a printf format for the number field
Re:Show HN: Single neuron neural network written in COBOL by pjmlp on Friday September 04, 2020 @09:19AM (#24374667)