Research Article

A Mobile Bayesian Network Structure Learning Method Using Genetic Incremental K2 Algorithm and Random Attribute Order Technology

Algorithm 1

Random array algorithm.
(1)Procedure randomarray(len, start, end) (
(2) {Input n, n is nodes number.}
(3) {Output: an array that has n values between 1 and n.}
(4)  Define the array[1,n]: order
(5)   for1 1-n {
(6)    Random generation of a number between 1 and n
(7)    If (the number is the first number) {insert the number into the array; }
(8)     Else{
(9)     for2 1-length(array){
(10)    If(the number exits){ regenerate a random number, loop for2}
(11)   else{insert the number into the array; loop for1}
(12)   End for2}
(13)  End else }
(14) End for1}
(15)End randomarray }