Re: How to build a simple neural network in 9 lines of Python code

2017-06-29 Thread John Ladasky
On Tuesday, June 27, 2017 at 7:28:58 PM UTC-7, Steve D'Aprano wrote: > On Wed, 28 Jun 2017 06:22 am, Marko Rauhamaa wrote: > > > You saw the APL example, right? APL's standard runtime/library contains > > most of Numpy functionality because that's what APL has been designed > > for. > > > > Is th

Re: How to build a simple neural network in 9 lines of Python code

2017-06-29 Thread John Ladasky
On Tuesday, June 27, 2017 at 12:34:46 PM UTC-7, Marko Rauhamaa wrote: > John Ladasky : > > OK, that's cheating a bit, using Numpy. It's a nice little program, > > but it leverages a huge, powerful library. > > What would *not* be cheating? A language without a library would be > dead. Python's st

Re: How to build a simple neural network in 9 lines of Python code

2017-06-28 Thread sohcahtoa82
On Tuesday, June 27, 2017 at 12:31:49 PM UTC-7, John Ladasky wrote: > On Tuesday, June 27, 2017 at 9:24:07 AM UTC-7, Sam Chats wrote: > > https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 > > OK, that&#

Re: How to build a simple neural network in 9 lines of Python code

2017-06-28 Thread Gregory Ewing
Steve D'Aprano wrote: It should be obvious that if you allow the use of external libraries that can contain arbitrary amounts of code, *without* counting that external code towards your measure of code complexity, you get a bogus measurement of code complexity. Numpy isn't really doing a lot he

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Rustom Mody
On Wednesday, June 28, 2017 at 1:04:46 AM UTC+5:30, Marko Rauhamaa wrote: > John Ladasky > > OK, that's cheating a bit, using Numpy. It's a nice little program, > > but it leverages a huge, powerful library. > > What would *not* be cheating? A language without a library would be > dead. One man'

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Chris Angelico
On Wed, Jun 28, 2017 at 12:28 PM, Steve D'Aprano wrote: > E.g. comparing Python to AcmeScript, where you write: > > > program myprogram > begin program > load library webbrowser > new string url copied from 'http://www.example.com' > with webbrowser > begin > method = open > method.call

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Ian Kelly
On Tuesday, June 27, 2017, Steve D'Aprano wrote: > On Wed, 28 Jun 2017 02:23 am, Sam Chats wrote: > > > > https://medium.com/technology-invention-and-more/how-to- > build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 > > > The derivative of the s

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Steve D'Aprano
On Wed, 28 Jun 2017 06:22 am, Marko Rauhamaa wrote: > You saw the APL example, right? APL's standard runtime/library contains > most of Numpy functionality because that's what APL has been designed > for. > > Is that cheating? Of course not. That demonstrates beautifully (or perhaps "unreadably

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Steve D'Aprano
On Wed, 28 Jun 2017 05:34 am, Marko Rauhamaa wrote: > John Ladasky : >> OK, that's cheating a bit, using Numpy. It's a nice little program, >> but it leverages a huge, powerful library. > > What would *not* be cheating? A language without a library would be > dead. Its not really nine lines of P

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Steve D'Aprano
On Wed, 28 Jun 2017 06:19 am, Marko Rauhamaa wrote: > alister : > >> On Tue, 27 Jun 2017 22:34:18 +0300, Marko Rauhamaa wrote: >> >>> John Ladasky : OK, that's cheating a bit, using Numpy. It's a nice little program, but it leverages a huge, powerful library. >>> >>> What would *not* b

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Steve D'Aprano
On Wed, 28 Jun 2017 02:23 am, Sam Chats wrote: > https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 The derivative of the sigmoid curve given is completely wrong. def __sigmoid(self, x): return 1 / (1 +

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Chris Angelico
On Wed, Jun 28, 2017 at 6:22 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Wed, Jun 28, 2017 at 5:34 AM, Marko Rauhamaa wrote: >>> What would *not* be cheating? A language without a library would be >>> dead. >> >> Sure, but there are different levels of cheating. Using a >> general-purpos

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Jun 28, 2017 at 5:34 AM, Marko Rauhamaa wrote: >> What would *not* be cheating? A language without a library would be >> dead. > > Sure, but there are different levels of cheating. Using a > general-purpose programming language and its standard library isn't > usually c

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Marko Rauhamaa
alister : > On Tue, 27 Jun 2017 22:34:18 +0300, Marko Rauhamaa wrote: > >> John Ladasky : >>> OK, that's cheating a bit, using Numpy. It's a nice little program, >>> but it leverages a huge, powerful library. >> >> What would *not* be cheating? A language without a library would be >> dead. > > t

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Chris Angelico
On Wed, Jun 28, 2017 at 5:34 AM, Marko Rauhamaa wrote: > John Ladasky : >> OK, that's cheating a bit, using Numpy. It's a nice little program, >> but it leverages a huge, powerful library. > > What would *not* be cheating? A language without a library would be > dead. Sure, but there are differen

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread alister
On Tue, 27 Jun 2017 22:34:18 +0300, Marko Rauhamaa wrote: > John Ladasky : >> OK, that's cheating a bit, using Numpy. It's a nice little program, >> but it leverages a huge, powerful library. > > What would *not* be cheating? A language without a library would be > dead. > > > Marko true but f

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread John Ladasky
On Tuesday, June 27, 2017 at 9:24:07 AM UTC-7, Sam Chats wrote: > https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 OK, that's cheating a bit, using Numpy. It's a nice little program, but it leverages a h

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Marko Rauhamaa
John Ladasky : > OK, that's cheating a bit, using Numpy. It's a nice little program, > but it leverages a huge, powerful library. What would *not* be cheating? A language without a library would be dead. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Marko Rauhamaa
Sam Chats : > https://medium.com/technology-invention-and-more/how-to-build-a-simpl > e-neural-network-in-9-lines-of-python-code-cc8f23647ca1 Impressive, but APL's got Python beat. This one-liner implements the Game of Life: life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} https://en.wikipedia.o

How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread Sam Chats
https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 -- https://mail.python.org/mailman/listinfo/python-list