Chapter 2 Division-test-based Real-value detector generation algorithm (2nd-2.1)

Source: Internet
Author: User
Chapter 2 Division-test-based Real-value detector generation algorithm

The detector generation algorithm is an important part of the real-value non-selection algorithm. However, the current real-value detector generation algorithms generally generate random candidate detectors, which are very random. In particular, when the monitoring accuracy is very high, in order to generate enough mature detectors, the time required for Random Algorithms is often very high.

This chapter presents a division test based real-value detector generation algorithm, short for PT-RNSA (real-valued detector generation algorithm based on the partition-test proess ). Unlike the previous detector generation algorithm, PT-RNSA is a deterministic algorithm. PT-RNSA ensures that all other non-self areas are covered by the sophisticated detector set, except in the Self-and non-my boundary areas, in addition, this algorithm takes less time to generate a mature detector.

2.1 Algorithm Description

This section first gives the idea of PT-RNSA algorithm, and then gives the algorithm implementation in two dimensional space.

2.1.1 algorithm ideas

 

1.Initialization: Regard the entire representation space as a super cube and use it as the candidate Super cube.

2.Test: Determines whether the super cube of the candidate matches the Self set. If there is no intersection, it is regarded as a mature detector.

3.Division: If the cube overlaps with the Self set (that is, at least cross coverage with a self-individual), it is evenly divided into smaller candidate Super cubes.

4. For each small super cube candidate divided in step 3, go to step 3 and repeat the "test-division" process until the final condition is met.

Fig 2.1PT-RNSA core idea

Figure 2.1 introduces the core idea of PT-RNSA, where Step 2 is the test stage of PT-RNSA, and step 3 is the division stage of PT-RNSA.

This article uses a binary group <C,R> Indicates a super cube. Where,CIs the center of the detector,RThe distance from the detector center point to the boundaries of each dimension.C= <C1,C2,C3 ,... ,CN>,R= <R1,R2,R3 ,... ,RN>, whereC1,C2,C3 ,... ,CN is the coordinate of the n-dimensional space center .,RI is the center edgeIThe distance from the dimension to the boundary of the Super cube. The covered area of a cuboid can be mathematical described as: <X1,X2 ,... ,XN> |X1-C1 | ≤R1 bytes |X2-C2 | ≤R2 ...... Optional |XN-CN | ≤RN, 1 ≤I≤ N ). Figure 2.2 is an example of a two-dimensional space rectangle with the center pointC= <CX,CY>,R= <RX, Ry>, mathematical description of the rectangle's coverage range is {<X,Y>||X-CX | ≤RX & |Y-CY | ≤RY }.

 

Fig 2.2Representation of two-dimensional space rectangles

 

 

Figure 2.3 shows the "Division-test" Process of PT-RNSA in two-dimensional space, which intuitively shows the "Division-test" idea of PT-RNSA.

 

 

 

Fig 2.3Test the division of Two-Dimensional Space

 

Figure 2.3 (a) shows the initial candidate detector, where a portion of the probe detector overlaps with the Self set (the black part in the figure is the intersection area ). Here, it is particularly noted that in this article, the intersection of candidate detector and Self set means that the candidate detector has a cross coverage area with at least one individual.

According to the Division test idea, first test whether the candidate detector is intersecting with the Self set, and the test result is the intersection of the two. Therefore, the candidate detector is evenly divided into four sub-candidate detectors, 2.3 (B ).

In Figure 2.3 (B), there are four candidate detectors. According to the algorithm flow, each candidate detector needs to be tested and divided. In the test phase, three candidate detectors do not interwork with the Self set, so these three candidate detectors that do not interwork with the Self set are identified as mature detectors. The remaining candidate detector that interacts with the Self set will re-execute the Division test process 2.3 (c ).

Figure 2.3 (c), Figure 2.3 (d), and Figure 2.3 (e) show similar division test processes. It is worth noting that in Figure 2.3 (E), the split candidate detector is smaller than the predefined minimum detector, so after the test phase is completed, candidate detectors that do not interwork with the Self set are identified as mature detectors, and those that do not interwork with the Self set will not be further divided.

As shown in Figure 2.3, the non-I region is gradually tiled by the mature detector, especially those that are not covered by the detector and that are only at the boundaries of the Self-region. Moreover, as the depth of Division increases, the boundary areas that are not covered by mature detectors become smaller and smaller. In addition, we can see from Figure 2.3 that there is no cross coverage between various mature detectors.

 

2.1.2 Algorithm Implementation in two-dimensional space

Figure 2.4 shows the pseudo code of the PT-RNSA Algorithm in two-dimensional space. In Figure 2.4, the final condition of an algorithm is the predefined distance from the smallest detector center point to the boundary of each dimension, that isR0. Of course, you can also set other termination conditions, such as the number of mature detectors required and predefined detection rates.

 

D: Indicates a candidate detector,D= <C,R>

C: The center of the detector,C= <CX,CY>

R: The distance from the detector's center point to the boundary of each dimension,R= <RX,RY>

R0: the predefined distance from the smallest detector center point to the boundary of each dimension

D: Mature detector set

Q: queue Data Structure

1. PT-RNSA ()

2 .{

3.Initialization:D= <C,R> Set the initial values of candidate detectors to overwrite the entire problem representation space;

The mature detector set D is left blank;

Set queue Q to an empty queue;

4. If (Candidate DetectorDDo not interwork with the self-set) then

5 .{

6. d Every {D};

7. return;

8 .}

9. enqueue (D); // Set the candidate DetectorDPut in queue Q

10. While (Q! = NULL)

11 .{

12.D= Dequeue (Q); // retrieve the first element from queue Q and remove it from the queue

13. Pt-detector (D);

14 .}

15 .}

16. Pt-detector (d )//D= <C, r>

17 .{

18. If (R<R0) then

19. return;

20. Divide candidate detector D evenly into four smaller candidate detectors, namelyDI (1 ≤I≤ 4 );

21. For eachDI (1 ≤I≤ 4)

22 .{

23. If (DI do not interwork with the self-set) then

24. d between D {DI };

25. Else

26. If (DI will not be completely covered by any self-individual) then

27. enqueue (DI );

28 .}

29 .}

Fig 2.4Pseudo Code of PT-RNSA in two-dimensional space

 

2.2 detector coverage rate of PT-RNSA

PT-RNSA is different from the traditional real-value detector production algorithm, the main difference is that PT-RNSA is a deterministic algorithm, good stability. This section mainly analyzes the types of candidate detectors generated by the algorithm and the coverage of the final mature detector to the entire non-self space.

2.2.1 border Detector

Candidates can be divided into two types based on the intersection of candidate detector and Self set.

(1) candidate detector and self-region intersection;

(2) The candidate detector does not overlap with the self-region.

2.5, the first category can be divided into the following three situations.

A candidate detector is in the self Region

B candidate detector contains self-region

C candidate detector and self-region boundary Intersection

 

 

 

In PT-RNSA algorithms, candidate detectors that do not interwork with self sets are identified as mature detectors. That is to say, the candidate detector in Figure 2.5 (d) will be viewed as a mature detector. The candidate detector that interacts with the Self set should adopt two different strategies based on the intersection type:

When the candidate detector is inside the self-region, it can be determined that the candidate detector is invalid and will not be further divided.

When the candidate detector contains a self-region or the candidate detector interacts with the self-region boundary, the Division continues.

That is to say, we will ignore this situation in Figure 2.5 (. For the two situations shown in Figure 2.5 (B) and Figure 2.5 (C), further division testing is required for this candidate detector.

Definition 2.1 boundary detector: A candidate detector that intersection both the Self set and contains some non-self space is called a boundary detector.

The boundary detector corresponds to (B) and (c) in Figure 2.5. Apparently, the boundary detector is not a mature detector.

Theorem 2.1 after the PT-RNSA algorithm is completed, only the non-self space in the boundary detector is not covered by the mature detector.

Proof: According to the PT-RNSA algorithm (Figure 2.4), the entire representation space is covered by all candidate detectors tiled, and there are two types of candidate detectors, one is intersection with the self-region, first, it does not conflict with the self-region. The candidate detector that does not intersection the self-region is a mature detector, where the non-I-region covered by the mature detector is recorded as um. The candidate detectors that intersect with the self-region are divided into two types: the boundary detector and the candidate detector are completely inside the self-set. In both cases, only the boundary detector contains part of the non-self-region, and the boundary detector cannot become a mature detector because it contains part of the self-region. If some of the non-I regions included by the boundary detector are recorded as UB and the entire non-I space is recorded as U, then u = Um + ub. It can be seen that only UB in non-I space U is not covered by mature detectors. Therefore, in the entire non-My Space, only the non-my area inside the boundary detector is not covered by the mature detector.

Theorem 2.2 the distance from the center of the boundary detector to the boundary of each dimension at the end of the PT-RNSA AlgorithmRThe distance from the smallest detector center point to the boundary of each dimension is less than the predefinedR0.

Proof: Assuming that after the PT-RNSA algorithm (Figure 2.4) ends, there is a distance from the center of a boundary detector to the boundary of each dimensionRGreaterR0. As shown in Figure 2.4, if the algorithm does not reach the end condition, it must be further divided, which is in conflict with the algorithm. Therefore, the distance from the center of the boundary detector to the boundary of each dimension is reached at the end of the algorithm.RLessR0. Apparently, when the predefinedR0 minus hours,RAlso decreases.

To sum up, with the predefinedR0 is reduced, and the distance from the center of the boundary detector to the boundary of each dimension isRThis reduces the number of non-I regions that are not covered by mature detectors.R0 decreases. In contrast, the coverage of mature detectors isR0 decreases and increases.

 

2.2.2 detector set coverage rate analysis

A significant advantage of the PT-RNSA algorithm is that mature detectors are tiled to cover non-I-spaces and there is no cross-coverage between detectors. With this feature, we can easily find out the non-I-space range covered by all mature detectors.

Suppose there areNMature detectorsIThe coverage range of each mature detector is (1 ≤ I ≤ n), and the non-I-Space Range of all mature detectors is.

Assume that the entire non-My Space Range isSN, the ratio of the non-my region covered by the detector set to the entire non-My Space AreaPC is. This ratioPC is also the coverage rate of the detector set. When not all spaces are covered by mature detectors,PC = 1.

Although the Non-I-space range covered by the mature detector can be obtained, the entire non-I-Space coverageSN is an unknown number and it is not easy to obtain directly. Therefore, this paper uses the Monte Carlo Method for approximate calculation.SThe value of N.

First, randomly generated in the entire representation spaceTSample Points. Some of these sample points fall into the self-space, and the others fall into the non-self-space. Secondly, assume thatTM sample points fall into non-my space. When the number of randomly generated sample points is large enough, that isTWhen it is large enough, the range of non-I-space can be approximately calculated as, whereS0 indicates the entire range of space.

However, the Monte Carlo algorithm has certain errors, and the statistical error is about [66, 67]. Therefore, the range of non-my space is approximately equal. In this case, the coverage rate of the detector setPC is

 

In the experiment, the coverage rate of the detector setPC can be used as an estimation of the detection rate. Specifies the expected detection rate.PC. The coverage of the detector set to be generated must meet the following inequality:


2.3 test lab

The dataset used in the experiment is from http://www.zhouji.net/prof/2dsyntheticdata.zip. Benchmark data is used as a test set to test the performance of the generated detector. All the individuals in the examples are used as test sets for experiments.

All data in 2dsyntheticdata.zip of the data set is taken from two-dimensional space. The whole space is in square shape.

2.3.1 PT-RNSA detector and RRelationship of 0

In Figure 2.6, the Black Shadow part is the self area covered by the Self sample, and each small square in the light color is a mature detector, the blank area is not covered by the mature detector.

As shown in Figure 2.6 (),RWhen 0 = 0.1, five mature detectors are generated, and as shown in Figure 2.6 (B), whenRWhen 0 is reduced to 0.05, more mature detectors are generated. Figure 2.6 (C), Figure 2.6 (D), Figure 2.6 (E), and Figure 2.6 (f) show similar situations.

As shown in Figure 2.6R0 decreases, more and more mature detectors are generated, and the non-I-space range covered by mature detectors is growing, while the non-I-range covered by immature detectors is becoming smaller and smaller. Predictable, whenR0 very hour, mature detector will cover the whole non-my space. In fact, as shown in Figure 2.6, whenRWhen the value of 0 is reduced to 0.001, almost all non-I space is covered by mature detectors.

 

2.3.2 comparison of PT-RNSA and V-detector algorithms [49]

In this section, the algorithm performance of PT-RNSA and V-detector is compared, and each experiment runs 100 times independently.

In the experiment, the V-detector algorithm compared with the PT-RNSA algorithm performance is downloaded from http://www.zhouji.net/prof/vdetector.html ". Compared with the V-detector algorithm, the PT-RNSA shows its advantage in time consumption.

In algorithm comparison, the main performance evaluation indicator is the average cost of generating a mature detector.Cost, Detection ratePF and the number of mature detectors requiredDM. WherePF is the ratio of the number of non-My individuals detected in the test set to the total number of non-My individuals in the test set.CostThe definition is as follows:

 

 

 

 

........................................ ..

.........................................

The experiment data is omitted because there are too many images and the system cannot upload the experiment data...

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.