home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e065 / 1.ddi / PNN.INS < prev    next >
Encoding:
Text File  |  1991-08-28  |  4.6 KB  |  182 lines

  1. inst4.0        ! 1-Jun-89  (pnn.ins)  PNN Network
  2. !****************************************************************
  3. !*                                *
  4. !*    Probabilistic Neural  Network Builder            *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output / Hidden 1 PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "Probabilistic Neural Network MUST have at least one input PE"
  13. :CheckOut
  14. ?&Out    1
  15. >bge    OutOK
  16. @Err    "Probabilistic Neural Network MUST have at least one output PE"
  17. :OutOK
  18. ?&Hd1    1
  19. >bge    HidOK
  20. @Err    "Probabilistic Neural Network MUST have at least one Hidden 1 PE"
  21. :HidOK
  22. ?&Hd1    &Out
  23. >bge    HidOK2
  24. @Err    "PNN MUST have more Hidden 1 PEs than Output PEs"
  25. :HidOK2
  26.  
  27. !    *** Load the Control Strategy and LRS if needed
  28.  
  29. @LdCS    "pnn"            !control strategy
  30. @LdLR    "pnn"            !L/R schedule
  31.  
  32. =netn    "InstaNet (tm) Probabilistic Neural Network version 1.00 01-Jun-89"
  33. =DLnF    0            !learn  re-display off
  34. =DRcF    0            !recall re-display off
  35.  
  36. !    *** Build the Input Layer ***
  37.  
  38. @LLdf                !load default layer to mi_layer structure
  39. =LDln    "In"            !layer name
  40. =Lpes    &In            !copy # of input PEs from menu
  41. =x    100            !place to put layer on screen
  42. =y     60
  43. #Incl    "stdnwgtf.iif"        !standard # weight fields
  44. @LAdd                !add the input layer
  45.  
  46. !    *** Build the normalization Layer ***
  47.  
  48. @LLdf                !load default layer
  49. =Lpes    &In            !input PEs + 1
  50. +Lpes    1
  51. =LDln    "Norm"            !layer name
  52. =Lsum    "NormPolar"        !normalize / scale
  53. +y    70
  54. #Incl    "stdnwgtf.iif"        !standard # weight fields
  55. @LAdd
  56.  
  57. !    *** Connect it up to input layer ***
  58.  
  59. =SPEl    LayN            !normalization layer
  60. @SlPE
  61. =NPEl    0            !input layer
  62. @NrPE
  63. =cnsc    WRel
  64. =cnty    WFix
  65. =cnwt    1.0
  66. @LCCr                !connect corresponding PEs together
  67. =n0    LayN            !normalization layer
  68.  
  69. !    *** Build the pattern Layer ***
  70.  
  71. @LLdf                !load default layer
  72. =Lpes    &Hd1            !hidden layer PEs
  73. =LDln    "pattern"        !layer name
  74. =Ltrn    "PNN"            !transfer function
  75. =Lcmp    "PNN"            !direct output, set up PE for learning
  76. =Llrn    "User Kohonen"        !update winning PE
  77. =Llrs    "pnn"            !L/R Schedule
  78. =LInL    0.0            !low initialization limit
  79. =LInH    0.0            !high initialization limit
  80. +y    70
  81. #Incl    "stdnwgtf.iif"        !standard # weight fields
  82. @LAdd
  83.  
  84. !    *** Connect it to the normalization layer ***
  85.  
  86. =SPEl    LayN            !current layer
  87. @SlPE
  88. =NPEl    n0            !previous layer
  89. @NrPE
  90. =cnwt    0.0            !
  91. =cnty    WVar            !variable
  92. =cnsc    WAbs            !absolute
  93. @LCFl                !fully connect
  94. =n0    LayN            !pattern layer
  95.  
  96. !    *** Build the summation layer ***
  97.  
  98. @LLdf                !load default layer to mi_layer structure
  99. =LDln    "Summation"        !layer name
  100. =Lpes    &Out            !copy # of input PEs from menu
  101. =Llrn    "PNN"
  102. =LInL    1.0            !low initialization limit
  103. =LInH    1.0            !high initialization limit
  104. +y    70
  105. #Incl    "stdnwgtf.iif"        !standard # weight fields
  106. @LAdd                !add the summation layer
  107. =n1    LayN            !summation layer
  108.  
  109. !    *** Connect the pattern layer to the summation layer: Setup ***
  110.  
  111. =SPEl    LayN            !summation layer
  112. =SPEn    0
  113. =NPEl    n0            !pattern layer
  114. =NPEn    0
  115. =cnwt    1.0            !set weight to 1.0
  116. =cnty    WVar            !variable weights
  117. =cnsc    WRel            !relative connections
  118.  
  119. !    *** Connect the pattern layer to the summation layer
  120.  
  121. :OutCn
  122. @SlPE                !select next PE in output layer
  123. @NrPE                !select next PE in pattern layer
  124. @PCon                !connect two PEs together
  125. +SPEn    1            !next PE in output layer
  126. ?SPEn    &Out            !past the end?
  127. >blt    OutPEOK
  128. =SPEn    0            !back to start of output layer
  129. :OutPEOK
  130. +NPEn    1            !next PE in the competitive layer
  131. ?NPEn    &Hd1            !done with layer?
  132. >blt    OutCn            !no, keep going
  133.  
  134. !    *** Build the output layer ***
  135.  
  136. @LLdf                !load default layer to mi_layer structure
  137. =LDln    "Out"            !layer name
  138. =Lpes    &Out            !copy # of input PEs from menu
  139. =Lcmp    "One-Active-Highest"
  140. =LInL    1.0            !low initialization limit
  141. =LInH    1.0            !high initialization limit
  142. +y    70
  143. #Incl    "stdnwgtf.iif"        !standard # weight fields
  144. @LAdd                !add the output layer
  145. =n7    LayN            !save for stdprobe
  146.  
  147. !    *** Connect the summation layer to the output layer ***
  148.  
  149. =SPEl    LayN            !output layer
  150. @SlPE
  151. =NPEl    n1            !summation layer
  152. =NPEn    0
  153. @NrPE
  154. =cnty    WFix            !variable weights
  155. =cnsc    WRel            !relative connections
  156. =cnwt    1.0            !set weight to 1.0
  157. @LCCr                !connect correspondingly
  158.  
  159. !    *** Select Control Strategy & L/R Schedule ***
  160.  
  161. @LLsl                !load super layer
  162. =Lctl    "pnn"            !category learning network control strategy
  163. =Llnn    "pnn"            !name of learn input
  164. =Lrcn    "pnn"            !name of recall output
  165. =Lscl    -1            !input  low-value
  166. =Loff     1            !input  high-value
  167. =Llow     0            !output low-value
  168. =Lhgh     1            !output high-value
  169. @SVsl                !save it back
  170. !
  171. =n5    0.0
  172. =n6    1.0
  173. =n4    &Out
  174. #Incl    "stdprobe.iif"        !Standard probe include file
  175. !
  176. =jogl    -.1            !lower limit for jog
  177. =jogh    +.1            !upper limit for jog
  178. =seed    257            !starting seed number
  179. @seed                !set the seed
  180. @Nini                !initialize the network
  181. @EOF
  182.