Single Perceptron Implementation
JavaScript (Node.js), 121 110  bytes

Same as TFled. A "golfed" version of the example.

-11 bytes from @Arnauld



with(Math)f=(a,[b,B],c,d)=&gt;(g=w=&gt;a--?g(w.map(_=&gt;_+d*(c-(y=1/(1+exp(B*w[1]-b*w[0])))))):y)([random(),random()])


Try it online!