The execution of code in the application program is triggered by the arrival (on the simulation time line) of an event, which is passed from the simulation event queue. Depending on the type of event, a dedicated code block or routine executes. Upon arrival of an event at the application layer, the application first determines the event type and according to its type executes the matching routine. For instance, if it is an initialization (Init_Application) event and generated by the supervisory mote, the supervisory mote loads and normalizes the training data, and sends it to generic motes. If, however, the event is generated by a generic mote, then the generic mote initializes the weight vector. If it is a Packet_Received or a Collided_Packet_Received event, the application first checks to see if is the first time the message has reached this mote. If the answer is yes, then it processes the data. Otherwise, it simply ignores it. When application runs to completion, it stores the final results to a file.
Another parameter which is called “Notification_Limit” is specified in the application layer code for WSN–SOM. This parameter is used when SM determines the BMU. Since message loss is an unavoidable aspect of the operation of a wireless sensor network, SM may not receive the computed neuron output values from all the motes in the network. Accordingly, this parameter is conceived to prevent the SM from waiting for too long and its value is set to 0.95 for all simulations. This value indicates that as soon as the SM receives responses from 95% or more of the motes in the WSN, it will proceed to the next step of computations. It is obvious however that this is an application specific value and will likely to be determined in an ad hoc manner.
During training, when a type 1 message that carries a neuron output value arrives at the supervisory mote (SM) for the first time, it will be stored in supervisory mote׳s memory. If at least 95% of motes with neurons responds, the supervisory mote proceeds with the identification of the BMU. The SM then informs the mote with the BMU neuron to update its weight vector and send the label information. If the message type is 6, meaning the supervisory mote receives an update from a generic mote, the SM records this information in its local memory. The SM waits until no further update notification is received from the BMU and those motes in its topological neighborhood for a predetermined time period which is defined empirically. Then it sends out the next training pattern.
When a generic mote receives a message, it first checks the message type. If it is type 0, then it calculates its neuron output using the received input data pattern and sends the computed neuron output back to the supervisory mote with a message type of 1. If it is type 2, meaning that the SM informs this generic mote (GM) that it is the BMU, the generic mote updates its weight vector and sends weight update request to other motes in its topological neighborhood. If it is type 3, meaning that the GM receives a weight update request from the BMU, the GM checks to see if it is in the current topological neighborhood of the BMU mote that sent the message. If yes, then the GM updates its weight vector. Although the routing protocol to communicate weight update requests is flooding, repeated and unnecessary recalculation of weights due to packets recirculating endlessly can be prevented through a simple scheme as follows. A mote can simply forward only those packets, which it has not seen before (requiring unique source identifier and sequence numbers for each packet by its generator). Furthermore, additional information such as “time to expire” or the “maximum number of hops” can be incorporated into the packets to prevent needles propagation. If the message type is 5, meaning that the GM which is also the BMU receives label information from the SM, then it attaches the label information and sends a message with type 6 to the SM. This informs the SM that the label is attached and asks SM to prepare the next label.
A number of preprocessing and initialization steps were implemented. The training data is normalized using the min–max normalization technique to a value in the range [0, 1]. The weights are initialized to random values that are uniformly distributed in [0, 1]. This is implemented by using the MATLAB rand() function (without any arguments) which generates a random value in the range of [0, 1] with standard uniform distribution. Presentation order of training patterns is based on the sequential method for both WSN–SOM and MATLAB SOM toolbox simulations.
If the self-organizing process starts with a neighborhood function that has a wide spread, it is reported that there is usually no risk for ending in metastable configurations of the map [33] and [34]. It has been demonstrated that initially unordered vectors will be ordered in the long run as a result of the SOM training process [33] and [34]. It was also stated by Erwin et al. [33] and [34] that, if the neighborhood function is convex, there exist no stable states other than ordered ones. On the other hand, if the neighborhood function is concave, then there exists a metastable state, which may slow down the ordering process by orders of magnitude.
This study employs a variant of Gaussian neighborhood function, which uses message hop count instead of spatial distance between motes to establish the neighborhood relationship, and is given by
equation(6)
View the MathML source
Turn MathJax on
where α(tk) is the learning factor described in Eq. (3); hopji(tk)2 represents the message hop count from sender mote j to the receiver mote i, where this information can be extracted from the mote positioning within the WSN topology; and σ(tk) is as defined by Eq. (3).
Convergence or the conclusion of the training phase happens and can be detected when the topological neighborhood function shrinks to include only the best matching unit (BMU) and no others in its neighborhood, and when the weight changes reduce to a very small value for an entire sweep or epoch over the training patterns. This is the procedure applied for both WSN–SOM and MATLAB SOM simulations.
3.3. Performance evaluation metrics
We used both the quantization error and the topographic error measures to compare the solution quality. Quantization error is a well-known property that is traditionally related to many forms of vector quantization and clustering algorithms. It measures the map resolution and is computed by determining the average distance between the data or pattern vector and its BMU. One shortcoming of this metric is that it completely disregards the map topology and alignment. The following formula is used for the computation of the quantization error:
View the MathML source
where P is the number of training patterns, xi is the i-th training pattern, and wBMU,i is the weight vector of the BMU neuron for training pattern xi.
Topographic error measure requires the dataset information, and increases the error value when the respective best and second-best matching units are not adjacent. The total error is normalized to a range from 0 to 1 where 0 means perfect topology preservation. The topographic error is calculated through
View the MathML source
where i is the instance number of a total of P training patterns; and the value of function u(xi) is 1, if for input pattern xi, the first and second BMUs are not adjacent, and is 0 otherwise [45].
3.4. Data set: alphanumeric symbols
The text data set [46] entails five dimensional instance patterns representing uppercase letters in the English alphabet as well as Arabic numerals 1 through 6 as presented in
การประหารชีวิตของโค้ดในโปรแกรมจะถูกทริกเกอร์ โดยเดินทางมาถึงในการจำลองเวลาบรรทัด ) ของเหตุการณ์ ซึ่งเสียชีวิตจากเหตุการณ์จำลอง คิว ขึ้นอยู่กับชนิดของเหตุการณ์ โดยเฉพาะการป้องกันรหัสหรือกิจวัตรรัน . เมื่อมาถึงเหตุการณ์ในชั้นการประยุกต์โปรแกรมแรกจะกำหนดประเภทของเหตุการณ์ และตามชนิดของรันที่ตรงกับตามปกติ ตัวอย่าง ถ้ามันเป็นการเริ่มต้น ( init_application ) และเหตุการณ์ที่สร้างขึ้นโดยผงนิเทศ , นิเทศโมตโหลดและปรับข้อมูลการฝึกอบรมและส่งไปยังโมตส์ทั่วไป แต่ถ้าเป็นกิจกรรมที่สร้างขึ้นโดยแฟชั่นทั่วไปแล้วผงทั่วไป initializes น้ำหนักเวกเตอร์ ถ้ามันเป็น packet_received หรือเหตุการณ์ collided_packet_received , ใบสมัครตรวจสอบก่อนเพื่อดูว่า เป็นครั้งแรกที่ข้อความได้ถึงแฟชั่นนี้ ถ้าคำตอบคือ ใช่ แล้วกระบวนการข้อมูล ไม่งั้น มันก็จะไม่สนใจมัน เมื่อโปรแกรมทำงานเสร็จก็เก็บผลลัพธ์สุดท้ายไปยังแฟ้ม .
พารามิเตอร์อื่นซึ่งเรียกว่า " notification_limit " ที่ระบุไว้ในใบสมัครชั้นรหัส WSN –ส้ม พารามิเตอร์นี้จะใช้เมื่อ SM กำหนดซึ่งได้รับการสนับสนุนจาก . ตั้งแต่สูญเสียข้อความเป็นลักษณะหลีกเลี่ยงไม่ได้ของการดำเนินงานของเครือข่ายเซ็นเซอร์ไร้สาย , SM อาจไม่ได้รับการคำนวณค่าจากเซลล์ออกโมตส์ทั้งหมดในเครือข่าย ตามพารามิเตอร์นี้จะตั้งครรภ์เพื่อป้องกันไม่ให้ SM รอนานเกินไปและค่าของมันเป็นชุด 0.95 สำหรับการจำลอง . ค่า นี้บ่งชี้ว่า ทันทีที่ SM ได้รับการตอบสนองจาก 95% หรือมากกว่าของโมตส์ใน WSN ก็จะดำเนินการในขั้นตอนต่อไปของการคำนวณ . มันชัดเจน แต่มันเป็นโปรแกรมเฉพาะ คุณค่า และ อาจจะต้องพิจารณาในลักษณะแบบเฉพาะกิจ
ในระหว่างการฝึกอบรม เมื่อประเภท 1 ข้อความที่มีเซลล์ประสาทมูลค่าส่งออกมาถึงโมตนิเทศ ( SM ) เป็นครั้งแรกจะถูกเก็บไว้ในการนิเทศ มลทิน׳ s หน่วยความจำ ถ้าอย่างน้อย 95% ของโมตส์กับประสาทตอบสนอง , ผงเงินกับการระบุของซึ่งได้รับการสนับสนุนจาก .SM แล้วแจ้งผงด้วยซึ่งได้รับการสนับสนุนจากเซลล์ประสาทเพื่ออัปเดตของน้ำหนักฟรีและส่งข้อมูลฉลาก ถ้าพิมพ์ข้อความเป็น 6 , ความหมายของแฟชั่นการนิเทศได้รับการปรับปรุงจากมลทินทั่วไป , บันทึกข้อมูลในหน่วยความจำสำหรับท้องถิ่นSM รอจนกว่าไม่มีการแจ้งเตือนการปรับปรุงเพิ่มเติมจะได้รับจากบิม่าและพวกโมตส์ในละแวกของทอพอโลยีสำหรับกำหนดเวลาที่กำหนดใช้ . แล้วมันส่งออกรูปแบบการฝึกต่อไป
เมื่อผงทั่วไปได้รับข้อความ ก็ตรวจสอบก่อนพิมพ์ข้อความ ถ้าเป็นประเภท 0แล้วมันจะคำนวณผลผลิตของเซลล์ประสาทที่ใช้รับและส่งข้อมูลแบบคำนวณเซลล์ประสาทผลผลิตกลับผงนิเทศกับข้อความประเภทที่ 1 ถ้าเป็น 2 ชนิด หมายความว่า เอสเอ็มแจ้งแฟชั่นทั่วไป ( GM ) เลยก็ว่าได้ ซึ่งได้รับการสนับสนุนจากผงทั่วไป , การปรับปรุงน้ำหนักเวกเตอร์และส่งน้ำหนัก update ให้โมตส์อื่น ๆ ในละแวกของทอพอโลยี . ถ้าเป็นประเภท 3ความหมายว่า จีเอ็มได้รับน้ำหนัก update จากบิม่า , จีเอ็ม ตรวจสอบเพื่อดูถ้ามันอยู่ในรูปแบบปัจจุบันของชุมชนซึ่งได้รับการสนับสนุนจากผงที่ส่งข้อความ ถ้าใช่ แล้ว จีเอ็ม การปรับปรุงน้ำหนักเวกเตอร์ แม้ว่าเส้นทางการติดต่อสื่อสารการร้องขอการปรับปรุงน้ำหนักคือน้ำท่วมซ้ําคํานวณและไม่จำเป็นของน้ำหนักเนื่องจากแพ็กเก็ตหมุนเวียนไม่รู้จบ สามารถป้องกันได้โดยง่าย โครงการ ดังนี้ เป็นมลทินสามารถส่งต่อแพ็กเก็ตเหล่านั้นเท่านั้น ซึ่งมันไม่เคยเห็นมาก่อน ( มีตัวเลขระบุแหล่งที่มาและลำดับสำหรับแต่ละแพ็กเก็ต โดยการสร้างเอกลักษณ์ ) นอกจากนี้ข้อมูลเพิ่มเติม เช่น " เวลาหมดอายุ " หรือ " จำนวนสูงสุดของฮอปส์ " สามารถรวมอยู่ในแพ็กเกจเพื่อป้องกันเข็ม ขยายพันธุ์โดยการเพาะเมล็ด ถ้าพิมพ์ข้อความเป็น 5 , ความหมายว่าจีเอ็มซึ่งเป็นบิม่าได้รับข้อมูลฉลากจาก SM ก็ให้ข้อมูลฉลาก และส่งข้อความที่มี 6 ชนิดใน SMนี้จะแจ้งให้ SM ที่ป้ายชื่อติดและขอให้ SM เตรียมป้ายต่อไป
จำนวนของการเตรียมและขั้นตอนการเริ่มต้นถูกนำมาใช้ ข้อมูลการฝึกอบรมเป็นปกติใช้มิน–แม็กซ์การฟื้นฟูเทคนิคค่าอยู่ในช่วง [ 0 , 1 ] น้ำหนักเป็นค่าสุ่มเริ่มต้นที่จุดกระจายใน [ 0 , 1 ]นี้จะดำเนินการได้โดยการใช้โปรแกรม MATLAB ( ฟังก์ชัน ( โดยไม่มีข้อโต้แย้ง ) ซึ่งจะสร้างค่าแบบสุ่มในช่วง [ 0 , 1 ] ที่มีการแจกแจงมาตรฐาน แสดงลำดับของรูปแบบการฝึกอบรมจะขึ้นอยู่กับวิธีต่อเนื่องทั้ง WSN –ส้ม ส้ม และโปรแกรมสำหรับจำลอง
ถ้าบนกระบวนการเริ่มต้นด้วยบ้านฟังก์ชั่นที่มีการกระจายกว้างมีรายงานว่า โดยปกติจะไม่มีความเสี่ยงสำหรับสิ้นสุดในเมตาสเตเบิลการกำหนดค่าของแผนที่ [ 33 ] และ [ 34 ] นี้ได้แสดงให้เห็นว่าตอนแรกจะสั่งเรียงลําดับเวกเตอร์ในระยะยาวผลของส้มกระบวนการฝึกอบรม [ 33 ] และ [ 34 ] มันยังระบุโดยเออร์วิน et al . [ 33 ] และ [ 34 ] , ถ้าเพื่อนบ้านเป็นฟังก์ชันนูนมีอยู่ไม่มีเสถียรภาพรัฐอื่นกว่าสั่งที่ ในทางกลับกัน ถ้าเพื่อนบ้านเป็นฟังก์ชันเว้า แล้วมีอยู่สถานะเมตาสเตเบิล ซึ่งอาจชะลอกระบวนการสั่งซื้อ โดยคำสั่งของขนาด
ศึกษาใช้ตัวแปรของฟังก์ชันละแวกเสียน ซึ่งใช้ข้อความแทนการกระโดดนับระยะห่างระหว่างโมตส์ เพื่อสร้างชุมชนสัมพันธ์และจะได้รับโดยสมการที่ ( 6 )
เปิดแหล่งที่มาดู MathML mathjax บน
ที่α ( TK ) คือการเรียนรู้ปัจจัยที่อธิบายไว้ในอีคิว ( 3 ) hopji ( TK ) 2 แสดงข้อความขึ้นมานับจากผู้ส่งไปยังผู้รับ มลทิน มลทิน เจ , ข้อมูลนี้สามารถสกัดได้จากที่ไหน ผงตำแหน่งภายใน WSN โครงสร้าง และσ ( TK ) เป็น กําหนดโดย อีคิว
( 3 )การลู่เข้าหรือบทสรุปของขั้นตอนการฝึกอบรมที่เกิดขึ้น และสามารถตรวจพบได้เมื่อฟังก์ชั่นใกล้เคียงทอพอโลยีจิตวิทยารวมเฉพาะตรงกับที่ดีที่สุด ( ซึ่งได้รับการสนับสนุนจากหน่วย ) และไม่มีคนอื่น ๆในชุมชนของตนและเมื่อน้ำหนักลด เพื่อเปลี่ยนแปลงค่าขนาดเล็กมากสำหรับทั้งกวาด หรือยุคผ่านการฝึกอบรมรูปแบบนี้คือขั้นตอนที่ใช้สำหรับทั้งสองและ WSN –ส้มส้ม MATLAB จำลอง
3 .
เราใช้ตัววัดสมรรถนะการประเมินทั้ง quantization ข้อผิดพลาดและข้อผิดพลาดภูมิประเทศมาตรการเพื่อเปรียบเทียบคุณภาพโซลูชั่น quantization ข้อผิดพลาด เป็นสมบัติที่รู้จักกันดีว่าเป็นประเพณีที่เกี่ยวข้องกับหลายรูปแบบของ quantization เวกเตอร์และการจัดกลุ่มขั้นตอนวิธีมันมาตรการความละเอียดแผนที่ และคำนวณโดยกำหนดระยะทางเฉลี่ยระหว่างข้อมูลหรือรูปแบบเวกเตอร์และซึ่งได้รับการสนับสนุนจาก . หนึ่งในข้อบกพร่องของตัวชี้วัดนี้ก็คือว่ามันสมบูรณ์ disregards แผนที่โครงสร้าง และแนว สูตรต่อไปนี้ใช้สำหรับการคำนวณของ quantization ข้อผิดพลาด :
ดูแหล่ง MathML โดยที่ P เป็นหมายเลขของรูปแบบการฝึกอบรมซีเป็น i-th ฝึกอบรมรูปแบบและ wbmu ฉันคือน้ำหนักเวกเตอร์ของซึ่งได้รับการสนับสนุนจากเซลล์ประสาทสำหรับซีรูปแบบการฝึกอบรม
ภูมิประเทศข้อผิดพลาดวัดต้องการข้อมูลเพิ่มค่าข้อมูลและข้อผิดพลาดเมื่อแต่ละที่ดีที่สุดและดีที่สุดที่ตรงกับสองหน่วยจะไม่ติดกัน ข้อผิดพลาดทั้งหมดเป็นปกติในช่วงตั้งแต่ 0 1 0 หมายถึงการรักษาที่สมบูรณ์แบบโทโพโลยีภูมิประเทศข้อผิดพลาดคำนวณผ่าน
ดู MathML แหล่ง
ที่ผมเป็นเช่นจำนวนรวมของจุดฝึกอบรม รูปแบบ และค่าของฟังก์ชัน U ( Xi ) คือ 1 ถ้าซีแบบใส่ , bmus ครั้งแรกและครั้งที่สองจะไม่ติดกัน และเป็น 0 มิฉะนั้น
[ 45 ]
3.4 . ชุดข้อมูลตัวเลข สัญลักษณ์
:ข้อมูลตัวอักษรชุด [ 46 ] ใช้ห้ามิติตัวอย่างรูปแบบของตัวอักษรตัวพิมพ์ใหญ่ในภาษาอังกฤษตัวอักษรเป็นเลขอารบิค 1 ถึง 6 ที่นำเสนอใน
การแปล กรุณารอสักครู่..
