Re: Neural networks with mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg83546] Re: Neural networks with mathematica*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>*Date*: Thu, 22 Nov 2007 04:58:47 -0500 (EST)*Organization*: The Open University, Milton Keynes, UK*References*: <fhu7mu$7cv$1@smc.vnet.net>

dinodeblasio at gmail.com wrote: > Hello, > i would like to run one ART1 network, to this purpose i have found the > seguent code on some article: > "these are some variables" > a1_ = 1 > b1_ = 1.5 > c1_ = 5 > d1_ = 0.9 > el_ = 3 > del1_ = 0.2 > del2_ = 0.1 The above expressions do not define variables and do not assign any value. (Symbols of the form xxx_ are named patterns and any attempt to assign any value to them will generate an error message.) To define some global variables and assign to them some values, you should use the following syntax: a1 = 1; b1 = 1.5; c1 = 5; d1 = 0.9; el = 3; del1 = 0.2; del2 = 0.1; > "then i would run the code written below, but i have some problem and > it doesnt work, it never finish to calculate. You can find the > Mathematica package below at: http://www.esnips.com/web/dinodeblasio/ > > in = {{1, 1, 0, 0, 0}, {0, 0, 0, 01}, {0, 0, 1, 1, 1}, {1, 1, 1, 0, > 0}, {1, 0, 0, 0, 0}}; > {td, bu} = art1Init[5, 5, 1.5, 0.9, 3, 0.2, 0.1]; > art1[5, 5, 1, 1.5, 5, 0.9, 3, 0.3, td, bu, in]; > > "at this point i should execute the function art1 but something is > wrong or missing" <snip> Here is what I get on my system (Mathematica 6.0.1 for Windows XP) when running the code (and the package) you posted. Did you get similar error messages from Mathematica and informational message from the function? in = {{1, 1, 0, 0, 0}, {0, 0, 0, 01}, {0, 0, 1, 1, 1}, {1, 1, 1, 0, 0}, {1, 0, 0, 0, 0}}; {td, bu} = art1Init[5, 5, 1.5, 0.9, 3, 0.2, 0.1]; art1[5, 5, 1, 1.5, 5, 0.9, 3, 0.3, td, bu, in]; Resonance established on unit 1 with pattern 1 Dot::dotsh: Tensors \ {{3/4,3/4,0,0,0},<<3>>,{0.328571,0.328571,<<19>>,0.328571,0.328571}} \ and {0,0,0,1} have incompatible shapes. >> Dot::dotsh: Tensors \ {{0.75,0.75,0.,0.,0.},<<3>>,{0.328571,0.328571,<<19>>,<<19>>,0.328571}\ } and {0.,0.,0.,1.} have incompatible shapes. >> Thread::tdlen: Objects of unequal length in {0,0,0,1}+{0.9 \ If[{{<<5>>},{<<5>>},{<<5>>},{<<5>>},{<<5>>}}.{0,0,0,1}>0,1,0],0.9 \ <<1>>,0,0,0}-1.5 cannot be combined. >> Thread::tdlen: Objects of unequal length in {0,0,0,1}+{0.9 \ If[{{<<5>>},{<<5>>},{<<5>>},{<<5>>},{<<5>>}}.{0,0,0,1}>0,1,0],0.9 \ If[{<<1>>}.{<<1>>}>0,1,0],0,0,0} cannot be combined. >> Thread::tdlen: Objects of unequal length in 6+{0,0,0,1}+{0.9 \ If[{{<<5>>},{<<5>>},{<<5>>},{<<5>>},{<<5>>}}.{0,0,0,1}>0,1,0],0.9 \ If[<<1>>],0,0,0} cannot be combined. >> General::stop: Further output of Thread::tdlen will be suppressed \ during this calculation. >> Reset with pattern 2 on unit 1 [... and -- infinitely? -- more messages like that ...] Regards, -- Jean-Marc