Implementing general belief function framework with a practical codification for low complexity

In this chapter, we propose a new practical codification of the elements of the Venn diagram in order to easily manipulate the focal elements. In order to reduce the complexity, the eventual constraints must be integrated in the codification at the b…

Authors: ** Arnaud Martin **

Implementing general belief function framework with a practical   codification for low complexity
Implemen ting general b elief function framew ork with a practical co dification for lo w complexit y Arnaud Martin ∗ ENSIET A E3I2-EA3876 Arnaud.Martin@ensie ta.fr No ve m b er 26, 2024 Abstract In this chapter, w e prop ose a new practical codification of the elemen ts of the V enn d iagram in order to easil y manipulate the fo cal elemen ts. In order to reduce the complexity , the even tu al co nstrain ts must be inte- grated in the co dification at the b eginning. Hence, w e only consider a reduced hyper p ow er set D Θ r that can b e 2 Θ or D Θ . W e describe all the steps of a general b elief f unction framew ork. The step of decision is particularly studied, indeed, w h en we can decide on intersections of the singletons of the discernment space no ac tual decision functions are easily to use. Hence, t w o approaches are prop osed, an extension of previous one and an approach based on th e sp ecificity of the elements on which to decide. The principal goal of th is c hapter is to provide practical codes of a general belief function framew ork for the researc hers and users needing the b elief function th eory . Keywords: DSmT, practical co dification, DSmT decision, low complexity . 1 In tro d uction T o day the b elief function theory initiated by [6, 26] is recog nized to prop ose one of the more complete theo r y for hu man reas o ning under uncertain ty , and hav e b een applied in many kinds of applica tions [3 2]. This theory is based on the use of functions defined on the p ow er set 2 Θ (the s et of all the subsets of Θ), where Θ is the set of considered elements (ca lled disc ernment sp ac e ), whereas the probabilities are defined only on Θ. A mass funct ion or b asic b elief assignment , m is defined by the mapping of the p ow er set 2 Θ onto [0 , 1] with: X X ∈ 2 Θ m ( X ) = 1 . (1) ∗ This work was carried out while the author was visiting DRDC (Def ense Research and Dev elopment Canada) at V alcatier, Qu´ ebec, Canada, and i s partially suppor ted by the DGA ( D ´ el ´ egation g´ en´ er ale p our l’Armement ) and by BMO ( Br est M´ etr op ole O c´ eane ). 1 One element X o f 2 Θ , such as m ( X ) > 0, is called fo c al element. The set o f fo c a l elements for m is noted F m . A mass function where Θ is a fo cal elemen t, is called a non-do gmatic mass functions. One of the main go al of this theory is the combination of information g iven b y many exp er ts. Wh en this information can b e written as a mass function, many combination rules can be used [23]. The first com bination rule prop osed b y Dempster and Shafer is the normalized co njunctiv e combination rule given for tw o basic be lief ass ignments m 1 and m 2 and for all X ∈ 2 Θ , X 6 = ∅ by: m DS ( X ) = 1 1 − k X A ∩ B = X m 1 ( A ) m 2 ( B ) , (2) where k = X A ∩ B = ∅ m 1 ( A ) m 2 ( B ) is the inconsistence of the combination. How ever the high computational complexity , espe c ia lly co mpared to the probability theo r y , rema ins a problem for more industrial uses. O f c o urse, higher the cardinality of Θ is, higher the complexity b ecomes [3 8]. The com bination rule of Dempst er and Sha fer is # P -complete [25]. Mor eov er, when co mbin ing with t his comb ination r ule, non-dogmatic ma s s functions, the n umber of focal element s can not decr ease. Hence, we can distinguish tw o kinds of approaches to re duce the complexity of the b elief function framework. First we ca n try to find optimal algo rithms in order to co de the b elief functions and the combination rules based on M¨ obius transform [18, 3 3] or based on lo c al computations [2 8] or to adapt the algo rithms to particular s mass functions [27, 3]. Sec o nd we can try to reduce the n umber of fo cal elements by approximating the ma ss functions [37, 36, 4, 9, 16, 17], that could b e particularly imp ortant fo r dynamic fusion. In practical applications the ma s s functions contain at first only few fo ca l element s [7, 1]. Hence it seems interesting to only work with the fo cal elements and not with the entire space 2 Θ . T ha t is not the case in all gener al developed algorithms [18, 33]. Now if w e consider the extension of the b elief function theory propos e d by [10], the mass function a re defined on the extension of the pow er set in to the h yp e r power set D Θ (that is the set of all the disjunctions a nd conjunctions of the elements of Θ ). This extensio n can b e seen as a generalizatio n of the classical appro ach (and it is also called DSmT for Dezert and Smarandache Theory [29, 30]). This ex tensio n is justified in so me applications such as in [20, 2 1]. T ry to gener ate D Θ is not easy and b ecomes unt ractable for mo re than 6 elements in Θ [1 1]. In [12], a fir st prop osition hav e b een pro po sed to order elemen ts of hyper power set for matrix calculus such as [18, 33] made in 2 Θ . But as we said herein, in real applications it is b etter to only manipulate t he focal elements. Hence, some authors prop os e algor ithms considering only the fo cal elements [9 , 15, 22]. In the pr evious volume [30], [15] have prop osed Matlab 1 co des for DSmT hybrid rule. These co des are a pre liminar y work, but first it is really not o ptimized for Matlab and seco nd hav e b een developed for a dynamic fusion. Matlab is certainly not the b est prog ram language to reduce the s peed of pro cessing, how ever most of p eo ple using b elief functions do it with Matlab. 1 Matlab i s a trademark of The MathW orks, Inc. 2 In this chapter, we propos e a co dification of the fo cal elemen ts based on a co dification of Θ in order to prog ram easily in Matlab a general b elief function framework working for b elief functions defined on 2 Θ but also on D Θ . Hence, in the following section we recall a shor t background o f b elief function theory . In section 3 w e in tro duce our practical codification for a general b elief function fra mework. In this sectio n, we describ e all the steps to fuse basic b elief assignments in the or der of necessity: the co dification of Θ, the a ddition of the constraints, the co dification of fo ca l e lements, the step of combination, the step of decision, if neces sary the generation of a new p ow er set: the r e duc e d hyp er p ower set D Θ r and for the display , the deco ding. W e par ticularly inv estigate the step of t he decision for the DSmT. In section 5 w e give the ma jor part of the Matlab co des of this fra mework. 2 Short bac kground of b elief functions theory In the DSm T, the mass f unctions m are defined by the mapping of the h yp er power set D Θ onto [0 , 1] with: X X ∈ D Θ m ( X ) = 1 , (3) with less terms in the sum than in the equation (3). In the more gener al mo del, w e ca n add constraints on some elements of D Θ , that means that so me elements can nev er b e focal elements. Hence, if w e add the co nstraints that all the intersections of elements of Θ are imp os sible ( i.e. empt y ) we recov er 2 Θ . So, the co ns traints giv en by the application can drastically reduce the num b er o f p oss ible fo ca l elements a nd so the complexity of the f ramework. On the contrary of the sugges tion given by the flow chart on the cov er of the b o ok [29] and the prop os e d co des in [1 5], we think that the constraints must b e int egrated directly in the co dificatio n of the fo ca l element s of the mass functions as we sho wn in se c tio n 3. Her e under , the hyper p ow er set D Θ taking into account the constraints is called the r e duc e d hyp er p ower s et and noted D Θ r . Hence, D Θ r can b e D Θ , 2 Θ , hav e a ca rdinality bet ween these t wo p ow e r sets or inferio r t o these t wo power s e ts. So the normality co ndition is given by: X X ∈ D Θ r m ( X ) = 1 . (4) Once defined the mass functions coming from numerous so urces, many com- bination rules ar e p ossible (see [5 , 31, 20, 35, 23] for recent reviews of the com- bination rules). The most of the combination rules are based on the co njunctiv e combination r ule, given for mass functions defined o n 2 Θ b y: m c ( X ) = X Y 1 ∩ ... ∩ Y s = X s Y j =1 m j ( Y j ) , (5) where Y j ∈ 2 Θ is the resp onse of the source j , and m j ( Y j ) the corre s po nding basic b elief assignment. This rule is commutativ e, a sso ciative, not idempo ten t, and the ma jor pr oblem that try to re s olve the ma jor it y of the rules is the increasing of the b elief on the empt y set with the num b er of so urces and the 3 cardinality of Θ [19]. Now, in D Θ without any constraint, there is no empty set, and the conjunctive r ule given by the equa tion (5) for all X ∈ D Θ with Y j ∈ D Θ r can b e used. If we have some co nstraints, w e must to transfer the belief m c ( ∅ ) o n other elements of the reduced hyper p ow er se t. There is no optimal combination rule, and we cannot achiev e this optimality for general applications. The las t step in a general fra mework for information fusion system is the decision step. The dec is ion is also a difficult task be cause no measur es are able to provide the b est decision in all the cas e s . Gener ally , we consider the maximum of one of the three functions: credibilit y , plausibility , and pig nistic probability . Note that other decis ion functions hav e b een pro po sed [13]. In the context of the DSmT the corr esp onding generalized functions have been pro p o sed [14, 29]. The ge neralized credibility Bel is defined by: Bel( X ) = X Y ∈ D Θ r ,Y ⊆ X,Y 6≡∅ m ( Y ) (6) The g eneralized plausibility P l is defined by: Pl( X ) = X Y ∈ D Θ r ,X ∩ Y 6≡∅ m ( Y ) (7) The ge ner alized pignistic pr obability is given for all X ∈ D Θ r , with X 6 = ∅ is defined by: GPT( X ) = X Y ∈ D Θ r ,Y 6≡∅ C M ( X ∩ Y ) C M ( Y ) m ( Y ) , (8) where C M ( X ) is the DSm ca rdinality corresp onding to the num b er of parts o f X in the V enn diagram of the pr oblem [14, 29]. Generally in 2 Θ , the maximum of these functions is taken on the element s in Θ. In this case, with the go al to r e - duce the co mplexit y we o nly hav e to calculate these functions o n the singletons. How ever, first, there exist metho ds pro v iding decision on 2 Θ such as in [2 ] and that can b e interesting in so me application [2 4], a nd s econdly , the sing letons are not t he more p recise elemen ts on D Θ r . Hence, to calculate these fun ctions on the en tire reduced h yp er p ow er set could be necessary , but t he complexit y could not b e inferior to the complexity o f D Θ r and that can b e a real problem if there ar e few constraints. 3 A general b elief function framew ork W e introduce her e a prac tica l co dification in order to consider all the previo us remarks to reduce the complexity: • only manipulate fo cal elements, • add constraints on the fo cal elements b efore combination, and so work on D Θ r , • a co dification easy for union and in tersection op e r ations with pr ograms such as Matlab. 4 W e first give the simple idea of the practical co dification for enumerating the distinct parts of the V enn dia g ram and so a co dification of the discernment space Θ. Then we explain how simply add the constraints on the distinct elemen ts of Θ and so the co dification of the foca l elemen ts. The subsections 3.4 and 3.5 show how to combine and decide with this practical co dification, giving a particular reflexio n o n the decision in DSmT. The subsectio n 3 .6 presents the generation of D Θ r and the subsection 3 .7 the deco ding. 3.1 A practical co dification The simple idea o f the pra ctical co dification is ba sed on the a ffectation of an in teger num b er in [1 ; 2 n − 1] to each distinct part of the V enn dia g ram that contains 2 n − 1 distinct parts with n = | Θ | . The figur es 1 a nd 2 illustra te the co dification for resp ectively Θ = { θ 1 , θ 2 , θ 3 } and Θ = { θ 1 , θ 2 , θ 3 , θ 4 } with the co de given in section 5. Of cours e o ther r epartitions of these in tege r s are po ssible. Figure 1: Co dification for Θ = { θ 1 , θ 2 , θ 3 } . Hence, for example the elemen t θ 1 is giv en by the concatenation of 1 , 2, 3 and 5 for | Θ | = 3 a nd by the concatena tio n of 1, 2, 3, 4 , 6, 7, 9 and 12 for | Θ | = 4. W e will note resp ectively θ 1 = [1 2 3 5] and θ 1 = [1 2 3 4 6 7 9 12] for | Θ | = 3 and for | Θ | = 4, with increasing or der o f the integers. Hence, Θ is given resp ectively for | Θ | = 3 and | Θ | = 4 by: Θ = { [1 2 3 5] , [1 2 4 6] , [1 3 4 7 ] } and Θ = { [1 2 3 4 6 7 9 1 2] , [1 2 3 5 6 8 1 0 13] , [1 2 4 5 7 8 11 14] , [1 3 4 5 9 1 0 11 15] } . The num b er of integers for the co dification o f one element θ i ∈ Θ is g iven by: 1 + n − 1 X i =1 C i n − 1 , (9) 5 Figure 2: Co difica tion for Θ = { θ 1 , θ 2 , θ 3 , θ 4 } . with n = | Θ | and C p n the num ber of p - uplets with n nu m ber s. The nu m ber 1 will be s till by co n ven tion the intersection of all the elements of Θ. The co dification of θ 1 ∩ θ 3 is given by [1 3] for | Θ | = 3 and [1 2 4 7] for | Θ | = 4. And the co dification of θ 1 ∪ θ 3 is given by [1 2 3 4 5 7] for | Θ | = 3 and [1 2 3 4 6 7 9 12 ] for | Θ | = 4. In order to reduce the co mplexit y , esp ecially us ing more hardware lang uage than Ma tlab, we c o uld use binary num b ers instea d of the integer num b ers. The Smarandach e’s co dification [11], was introduce for the en umeration of distinct parts o f a V enn diag ram. If | Θ | = n , < i > denotes the part o f θ i with no cov ering with other θ j , i 6 = j . < ij > denotes the part of θ i ∩ θ j with no cov ering with o ther parts of the V enn diagram. So if n = 2, θ 1 ∩ θ 2 = { < 12 > } and if n = 3 , θ 1 ∩ θ 2 = { < 12 >, < 123 > } , see the figure 3 for a n illustra tion for n = 3. The authors note a problem for n ≥ 10 , but if we intro duce space in the co dification we ca n conser ve int egers instead o f other symbols a nd we write < 1 2 3 > instead o f < 1 23 > . On the co nt rary of the Smara ndache’s co dification, the pro p osed co dification gives only one integer num b er to ea ch par t o f the V enn diagram. This co difica- tion is more complex for the reader then the Smarandache’s co difica tion. Indeed, the r eader ca n understa nd directly the Smar andache’s codification thanks to the mining of the num b ers knowing the n : each disjoint par t of the V enn diagr am is seen as an intersection of the elements of Θ. More exa ctly , this is a part of the in tersections. F or example, θ 1 ∩ θ 2 is given with the Smarandache’s co dification b y { < 12 > } if n = 2 and by { < 12 > , < 12 3 > } if n = 3 . With the co dification practical co dification the same element has a lso different co dification according to the num b er n . F or the pre vious example θ 1 ∩ θ 2 is given by [1] if n = 2 , and b y [1 2] if n = 3. 6 The pr op osed co dification is mor e practical for computing union and in ter- section op er a tions a nd the DSm cardinality , b ecause o nly one integer represent one of the distinct parts of the V enn diagram. With the Smar andache’s co di- fication computing union a nd intersection op erations a nd the DSm cardinality could be very simila r than with the practica l co dification, but adding a routine in o r der to treat the co de of one par t of the V enn diagr a m. Figure 3: Smarandache’s co dification for Θ = { θ 1 , θ 2 , θ 3 } . Hence, we prop ose to use the prop o sed co dification to co mpute union, in- tersection and DSm cardinalit y , and the Smarandache’s co dification, e asier to read, to present the res ults in order to safe even tually a scan of D Θ r . 3.2 Adding constrain ts With this co dification, adding constra int s is very simple a nd ca n r educe rapidly the nu mber of integers. E.g. ass ume that in a given application we know θ 1 ∩ θ 3 ≡ ∅ ( i .e. θ 1 ∩ θ 3 / ∈ D Θ r ), t hat means tha t the integers [1 3] for | Θ | = 3 and [1 2 4 7] for | Θ | = 4 do no t ex is t Θ. Hence, the co dification of Θ with the reduced discernment spac e , noted Θ r , is given resp ectively for | Θ | = 3 and | Θ | = 4 b y: Θ r = { [2 5] , [2 4 6] , [4 7] } and Θ r = { [3 6 9 1 2 ] , [3 5 6 8 1 0 13 ] , [5 8 11 1 4] , [3 5 9 10 1 1 15 ] } . Generally we ha ve | Θ | = | Θ r | , but it is not necessary if a constraint gives θ i ≡ ∅ , with θ i ∈ Θ . This can happen in dynamic fusion, if one element o f the discernment space can disa pp e a r. Thereby , the in tro duction of the simple c o nstraint θ 1 ∩ θ 3 ≡ ∅ in Θ, includes all the other constraints that follow from it such as the in tersection of all the element s of Θ is empty . I n [15] all the co nstraints must be g iven by the user . 7 3.3 Co dification of the fo c al elemen ts In D Θ r , the co dificatio n of the fo cal elements is given fr o m the re duced discer n- men t s pace Θ r . The co difica tio n of an union of tw o elements of Θ is given by the concatenation of the co difica tio n of the t wo elements using Θ r . The co dification of an in tersection o f tw o elements of Θ is g iven by the common n um b er s of the co dification of the tw o elements using Θ r . In the sa me way , the co dification of an union of tw o fo ca l e le ments is given by the concatena tion o f the co dification of the tw o fo cal elements and the co difica tio n o f an intersection of tw o foca l element s is giv en b y the c o mmon n umbers of the codification of the t wo fo ca l element s. In fact, for union a nd int ersection op er ations we only consider one element a s the set of the num b ers g iven in its co difica tion. Hence, with the previous exa mple (we assume θ 1 ∩ θ 3 ≡ ∅ , wit h | Θ | = 3 o r | Θ | = 4), if the following elements θ 1 ∩ θ 2 , θ 1 ∪ θ 2 and ( θ 1 ∩ θ 2 ) ∪ θ 3 are some fo c a l elements, there a re co ded for | Θ | = 3 b y: θ 1 ∩ θ 2 = [2] , θ 1 ∪ θ 2 = [2 4 5 6] , ( θ 1 ∩ θ 2 ) ∪ θ 3 = [2 4 7 ] , and for | Θ | = 4 by: θ 1 ∩ θ 2 = [3 6] , θ 1 ∪ θ 2 = [3 5 6 8 9 10 12 13] , ( θ 1 ∩ θ 2 ) ∪ θ 3 = [3 5 6 8 11 14] . The DSm car dinality C M ( X ) of o ne fo ca l element X is simply given by the num b er of integers in the co dification of X . The DSm cardinality of one singleton is g iven b y the equa tion (9), only if there is none constra int on the singleton, and inferior otherwise. The previous example with the foca l elemen t ( θ 1 ∩ θ 2 ) ∪ θ 3 illustrates w ell the easiness to deal with the brack ets in one expression. The co dification of the fo c a l elements can be made with any bra ck ets. 3.4 Com bination In order to manage only the fo cal elements and their ass o ciated bas ic belief assignment, we can use a list s tructure [9, 15, 22]. The in tersection and union op erations betw een tw o fo cal elements coming from tw o mass functions a re made as describ ed b efore. If the intersections b etw ee n tw o fo cal elements is empty the asso ciated co dification is [ ]. Hence the c onjunctiv e c o mbin ation rule algor ithm can b e done by the alg o rithm 1. The disjunctive combination rule alg orithm is exactly the same by changing ∩ in ∪ . Once again, the interest o f the co dification is for the int ersection and union op erations. Hence in Ma tlab, we do not need to redefine these op erations as in [15]. F or more complicated combination rules suc h as PCR6, we ha ve generally to co nserve the intermediate calculus in order to tra nsfer the partial conflict. Algorithms for these rules hav e b een pro p osed in [22], a nd Matlab co des are given in section 5. 8 Algorithm 1: Co njunctiv e rule Data : n exp erts ex : ex [1] . . . ex [ n ], ex [ i ] .f ocal , ex [ i ] .bba Result : F usio n o f ex by conjunctive rule: conj extmp ← ex [1]; for e = 2 to n do comb ← ∅ ; foreac h f oc 1 in extmp.f ocal do foreac h f oc 2 in ex [ e ] .f ocal do tmp ← extmp.f ocal ( f oc 1 ) ∩ ex [ e ] .f ocal ( f oc 2); comb.f ocal ← tmp ; comb.bba ← extmp.bba ( f oc 1) × ex [ e ] .bba ( f oc 2); Concatenate s a me fo cal in comb ; extmp ← comb ; conj ← extmp ; 3.5 Decision As we write b efor e, we can decide with one o f the functions given by the equa- tions (6), (7), or (8). These functions ar e increasing functions. Hence generally in 2 Θ , the decision is taken on the elemen ts in Θ by the maximum of these functions. In this case, with the goa l to reduce the complexity , we only have to calculate these functions on the singletons. How ever, first, we can provide a d ecision on any element o f 2 Θ such as in [2] that ca n be in teresting in s ome applications [24], and second, the singletons a re not the m ore precise or in ter- esting element s on D Θ r . The fig ures 4 and 5 show the DSm cardinality C M ( X ), ∀ X ∈ D Θ with resp ectively | Θ | = 3 and | Θ | = 4. The s pe c ificity of t he sing le - tons (given by the D Sm cardinality) app ear s a t a cen tral p os ition in the set of the sp ecificities of the elements in D Θ . Hence, to ca lc ula te these decisio n functions on all the re duced hyper p ow er set could be necessar y , but the co mplexit y could no t be inferior to the complexit y of D Θ r and that can b e a real problem. The more rea sonable appr oach is to consider either only the fo cal elements or a subset o f D Θ r on which we calcula te decision functions. 3.5.1 Extended w eighted approac h Generally in 2 Θ , the decisions are only made on the singletons [8 , 34], and only few approaches prop o se a decision on 2 Θ . In order to provide decisio n on any element s o f D Θ r , w e ca n firs t extend the principle of the prop osed a pproach in [2] on D Θ r . This approach is based on the w e ig ht ing o f the plausibility with a Bay esia n mass function taking in to account the cardinality of the e lemen ts of 2 Θ . In a general case , if there is no constra int , the plausibilit y is not interesting beca use all elemen ts cont ain the intersection of all the singletons of Θ. Acco rding the co ns traints the pla usibilit y co uld b e applied. Hence, we generalize here the weigh ted approach to D Θ r for ev er y decision function f d (plausibilit y , credibility , pignistic pro babilit y , ...). W e note f wd the 9 Figure 4: DSm cardinality C M ( X ), ∀ X ∈ D Θ with | Θ | = 3. weigh ted decisio n function given for all X ∈ D Θ r b y: f wd ( X ) = m d ( X ) f d ( X ) , (10) where m d is a basic b elief a ssignment given by: m d ( X ) = K d λ X  1 C M ( X ) s  , (11) s is a parameter in [0 , 1] allowing a decision from the in tersection o f all the singletons ( s = 1) (instead of the singletons in 2 Θ ) until the total indecision Θ ( s = 0 ). λ X allows the integration of the lack of knowledge on one o f the element s X in D Θ r . The consta n t K d is the normalization factor giving by the condition of the equation (4). Thus we decide the element A : A = arg max X ∈ D Θ r f wd ( X ) , (12) If we only wan t to decide on which ever focal e lemen t of D Θ r , we only consider X ∈ F m and we decide: A = arg max X ∈F m f wd ( X ) , (13) with f wd given by the equation (10) and: m d ( X ) = K d λ X  1 C M ( X ) s  , ∀ X ∈ F m , (14) s a nd K d are b o th par a meters defined ab ove. 10 Figure 5: DSm cardinality C M ( X ), ∀ X ∈ D Θ with | Θ | = 4. 3.5.2 Decision ac cording to the sp ecificit y The cardinality C M ( X ) ca n be seen as a sp ecificity measure of X . The figures 4 and 5 s how that for a g iven sp ecificity there is different kind of elements such as singletons, unions of int ersections or intersections of unions. The figure 6 shows well the central r ole o f the singletons (the DSm ca rdinality of the singleto ns for | Θ | =5 is 16), but a ls o that there is ma ny other element s (619) with exactly the sa me ca rdinality . Hence, it could b e int eresting to precise the sp ecificity of the elements on which we wan t to decide. This is the role of s in the App riou approach. Here we prop ose to directly give the wanted sp ecificit y or an interv al of the want ed specificity in order to build the subset of D Θ r on which w e c a lculate decision functions. Thus we decide the element A : A = arg max X ∈S f d ( X ) , (15) where f d is the chosen decision function (credibility , plausibilit y , pignistic pro b- abilit y , ...) a nd S =  X ∈ D Θ r ; min S ≤ C M ( X ) ≤ max S  , (16) with mi n S and max S resp ectively the minim um a nd maximum of the sp ecificity of the wan ted elements. If mi n S 6 = max S , if have to chose a p ondered decision function for f d such as f wd given by the equation (10). How ever, in order to find all X ∈ S we must scan D Θ r . T o av oid to scan all D Θ r , we ha ve to find the cardinality of S , but w e ca n only ca lc ula te an upper bo und of the cardinality , unfortunately never re a ched. Let define the num b er of e lements of the V enn diagr am n V . T his num b er is given by: n V = C M n [ i =1 θ i ! , (17) 11 Figure 6: Number of elements of D Θ for | Θ | = 5, with the sa me DSm cardinality . where n is the cardinalit y of Θ r and θ i ∈ Θ r . Recall that the D Sm car dinalit y is simply given by the num b er of integers of the co dification. The upp er b o und of the car dinality of S is g iven by: |S | < max S X s = min S C s n V , (18) where C s n V is the num b er of c o mbin ations of s elements among n V . Note t hat it als o works if m i n S = 0 for the empty set. 3.6 Generation of D Θ r The generation o f D Θ r could ha ve the same complexit y than the generation of D Θ if there is no ne constra in t given by the user. T o day , the complexit y of the generation of D Θ is the co mplexit y of the pro p osed co de in [11]. Assume for example, the simple constra in θ 1 ∩ θ 2 ≡ ∅ . Firs t, the figures 7(a) and 7(b) show the DSm car dinalit y for the elements of D Θ r with | Θ | = 4 and the previo us given constraint. On the left figure, the elements are or dered by incr easing DSm cardinality and on the right figure with the sa me order than the fig ure 5. W e can observe t hat the cardinality of the elemen ts ha ve naturally decrea sed and the n um ber of non empty element s also. This is mo re int eresting if the cardinalit y of Θ is higher. Figure 8 presents for a given pos itiv e DSm car dinalit y , the n um ber of elements of D Θ r for | Θ | = 5 a nd with the sa me constraint θ 1 ∩ θ 2 ≡ ∅ . Compared to the figure 6, the total num b er of non empty element s (the integral of the curve) is co nsiderably low er . Thu s, we have to generate D Θ r and not D Θ . The generation of D Θ (see [11] fo r more details) is based on the gener ation o f mo notone b o o le a n functions. A mo no tone b o olean function f mb is a mapping o f ( x 1 , ..., x b ) ∈ { 0 , 1 } b to a single binary output suc h as ∀ x , x ′ ∈ { 0 , 1 } b , with x 4 x ′ then f mb ( x ) ≤ 12 (a) El emen ts ar e ordered b y increasing DSm car- dinality . (b) Elemen ts are ordered with the same order than the figure 5. Figure 7: DSm cardinality C M ( X ), ∀ X ∈ D Θ r with | Θ | = 4 and θ 1 ∩ θ 2 ≡ ∅ . f mb ( x ′ ). Hence, a monotone bo olean function is defined by the v alues of the 2 b element s ( x 1 , ..., x b ), and there is | D b | different monotone b o olea n functions. All t he v alues of all these mo notone b o olea n function can b e represented by a | D b | × 2 b matrix. If we m ultiply this matrix by the vector of all the po ssible in tersections of the sing letons in Θ with | Θ | = b (there is 2 b in tersections) given an union of intersections, we obtain all the element s of D Θ . W e can also use the basis of all the unions of Θ (and obtain the in tersections of unions), but with our co dification the unions a r e co ded with mor e integer num b e rs. So, the in tersection bas is is preferable. Moreov er, if we have some co nstraints (such as θ 1 ∩ θ 2 ≡ ∅ ), some ele ments of the intersection basis ca n be empty . So we only need to generate a | D b | × n b matrix where n b is the num b er of non empty in tersections of elements in Θ r . F or example, with the constr aint given in example for | Θ | = 3, the basis is given b y: ∅ , θ 1 , θ 2 , θ 3 , θ 1 ∩ θ 3 , θ 2 ∩ θ 3 , a nd there is no θ 1 ∩ θ 2 and θ 1 ∩ θ 2 ∩ θ 3 . Hence, the genera tio n of D Θ r can run v ery fast if the basis is small, i.e. if there is some constraints. The Matla b co de is g iven in section 5 . 3.7 Deco ding Once the decision on one element A of D Θ r is taken, we ha ve t o transmit this decision to the human o pe r ator. Hence we m ust to deco de the element A (given b y the integer num b ers o f the co dification) in terms of unions and intersections of elements of Θ. If we know that A is in a s ubset of elements o f D Θ r given by the op erator , we only ha ve to scan this subset. Now, if the decision A comes from the fo cal elements ( a priori unknown) o r from all the elements of D Θ r we m ust scan all D Θ r with possibly high complexity . What w e prop ose here is to consider the elements of D Θ r ordering with first the elements most encountered in applications. Hence, we first scan t he elemen ts of 2 Θ and in the same time the intersection basis that we must build fo r the generatio n of D Θ r . T hen, only if the element is not found we generate D Θ r and stop the gener ation when found (see the section 5 for more details). The Smarandache’s co dificatio n is an alter na tive to the deco ding beca use 13 Figure 8: Num b er of e lements of D Θ r for | Θ | = 5 and θ 1 ∩ θ 2 ≡ ∅ , with the same po sitive DSm car dinality . user can directly understa nd it. Hence we can r epresent the fo cal element as an union of the distinct part of the V enn diag r am. The Smaranda c he’s co dification allows a clear understanding of the diff erent parts of the V enn diagram o n the contrary than the pr op osed co dification. This representation of the res ults (for the combination or the dec is ion) do es not need the generation of D Θ r . How ever, if w e need to generate D Θ r according to t he strategy of decision, the deco ding will g ive a b etter dis play without more gener ation of D Θ r . 4 Concluding remarks This chapter presents a general b elief f unction framework bas ed o n a practica l co dification of the fo cal elemen ts. First the codification of the elements of the V enn diag ram gives a co dificatio n of Θ. Then, the event ual constraints a re in tegrated giving a r educed discernment space Θ r . F rom the space Θ r , we obtain the co dification of the fo cal element s. Hence, we manipulate elemen ts of a r e duced hyper power set D Θ r and not the co mplete hyper power set D Θ , reducing the complexity according to the kind o f given constraints. With the practical co dification, the step of combination is easily made using union a nd intersection functions. The step of decisio n w as particularly studied, beca use of the difficulties to decide o n D Θ or D Θ r . An extension of the a ppr oach given in [2] in order to give the p ossibility to dec ide on the unions in 2 Θ was prop osed. Another appr oach based on the sp ecificity was pro p osed in order to simply choo s e the elements on which decide accor ding to their sp ecificity . The principal g oal of th is chapter is to pro vide practical co des of a gener a l belief function framework for the resea rchers a nd users needing the b elief func- tion theor y . How ever, for sake of cla r ity , all the Matlab co des are not in the 14 listing, but can be provided on demand to the a uthor. The prop osed co des are not optimized e ither for Matlab, or in g eneral and can s till ha ve bugs. All suggestions in order to improv e them are welcome. 5 Matlab co des W e give a nd explain here some Matlab co des of the general belief function framework 2 . Note that the pro po sed co des ar e not optimized either for Matlab, or in gener al. First the human oper ator hav e to describe the pro blem (see function 1) giving the cardinality of Θ, the list of the fo cal elements a nd the corr esp onding bba for e a ch exp erts, the event ual constraints (‘ ’ if there is no constraint) , the list of elements on which he w ant to obtain a decision and t he par ameters corresp o nding to the choice of combination rule, the choice of decision criterium the mode of fusion (static or dynamic) and the display . When the description of the pro blem is made, he just has to call the fuse function 2. F unction 1 - Command configuratio n % descri ption of the prob lem CardTh eta=4 ; % cardinal ity of Theta % list of exper ts with focal ele ments and associat ed bba expert (1).f ocal= {’1’ ’1u3’ ’3’ ’1u2 u3’}; expert (1).b ba=[0 .5421 0.2953 0.0924 0.0702] ; expert (2).f ocal= {’1’ ’2’ ’1u3’ ’1u2 u3’}; expert (2).b ba=[0 .2022 0.6891 0.0084 0.1003] ; expert (3).f ocal= {’1’ ’3n4’ ’1u2u3 ’}; expert (3).b ba=[0 .2022 0.6891 0.1087 ]; constr aint= {’1n2’ ’1n3’ ’2n3’}; % set of empty elements elemDe c={’F ’}; % s et of decisio n eleme nts %----- ----- --------------------------------------------------- % parame ters criter iumCo mb=1; % co mbina tion citer ium criter iumDe c=0; % decisio n criter ium mode=’ stati c’; % m ode of fusion displa y=3; % kin d of display %----- ----- --------------------------------------------------- % fusion fuse(e xpert ,constraint,CardTheta,criteriumComb,criteriumDec,... mode,e lemDe c,display) 2 Cop yr ight c  2008 Arnaud M ar tin. May b e use d fr ee of c harge. Selling without prior written consent prohibited. Obtain p ermi ssion b efore redis tributing. 15 The first s tep o f the fuse function 2 is the co ding. The cardinality of Θ gives the codifica tio n of the singletons o f Θ, thanks to the functi on 3, then we add the constraints to Θ w ith the function 4 and o bta in Θ r . With Θ r , the function 6 calling the function 5 co des the fo ca l element s of the exp erts g iven by the human op era tor. The combination is made by the function 7 in static mo de. F or dynamic fusion, we just consider one exp ert with the previous combination. In this case the order of the experts given by the user can ha ve an imp ortant signification. The decisio n step is made with the function 11. The last step concern the display and the ha rd pro blem of the dec o ding. Th us, 4 choices ar e po ssible: no display , the res ults of the combination only , the results o f decisio n only and b o th results. These displays could take long time acco rding to the parameters g iven by the human o p e r ator. Hence, the results o f the combination could hav e the complexity of the gener ation of D Θ r and must b e av o id if the user do es not nee d it. The complexity of the decision results co uld a lso b e high if the user do es not g ive the exact set of elements o n witch decide, o r only the singletons with ‘S’ or o n 2 Θ with ‘2T’. In other c a ses, with luck, the e x ecution time can b e short thanks to the function 18. F unction 2 - F use function functi on fuse (expe rt,con straint,n,criteriumComb,criteriumDec,mode,elemDec,display) % To fuse exper ts’ opin ions % % fuse(e xpert ,constraint,n,criteriumComb,criteriumDec,mode,elemDec,display) % % Inputs : % expert C = cont aint the structur e of the list of coded focal elements and % corres pondi ng bb a for all the expert s % constr aint = the empt y elements % elemDe c = list of ele ments on which we can decide % n = size of the disc ernmen t space % criter iumCo mb = is the combina tion crite rium % criter iumCo mb=1 Sm ets criter ium % criter iumCo mb=2 De mpste r-Shaf er cr iteri um (normal ized) % criter iumCo mb=3 Ya ger criter ium % criter iumCo mb=4 di sjunc tive combi nation cri terium % criter iumCo mb=5 Fl orea criteriu m % criter iumCo mb=6 PC R6 % criter iumCo mb=7 Me an of the bbas % criter iumCo mb=8 Du bois criteriu m (norm alized and % disjun ctive comb inati on) % criter iumCo mb=9 Du bois and Prade criteri um (mixt comb inati on) % criter iumCo mb=10 M ixt Combin ation (Mar tin and Os swald criteri um) % criter iumCo mb=11 D PCR (Marti n and Ossw ald crit erium ) % criter iumCo mb=12 M DPCR (Martin and Osswald criteri um) % criter iumCo mb=13 Z hang’ s rule % % % criter iumDe c = i s the combina tion crite rium 16 % criter iumDe c=0 m aximu m of the bba % criter iumDe c=1 m aximu m of the pig nistic pro babili ty % criter iumDe c=2 m aximu m of the cre dibili ty % criter iumDe c=3 m aximu m of the cre dibili ty with reject % criter iumDe c=4 m aximu m of the pla usibil ity % criter iumDe c=5 A pprio u criterium % criter iumDe c=6 D SmP criter ium % % mode = ’stati c’ or ’dyn amic’ % elemDe c = list of ele ments on which we can decide, % or A for all, S for singlet ons only , F for fo cal elements only, % SF for single ton plus focal elem ents, Cm for given spec ifici ty, % 2T for only 2^Thet a (DST case) % displa y = kind of dis play % displa y = 0 for no disp lay, % displa y = 1 for comb inatio n display, % displa y = 2 for deci sion display, % displa y = 3 for both disp lays, % displa y = 4 for both disp lays with Smarandach e codifica tion % % Output : % res = conta int the stru cture of the list of focal elements and % corres pondi ng bb as for the combin ated exper ts % % Copyri ght (c) 2008 Arna ud Martin % Coding [Theta ,Scod ]=codingTheta(n); ThetaR ed=ad dConstraint(constraint,Theta); expert Cod=c odingExpert(expert,ThetaRed); %----- --- switch nargin case 1:5 mode=’ stati c’; elemDe c=The taRed; displa y=4; case 6 elemDe c=The taRed; displa y=4; case 7 elemDe c=str ing2code(elemDec); displa y=4; end %----- --- if (disp lay== 1) || (d ispla y==2) || (di splay= =3) [DThet ar,D_ n]=ge nerationDThetar(ThetaRed); else switch elemDe c{1} 17 case {’A’} [DThet ar,D_ n]=generatio nDThetar(ThetaRed); otherw ise DTheta r.s={ []}; DTheta r.c={ []}; end end %----- --- % Combin ation if strcm p(mod e, ’s tatic ’) [exper tComb ]=com bination(expertCod,ThetaRed,criteriumComb); else % dynami c case nbexp= size( exper tCod,2); expert Tmp(1 )=exp ertCod(1); for exp= 2:nbe xp expert Tmp(2 )=expertCod(exp); expert Tmp(1 )=combination(expertTmp,ThetaRed,criteriumComb); end expert Comb= exper tTmp(1); end % Decisi on [decFo cElem ]=decision(expertComb,ThetaRed,DThetar.c,criteriumDec,elemDec); % Displa y switch displa y case 0 ’no displa y’ case 1 % Result of the combin ation sFocal =size (expertComb.focal,2); focalR ec=de codingExpert(expertComb,ThetaRed,DThetar); focal= code2 string(focalRec) for i=1:sF ocal disp ( [ focal{ i},’=’ ,num2str(expertComb.bba(i)) ] ) end case 2 % Result of the decisi on if isstruc t(decF ocElem) focalD ec=de codingFocal( decFocElem.focal,elemDec,ThetaRed); disp([ ’deci sion:’,code2 string(focalDec)]) else if decFo cElem ==0 disp([ ’deci sion: r eject ed’]) else if decFo cElem ==-1 disp([ ’deci sion: c annot be taken’ ]) end end 18 end case 3 % Result of the combin ation sFocal =size (expertComb.focal,2); expert Dec=d ecodingExpert(expertComb,ThetaRed,DThetar); focal= code2 string(expertDec.focal) for i=1:sF ocal disp ( [ focal{ i},’=’ ,num2str(expertDec.bba(i)) ] ) end % Result of the decisi on if isstruc t(decF ocElem) focalD ec=de codingFocal( decFocElem.focal,elemDec,ThetaRed,DThetar); disp([ ’deci sion:’,code2 string(focalDec)]) else if decFo cElem ==0 disp([ ’deci sion: r eject ed’]) else if decFo cElem ==-1 disp([ ’deci sion: c annot be taken’ ]) end end end case 4 % Result s with Smara ndache codifica tion display % Result of the combin ation sFocal =size (expertComb.focal,2); expert Dec=c od2ScodExpert(expertComb,Scod); for i=1:sF ocal disp ([exp ertDec .focal{ i},’=’,num2str(expertDec.bba(i))]) end % Result of the decisi on if isstr uct(d ecFocEle m) focalD ec=co d2ScodFocal( decFocElem.focal,Scod); disp([ ’deci sion:’,focal Dec]) else if decFo cElem ==0 disp([ ’deci sion: r eject ed’]) else if decFo cElem ==-1 disp([ ’deci sion: c annot be taken’ ]) end end end otherw ise ’Accid ent in fuse: choi ce of display is uncorrect’ end 19 5.1 Co dification The co difica tion is based o n the function 3 . The order of the integer num b ers could be different, here the choice is ma de to num b er the intersection of all the element s with 1 and the smallest integer among the | Θ | = n bigg er integers for t he first single to n. In the same time this function giv e the corresp ondence betw een the integer n umber s o f the practical co dification and the Sma randache’s co dification. This function 3 is based on the Matlab function ncho osek(tab,k ) given the array of all the co mb ination of k elements of the vector tab . If the length o f tab is n , this function return an a rray of C k n rows and k columns. F unction 3 - co dingTheta function functi on [The ta,Sc od]=co dingTheta(n) % Code Theta for DSmT frame work % % [Theta ,Scod ]=codingTheta(n) % % Input: % n = card inalit y of Theta % % Output s: % Theta = the liste of coded elemen ts in Thet a % Scod = the bijec tion funct ion between the integer of % the code d elements in The ta and the Smarandac he codific ation % % Copyri ght (c) 2008 Arna ud Martin i=2^n- 1; tabInd =[]; for j=n:-1 :1 tabInd =[tab Ind j ]; Theta{ j}=[i ]; Scod{i }=[j] ; i=i-1; end i=i+1; for card=2 :n tabPer m=nch oosek (tabInd,card); for j=1: n [l,c]= find( tabPerm==j); tabi=i .*one s(1,size(l,1)); Theta{ j}=[s ort(tabi-l’) T heta{j }]; for nb=1:s ize(l, 1) Scod{i -l(nb )}=[Scod{i-l (nb)} j]; end end 20 i=i-si ze(ta bPerm ,1); end The addition of the constraints is made in tw o steps: first the co dification of the elemen ts in the list c onst r aint is made with the function 5, then the in teger n umbers in the codification of the co nstraints are suppressed f rom the co dification of Θ. The function st ring2c o de is just the translation of the brackets and union a nd intersection op erato rs in neg ative num b e r s (-3 for ‘(’, -4 for ‘)’, -1 for ‘ ∪ ’ and -2 for ‘ ∩ ’) in or der t o manipulate faster integers than strings. This simple function is no t pr ovided here. F unction 4 - addCo ns traint function functi on [The taR]= addCon straint(constraint,Theta) % Code ThetaR the redu ced form of The ta % taking into accoun t the cons train ts given by the user % % [Theta R]=ad dConstraint(constraint,Theta) % % Inputs : % constr aint = the list of ele ment consider ed as constr aint % or ’2T’ to work on 2^Thet a % Theta = the descri ption of The ta after coding % % Output : % ThetaR = the descr iptio n o f coded Theta after reducti on % taking into accoun t the cons train ts % % Copyri ght (c) 2008 Arna ud Martin if strcm p(con straint{1}, ’2T’) n=size (Thet a,2); nbCons =1; for i=1: n for j=i+1: n constr aint( nbCons)={[i -2 j]}; nbCons =nbCo ns+1; end end else constr aint= strin g2code(constraint); end constr aintC =codingFocal(constraint,Theta); sConst raint =size(constraintC,2); unionC ons=[ ]; for i=1:sC onstra int unionC ons=u nion( unionCons,constraintC{i}); 21 end sTheta =size (Theta,2); for i=1:sT heta ThetaR {i}=s etdif f(Theta{i},unionCons); end The function 5 simply transforms the list of fo ca l elemen ts given by the user with the co difica tion of Θ to obtain the list of constraints and with Θ r for the f o cal elemen ts of each exp ert. The function 6 p repares th e coding o f focal element s and return the list of the exp erts with the co ded fo cal elements. F unction 5 - co dingF oca l function functi on [foc alC]= coding Focal(focal,Theta) % Code the focal eleme nt for DSm T framework % % [focal C]=co dingFocal(focal,Theta) % % Inputs : % focal = the list of focal element for one exper t % Theta = the descri ption of The ta after coding % % Output : % focalC = the list of coded focal elem ent for on e expert % % Copyri ght (c) 2008 Arna ud Martin nbfoc= size( focal,2); if nbfoc for foc=1: nbfoc elemC= treat (foca l{foc},Theta); focalC {foc} =elem C; end else focalC ={[]} ; end end %% functi on [ele mE]=e val(op er,a,b) if oper= =-2 elemE= inter sect(a,b); else elemE= union (a,b); end end 22 %% functi on [ele mC,cm p]=tre at(focal,Theta) nbelem =size (foca l,2); PelemC =0; oper=0 ; e=1; if nbele m while e <= nbelem elem=f ocal( e); switch ele m case -1 oper=- 1; case -2 oper=- 2; case -3 [elemC ,nbe] =treat(focal(e+1:end),Theta); e=e+nb e; if oper~ =0 & ~isequal(P elemC ,0) elemC= eval( oper, PelemC,elemC); oper=0 ; end PelemC =elem C; case -4 cmp=e; e=nbel em; otherw ise elemC= Theta {elem }; if oper~ =0 & ~isequal(P elemC ,0) elemC= eval( oper, PelemC,elemC); oper=0 ; end PelemC =elem C; end e=e+1; end else elemC= []; end end F unction 6 - co dingE xp ert function functi on [exp ertC] =codin gExpert(expert,Theta) % Code the focal eleme nt for DSm T framework % 23 % [exper tC]=c odingExpert(expert,Theta) % % Inputs : % expert = structu re cont aining the list of focal elements for % each exper t and the bba corr espon ding % Theta = the descri ption of The ta after coding % % Output : % expert C = stru cture containin g the list of coded focal element % for each expert and the bba corresp ondin g % % Copyri ght (c) 2008 Arna ud Martin nbExp= size( exper t,2); for exp= 1:nbE xp focal= strin g2code(exper t(exp).focal); expert C(exp ).focal=codi ngFocal(focal,Theta); expert C(exp ).bba=expert (exp).bba; end end 5.2 Com bination The function 7 prop os es many combination rules. Most of them a re based o n the function 8, but for some combination rules we need to keep more information, so we use the function 9 for the conjunctive combination. E.g. in the func- tion 10 note the simplicity of the code for the PCR6 com bination rule. O ther combination r ules ’ co des are no t given here for the sake of clarity . F unction 7 - combination function functi on [res ]=com binati on(expertC,ThetaR,criterium) % Give the combina tion of many expe rts % % [res]= combi nation(expert,constraint,n,criterium) % % Inputs : % expert C = cont aint the structur e of the list of focal elemen ts % and corres pondin g bba for all the experts % ThetaR = the coded and reduc ed disc ernmen t space % criter ium = is the comb inatio n criteriu m % criter ium=1 Smet s criterium (conjuncti ve rule in open world) % criter ium=2 Demp ster- Shafe r crite rium (normalize d) % (conju nctiv e rule in closed world) % criter ium=3 Yage r criterium % criter ium=4 disj uncti ve combina tion crite rium % criter ium=5 Flor ea criterium % criter ium=6 PCR6 % criter ium=7 Mean of the bbas 24 % criter ium=8 Dubo is criterium % (norma lized and disj unctiv e combinat ion) % criter ium=9 Dubo is and Prade criterium (mixt combinatio n) % criter ium=1 0 Mixt Combinatio n (Marti n and Ossw ald cri terium ) % criter ium=1 1 DPCR (Martin and Osswald criterium ) % criter ium=1 2 MDPCR (Martin and Osswald criteriu m) % criter ium=1 3 Zhang’s rule % % Output : % res = conta int the stru cture of the list of focal elements and % corres pondi ng bb as for the combin ated exper ts % % Copyri ght (c) 2008 Arna ud Martin switch criter ium case 1 %Smets criter ium res=co njunc tive(expertC); case 2 %Demps ter-S hafer c riter ium (nor maliz ed) expCon j=con junctive(expertC); ind=fi ndeqc ell(expConj.focal,[]); if ~isempt y(ind) k=expC onj.b ba(ind); expCon j.bba =expConj.bba /(1-k); expCon j.bba (ind)=0; end res=ex pConj ; case 3 %Yager criter ium expCon j=con junctive(expertC); ind=fi ndeqc ell(expConj.focal,[]); if ~isempt y(ind) k=expC onj.b ba(ind); eTheta =Thet aR{1}; for i=2:n eTheta =[uni on(eT heta,ThetaR{i})]; end indThe ta=fi ndeqcell(exp Conj.focal,eTheta); if ~isem pty(i ndTheta) expCon j.bba (indT heta)=expConj.bba(indTheta)+k; expCon j.bba (ind) =0; else sFocal =size (expC onj.focal,2); expCon j.foc al(sF ocal+1)={eTheta}; expCon j.bba (sFoc al+1)=k; expCon j.bba (ind) =0; end end res=ex pConj ; 25 case 4 %disjo uncti ve cr iteri um [res]= disju nctive(expertC); case 5 % Florea criter ium expCon j=con junctive(expertC); expDis =disj unctive(expertC); ind=fi ndeqc ell(expConj.focal,[]); if ~isempt y(ind) k=expC onj.b ba(ind); alpha= k/(1- k+k*k); beta=( 1-k)/ (1-k+k*k); expFlo =expC onj; expFlo .bba= beta.*expFlo .bba; expFlo .bba( ind)=0; nbFocC onj=s ize(expConj. focal,2); nbFocD is=si ze(expDis.fo cal,2); expFlo .foca l(nbFocConj+ 1:nbFocConj+nbFocDis)=expDis.focal; expFlo .bba( nbFocConj+1: nbFocConj+nbFocDis)=alpha.*expDis.bba; expFlo =redu ceExpert(exp Flo); else expFlo =expC onj; end res=ex pFlo; case 6 % PCR6 [res]= PCR6( expertC); case 7 % Means of the bba [res]= meanb ba(expertC); case 8 % Dubois criter ium (nor maliz ed and disjunct ive combin ation ) expDis =disj unctive(expertC); ind=fi ndeqc ell(expDis.focal,[]); if ~isempt y(ind) k=expD is.bb a(ind); expDis .bba= expDis.bba/( 1-k); expDis .bba( ind)=0; end res=ex pDis; case 9 % Dubois and Prade criter ium (mi xt combinatio n) [res]= DP(ex pertC); case 10 % Martin and Ossawal d cri terium (mi xt combina tion) 26 [res]= Mix(e xpertC); case 11 % DPCR (Marti n and Ossw ald criteriu m) [res]= DPCR( expertC); case 12 % MDPCR (Martin and Osswald criteri um) [res]= MDPCR (expertC); case 13 % Zhang’ s rule [res]= Zhang (expert) otherw ise ’Accid ent: in comb inati on choose of criteri um: uncorr ect’ end F unction 8 - conjunctive function functi on [res ]=con juncti ve(expert) % Conjun ctive Rule % % [res]= conju nctive(expert) % % Inputs : % expert = contain t the stru cture s of the list of focal elemen t and % corres pondi ng bb a for all the expert s % % Output : % res = is the resul ting expert (structure of the list of foca l % elemen t and corr espon ding bba) % % Copyri ght (c) 2008 Arna ud Martin nbexpe rt=si ze(expert,2); for i=1:nb expert nbfoca l(i)= size( expert(i).focal,2); nbbba( i)=si ze(ex pert(i).bba,2); if nbfoc al(i) ~=nbbba( i) ’Accid ent: in conj : the numbers of bba a nd focal element. .. are diff erent ’ end end interm =expe rt(1); for exp=2: nbexpe rt nbfoca lInte rm=si ze(interm.focal,2); i=1; comb.f ocal= {}; comb.b ba=[] ; 27 for foc1 =1:nb focalInt erm for foc2=1 :nbfoc al(exp) tmp=in terse ct(interm.fo cal{foc1},expert(exp).focal{foc2}); if isemp ty(tm p) tmp=[] ; end comb.f ocal( i)={tmp}; comb.b ba(i) =interm.bba( foc1)*expert(exp).bba(foc2); i=i+1; end end interm =redu ceExp ert(comb); end res=in term; F unction 9 - glo balConjunctive function functi on [res ,tabI nd]=gl obalConjunctive(expert) % Conjun ctive Rule cons ervin g all the focal elemen ts % during the combi natio n % % [res,t abInd ]=globalConjunctive(expert) % % Input: % expert = contain t the stru cture s of the list of focal elemen t and % corres pondi ng bb a for all the expert s % % output s: % res = is the resul ting expert (structure of the list of foca l % elemen t and corr espon ding bba) % tabInd = table of the indice s given the com binat ion % % Copyri ght (c) 2008 Arna ud Martin nbexpe rt=si ze(expert,2); for i=1:nb expert nbfoca l(i)= size( expert(i).focal,2); nbbba( i)=si ze(ex pert(i).bba,2); if nbfoc al(i) ~=nbbba( i) ’Accid ent: in conj : the numbers of bba a nd focal element. .. are differ ent’ end end interm =expe rt(1); tabInd Prev= [1:1:nbfocal(1)]; for exp=2: nbexpe rt nbfoca lInte rm=si ze(interm.focal,2); 28 i=1; comb.f ocal= {}; comb.b ba=[] ; tabInd =[]; for foc1 =1:nb focalInt erm for foc2=1 :nbfoc al(exp) tmp=in terse ct(interm.fo cal{foc1},expert(exp).focal{foc2}); tabInd =[tab Ind [ tabIn dPrev (:,foc1);foc2]]; if isemp ty(tm p) tmp=[] ; end comb.f ocal( i)={tmp}; comb.b ba(i) =interm.bba( foc1)*expert(exp).bba(foc2); i=i+1; end end tabInd Prev= tabIn d; interm =comb ; end res=in term; F unction 10 - P CR6 function functi on [res ]=PCR 6(expe rt) % PCR6 combin ation rule % % [res]= PCR6( expert) % % Input: % expert = contain t the stru cture s of the list of focal elemen t and % corres pondi ng bb a for all the expert s % % Output : % res = is the resul ting expert (structure of the list of foca l % elemen t and corr espon ding bba) % % Refere nce: A. Mart in and C. Osswald, ’’A new generali zatio n of the % propor tiona l con flict redist ributi on rule stab le in terms of decisio n,’’ % Applic ation s and A dvanc es of DSmT for Infor matio n F usion , Boo k 2, % Americ an Rese arch Press Rehoboth, F. Smarandach e a nd J. Deze rt, % pp. 69-88 2006. % % Copyri ght (c) 2008 Arna ud Martin [exper tConj ,tabInd]=globalConjunctive(expert); ind=fi ndeqc ell(expertConj.focal,[]); nbexp= size( tabInd,1); 29 if ~isem pty(i nd) expert Conj. bba(i nd)=0; sInd=s ize(i nd,2) ; for i=1: sInd P=1; S=0; for exp=1: nbexp bbaexp =expe rt(exp).bba( tabInd(exp,ind(i))); P=P*bb aexp; S=S+bb aexp; end for exp=1: nbexp expert Conj. focal(end+1) =expert(exp).focal(tabInd(exp,ind(i))); expert Conj. bba(end+1)=e xpert(exp).bba(tabInd(exp,ind(i)))*P/S; end end end res=re duceE xpert(expertConj); 5.3 Decision The function 11 gives the decision o n the ex per t fo ca l element lis t for the co r- resp onding bba with one of the chosen cr iterium a nd o n the elements given by the user for the decision. Note that the c hoices ‘A’ and ‘Cm’ for the v a riable elemDe c could take a long time b ecause it nee d the generation of D Θ r . This function can call one of t he decision functions 13, 1 4, 15, 16. If any decision is po ssible on the c hosen element s given b y elemDe c , the function return - 1. In case o f reject element, te function return 0 . F unction 11 - decisio n function functi on [dec FocEl em]=de cision(expert,Theta,criterium,elemDec) % Give the decisio n for one expe rt % % [decFo cElem ]=decision(expert,Theta,criterium) % % Inputs : % expert = contain t the stru cture of the list of focal elements and % corres pondi ng bb a for all the experts % Theta = list of code d (and red uced with constrai nt) of the % elemen ts of the disc erneme nt space % criter ium = is the comb inatio n criteriu m % criter ium=0 maxi mum of the bba % criter ium=1 maxi mum of the pignisti c probab ility % criter ium=2 maxi mum of the credibil ity % criter ium=3 maxi mum of the credibil ity with reject % criter ium=4 maxi mum of the plausibi lity % criter ium=5 DSmP cri terium % criter ium=6 Appr iou criteriu m 30 % criter ium=7 Cred ibili ty on DTheta criteri um % criter ium=8 pignistic on DThet a criterium % elemDe c = list of ele ments on which we can decide, % or A for all, S for singl etons only , F for focal elements only, % SF for single ton plu s focal elements, Cm for given specifici ty, % 2T for only 2^Thet a (DST case) % % Output : % decFoc Elem = the reta ined focal element, 0 in case of rejet, -1 % if the decisi on cann ot be taken on elemDec % % Copyri ght (c) 2008 Arna ud Martin type=1 ; switch elemDe c{1} case ’S’ type=0 ; elemDe cC=Th eta; expert Dec=e xpert; case ’F’ elemDe cC=ex pert.focal; expert Dec=e xpert; case ’SF’ expert Dec=e xpert; n=size (Thet a,2); for i=1:n expert Dec.f ocal{end+1}= Theta{i}; expert Dec.b ba(end+1)=0; end expert Dec=r educeExpert(expertDec); elemDe cC=ex pertDec.focal; case ’Cm’ sElem= size( elemDec,2); switch sElem case 2 minSpe =str2 num(e lemDec{2}); maxSpe =minS pe; case 3 minSpe =str2 num(e lemDec{2}); maxSpe =str2 num(e lemDec{3}); otherw ise ’Accid ent in decision: with the option Cm for ... . elemDe c give the spe cifity of decision element ... (event ually the mi nimum and the maximum of the ... desire d specificit y’ pause end elemDe cC=fi ndFocal(Theta,minSpe,maxSpe); 31 expert Dec.f ocal=elemDecC; expert Dec.b ba=zeros(1,size(elemDecC,2)); for foc=1: size(e xpert.focal,2) ind=fi ndeqc ell(elemDecC ,expert.focal{foc}); if ~isem pty(i nd) expert Dec.b ba(in d)=expert.bba(foc); else expert Dec.b ba(in d)=0; end end case ’2T’ type=0 ; natoms =size (Theta,2); expert Dec.f ocal(1)={[]}; indFoc =find eqcell(expert.focal,{[]}); if isempty (indFo c) expert Dec.b ba(1)=0; else expert Dec.b ba(1)=expert .bba(indFoc); end step =2; for i=1:na toms expert Dec.f ocal(step)=c odingFocal({[i]},Theta); indFoc =find eqcell(exper t.focal,expertDec.focal{step}); if isemp ty(in dFoc) expert Dec.b ba(st ep)=0; else expert Dec.b ba(st ep)=expert.bba(indFoc); end step=s tep+1 ; indato m=ste p; for step2= 2:inda tom-2 expert Dec.f ocal( step)={[union(expertDec.focal{step2},... expert Dec.f ocal{indatom-1})]}; indFoc =find eqcel l(expert.focal,expertDec.focal{step}); if isemp ty(in dFoc) expert Dec.b ba(step)=0; else expert Dec.b ba(step)=expert.bba(indFoc); end step=s tep+1 ; end end elemDe cC=ex pertDec.focal; 32 case ’A’ elemDe cC=ge nerationDThetar(Theta); elemDe cC=re duceFocal(elemDecC); expert Dec.f ocal=elemDecC; expert Dec.b ba=zeros(1,size(elemDecC,2)); for foc=1: size(e xpert.focal,2) expert Dec.b ba(fi ndeqcell(elemDecC,expert.focal{foc}))... =exper t.bba (foc) ; end otherw ise type=0 ; elemDe c=str ing2code(elemDec); elemDe cC=co dingFocal(elemDec,Theta); expert Dec=e xpert; nbElem Dec=s ize(elemDecC,2); for foc=1: nbElem Dec if ~isEl em(el emDecC{foc }, e xpert Dec.fo cal) expert Dec.f ocal{ end+1}=elemDecC{foc}; expert Dec.b ba(en d+1)=0; end end end %----- ----- ----------------------------------------------- nbFoca l=siz e(expertDec.focal,2); switch criter ium case 0 % maximu m of the bba nbFoca l=siz e(expertDec.focal,2); nbElem =0; for foc=1: nbFoca l ind=fi ndeqc ell(elemDecC ,expertDec.focal{foc}); if ~isem pty(i nd) bba(in d)=ex pertD ec.bba(foc); end end [bbaMa x,ind Max]=max(bba); if bbaMax~ =0 decFoc Elem. bba=bbaMax; decFoc Elem. focal={elemD ecC{indMax}}; else decFoc Elem= -1; end case 1 % maximu m of the pig nistic probabil ity [BetP] =pign istic(expertDec); decFoc Elem= MaxFoc(BetP,elemDecC,type); case 2 % maximu m of the cre dibili ty 33 [Bel]= credi bility(expertDec); decFoc Elem= MaxFoc(Bel,elemDecC,type); case 3 % maximu m of the cre dibili ty with reject [Bel]= credi bility(expertDec); TabSin g=[]; focThe ta=[] ; for i=1:si ze(The ta,2) focThe ta=un ion(focTheta ,Theta{i}); end for foc=1: nbFoca l if isEle m(Bel .focal{foc }, e lemDe cC) TabSin g=[Ta bSing [ foc ; Bel.Bel(f oc)]] ; end end [BelMa x,ind Max]=max(TabSing(2,:)); if BelMax~ =0 focMax =Bel. focal{TabSin g(1,indMax)}; focCom pleme ntary=setdif f(focTheta,focMax); if isemp ty(fo cComplemen tary) focCom pleme ntary =[]; end ind=fi ndeqc ell(Bel.foca l,focComplementary); if BelMa x < Bel. Bel(i nd) % if ind is empty this is always false decFoc Elem= 0; % That means that we reject else if isemp ty(in d) decFoc Elem= 0; % That means that we reject else decFoc Elem. focal ={Bel.focal{TabSing(1,indMax)}}; decFoc Elem. Bel=B elMax; end end else decFoc Elem= -1; % T hat means that we reject end case 4 % maximu m of the pla usibil ity [Pl]=p lausi bility(expertDec); decFoc Elem= MaxFoc(Pl,elemDecC,type); case 5 % DSmP criter ium epsilo n=0.0 0001; % 0 ca n allows problem [DSmP] =DSmP ep(expertDec,epsilon); 34 decFoc Elem= MaxFoc(DSmP,elemDecC,type); case 6 % Apprio u criterium [Pl]=p lausi bility(expertDec); lambda =1; r=0.5; bm=Bay esian Mass(expertDec,lambda,r); Newbba =Pl.P l.*bm.bba; % normal izati on Newbba =Newb ba/sum(Newbba); funcDe c.foc al=Pl.focal; funcDe c.bba =Newbba; decFoc Elem= MaxFoc(funcDec,elemDecC,type); case 7 % Credib ility on DTh eta criterium [Bel]= credi bility(expertDec); lambda =1; r=0.5; bm=Bay esian Mass(expertDec,lambda,r); Newbba =Bel. Bel.*bm.bba; % normal izati on Newbba =Newb ba/sum(Newbba); funcDe c.foc al=Bel.focal; funcDe c.bba =Newbba; decFoc Elem= MaxFoc(funcDec,elemDecC,type); case 8 % pignis tic on DThet a criterium [BetP] =pign istic(expertDec); lambda =1; r=0.5; bm=Bay esian Mass(expertDec,lambda,r); Newbba =BetP .BetP.*bm.bba; % normal izati on Newbba =Newb ba/sum(Newbba); funcDe c.foc al=BetP.focal; funcDe c.bba =Newbba; decFoc Elem= MaxFoc(funcDec,elemDecC,type); otherw ise ’Accid ent: in deci sion choose of criterium: unc orrect ’ end end %% functi on [boo l]=is Elem(f ocal, lis tFocal ) % The g oal of this funct ion is to re turn a boolean on the test focal in % listFo cal % % [bool] =isEl em(focal, li stFoca l) 35 % % Inputs : % focal = one focal eleme nt (mat rix) % listFo cal = the li st of elements in Theta (all differen t) % % Output : % bool = boolea n: true if foca l is in listFocal , elsewh ere fals e % % Copyri ght (c) 2008 Arna ud Martin n=size (list Focal,2); bool=f alse; for i=1:n if isequ al(li stFocal{ i},focal) bool=t rue; break; end end end %% functi on [dec FocEl em]=Ma xFoc(funcDec,elemDecC,type) fieldN =fiel dnames(funcDec); switch fieldN {2} case ’BetP ’ funcDe c.bba =funcDec.BetP; case ’Bel’ funcDe c.bba =funcDec.Bel; case ’Pl’ funcDe c.bba =funcDec.Pl; case ’DSmP ’ funcDe c.bba =funcDec.DSmP; end if type [funcM ax,in dMax] =max(funcDec.bba); FocMax ={fun cDec. focal{indMax}}; else nbFoca l=siz e(fun cDec.focal,2); TabSin g=[]; for foc= 1:nbF ocal if isElem( funcDe c.focal{foc}, ele mDecC ) TabSin g=[Ta bSing [ foc ; funcDe c.bba( foc)]]; end end [funcM ax,in dMax] =max(TabSing(2,:)); FocMax ={fun cDec. focal{TabSing(1,indMax)}}; 36 end if funcM ax~=0 decFoc Elem. focal =FocMax; switch fieldN {2} case ’BetP ’ decFoc Elem. BetP=funcMax ; case ’Bel’ decFoc Elem. Bel=funcMax; case ’Pl’ decFoc Elem. Pl=funcMax; case ’DSmP ’ decFoc Elem. DSmP=funcMax ; end else decFoc Elem= -1; end end F unction 12 - findF o ca l function functi on [ele mDecC ]=find Focal(Theta,minSpe,maxSpe) % Find the element of DThet a wit h the minium of specifity minSpe % and the maxim um maxSpe % % [elemD ecC]= findFocal(Theta,minSpe,maxSpe) % % Input: % Theta = list of code d (and eve ntuall y reduced with constra int) of % the elemen ts of the dis cernm ent space % minSpe = minimum of the wanted specif icity % minSpe = maximum of the wanted specif icity % % Output : % elemDe c = list of ele ments on which we want to decide with the % minimu m of speci fity minSpe and the maximum maxSpe % % Copyri ght (c) 2008 Arna ud Martin elemDe cC{1} =[]; n=size (Thet a,2); ThetaS et=[] ; for i=1:n ThetaS et=un ion(T hetaSet,Theta{i}); end for s=minS pe:max Spe 37 tabs=n choos ek(Th etaSet,s); elemDe cC(en d+1:e nd+size(tabs,1))=num2cell(tabs,2)’; end elemDe cC=el emDecC(2:end); F unction 13 - pignistic function functi on [Bet P]=pi gnisti c(expert) % Genera lized Pign istic Transform ation % % [BetP] =pign istic(expert) % % Input: % expert = contain t the stru cture s of the list of focal elemen t and % corres pondi ng bba for all the experts % expert .foca l = l ist of focal element s % expert .bba = matrix of bba % % Output : % BetP = contai nt the str ucture of the list of focal element and % the matr ix of the pl ausibi lity corresp ondin g % BetP.f ocal = list of focal ele ments % BetP.B etP = matr ix of the pignistic transform ation % Commen t : 1- the code of the foca l elements must inculde % the constr aints % 2- The pignis tic is giv en only on the elements % in the list of focal of expert (the % bba can be 0) % % Copyri ght (c) 2008 Arna ud Martin nbFoca l=siz e(expert.focal,2); BetP.f ocal= expert.focal; BetP.B etP=z eros(1,nbFocal); for focA=1 :nbFoc al for focB =1:nb Focal focI=i nters ect(expert.f ocal{focA},expert.focal{focB}); if ~isem pty(f ocI) BetP.B etP(f ocA)=BetP.BetP(focA)+size(focI,2)/... size(e xpert .focal{focB},2)*expert.bba(focB); else if isequ al(ex pert.f ocal{focB},[]) % for the empty set: 38 % card inali ty(em pty set)/c ardin ality (empty set)= 1, % so we add the bba BetP.B etP(f ocA)=BetP.BetP(focA)+expert.bba(focB); end end end end F unction 14 - cr edibilit y function functi on [Bel ]=cre dibili ty(expert) % Credib ility func tion % % [Bel]= credi bility(expert) % % Input: % expert = contain t the stru cture s of the list of focal elemen t and % corres pondi ng bba for all the experts % expert .foca l = l ist of focal element s % expert .bba = matrix of bba % % Output : % Bel = conta int the stru cture of the list of focal element and % the matrix of the credibi lity corre spond ing % Bel.fo cal = list of foc al elements % Bel.Be l = matr ix of the credibili ty % Commen t : 1- the code of the foca l elements must inculde % the constr aints % 2- The credib ility is giv en only on the elements % in the list of focal of expert (the % bba can be 0) % % Copyri ght (c) 2008 Arna ud Martin nbFoca l=siz e(expert.focal,2); Bel.fo cal=e xpert.focal; Bel.Be l=zer os(1,nbFocal); for focA=1 :nbFoc al for focB =1:nb Focal indMem =isme mber(expert.focal{focB},expert.focal{focA}); if sum(i ndMem )==size(ex pert.focal{focB},2) Bel.Be l(foc A)=Bel.Bel(focA)+expert.bba(focB); else if isequ al(ex pert.f ocal{focB},[]) 39 % the empt y set is i nclude to all the focal elements Bel.Be l(foc A)=Bel.Bel(focA)+expert.bba(focB); end end end end F unction 15 - plausibility function functi on [Pl] =plau sibili ty(expert) % Plausi bilit y f uncti on % % [Pl]=p lausi bility(expert) % % Input: % expert = contain t the stru cture s of the list of focal elemen t and % corres pondi ng bba for all the experts % expert .foca l = l ist of focal element s % expert .bba = matrix of bba % % Output : % Pl = contai nt the str uctur e of the list of focal elemen t and % the matrix of the plau sibili ty co rresp ondin g % Pl.foc al = lis t of focal elements % Pl.Pl = matri x of the plau sibil ity % Commen t : 1- the code of the foca l elements must inculde % the constr aints % 2- The plausi bilit y i s given only on the element s % in the list of focal of expert (the % bba can be 0) % % Copyri ght (c) 2008 Arna ud Martin nbFoca l=siz e(expert.focal,2); Pl.foc al=ex pert.focal; Pl.Pl= zeros (1,nbFocal); for focA=1 :nbFoc al for focB =1:nb Focal focI=i nters ect(expert.f ocal{focA},expert.focal{focB}); if ~isem pty(f ocI) Pl.Pl( focA) =Pl.Pl(focA)+expert.bba(focB); else if isequ al(ex pert.f ocal{focB},[])... && isequ al(ex pert.focal {focA},[]) % for the empty set we keep the bba for the Pl 40 Pl.Pl( focA) =Pl.Pl(focA)+expert.bba(focB); end end end end F unction 16 - DSmPep function functi on [DSm P]=DS mPep(e xpert,epsilon) % DSmP Transf ormat ion % % [DSmP] =DSmP ep(expert,epsilon) % % Inputs : % expert = contain t the stru cture s of the list of focal elemen t and % corres pondi ng bba for all the experts % expert .foca l = l ist of focal element s % expert .bba = matrix of bba % epsilo n = epsi lon coeffici ent % % Output : % DSmPep = contain t the stru cture of the list of focal element and % the matr ix of the plausibili ty corresp ondin g % DSmPep .foca l = l ist of focal element s % DSmPep .DSmP = matr ix of the pignisti c transfor matio n % % Refere nce: Dezert & Sma randac he, % ’’A new probb ilist ic transfo rmati on of beli ef mass assignmen t’’, % fusion 2008, Colog ne, Ger many. % % Copyri ght (c) 2008 Arna ud Martin nbFoca l=siz e(expert.focal,2); DSmP.f ocal= expert.focal; DSmP.D SmP=z eros(1,nbFocal); for focA=1 :nbFoc al for focB =1:nb Focal focI=i nters ect(expert.f ocal{focA},expert.focal{focB}); sumbba FocB= 0; sFocB= size( expert.focal {focB},2); for elB=1: sFocB ind=fi ndeqc ell(e xpert.focal,expert.focal{focB}(elB)); if ~isem pty(i nd) sumbba FocB= sumbbaFocB+expert.bba(ind); end 41 end if ~isem pty(f ocI) sumbba FocI= 0; sFocI= size( focI, 2); for elB= 1:sFo cI ind=fi ndeqc ell(expert.focal,focI(elB)); if ~isem pty(i nd) sumbba FocI= sumbb aFocI+expert.bba(ind); end end DSmP.D SmP(f ocA)= DSmP.DSmP(focA)+expert.bba(focB)... *(sumb baFoc I+eps ilon*sFocI)/(sumbbaFocB+epsilon*sFocB); end end end 5.4 Deco ding and generation of D Θ r F or the displays, w e m ust decode the fo ca l elemen ts and/or the final decisio n. The function 17 deco des the fo ca l elements in the structure ex p er t that co nt ain normally only one expert. This function calls the function 18 that r e ally does the deco ding for the user . This function is ba sed on the generation of D Θ r given b y the function 21 that a is mo dified a nd adapted co de from [11]. T o gener a te D Θ r we first must create the intersection basis. Hence in the function 18 we use a lo op of 2 Θ in order to genera te the basis and in the sa me time to scan the power set 2 Θ and also the elemen ts of the in ters ection basis. These t wo basis (in ter section and union) a re in fact c o ncatenated during the construction, so we sca n also so me element s such intersections of previous unions and unions of previous intersections. This genera ted set o f elemen ts do es not cov er D Θ r . When all the searching fo ca l elements (that can be only one de cision element) are found, we stop the function and avoid to genera te all D Θ r . Hence if the searching elements are not a ll found after this loop, we begin to generate D Θ r and stop when all elements are found. So, with luck, tha t can be fas t. W e can av oid to g enerate D Θ r for only the displa y if we use the Smarandache’s co dification. The function 19 tra ns fo rms the us e d co de of the fo cal elements in the s tructure ex p er t in the Smarandache’s co de, eas er to understand by reading. This function calls the function 20 that really does the tra nsformation. The fo cal element s are directly in string for the display . F unction 17 - deco ding Exp ert function functi on [exp ertDe cod]=d ecodingExpert(expert,Theta,DTheta) % The goal of this functi on is to dec ode the focal elements in expert % % [exper tDeco d]=decodingExpert(expert,Theta) % % Inputs : % expert = contain t the stru cture of the list of focal elements after % combin ation and co rrespo nding bba for all the experts (gener ally use 42 % for only one after combin ation) % Theta = list of code d (and red uced with constrai nt) of the elemen ts of % the discer nement spa ce % DTheta = list of coded (and reduc ed with cons train t) of the elements of % DTheta % % Output : % expert Decod = cont aint the structure of the list of decoded (for human) % focal element s and corr espon ding bba for all the experts % % Copyri ght (c) 2008 Arna ud Martin nbExp= size( exper t,2); for exp= 1:nbE xp focal= exper t(exp).focal; expert Decod (exp).focal=decodingFocal(focal,{’A’},Theta,DTheta); expert Decod (exp).bba=expert(exp).bba; end end F unction 18 - deco ding F o cal function functi on [foc alDec od]=de codingFocal(focal,elemDec,Theta,DTheta) % The goal of this functi on is to dec ode the focal elements % % [focal Decod ]=decodingFocal(focal,elemDec,Theta) % % Inputs : % expert = contain t the stru cture of the list of focal elements after % combin ation and co rrespo nding bba for all the experts % elemDe c = the desc riptio n of the subset of uncoded element s % for decisi on % Theta = list of code d (and red uced with constrai nt) of the % elemen ts of the disc erneme nt space % DTheta = list of coded (and reduc ed with cons train t) of the % elemen ts of DThe ta, eventual ly empty if not necess ary % Output : % focalD ecod = containt the list of deco ded (for human) focal elements % % Copyri ght (c) 2008 Arna ud Martin switch elemDe c{1} case {’F’, ’A’,’S F’,’C m’} opt=1; case ’S’ opt=0; elemDe cC=Th eta; 43 for i=1:si ze(The ta,2) elemDe c(i)= {[i]}; end case ’2T’ opt=0; natoms =size (Theta,2); elemDe cC(1) ={[]}; elemDe c(1)= {[]}; step =2; for i=1:na toms elemDe cC(st ep)=codingFo cal({[i]},Theta); elemDe c(ste p)={[i]}; step=s tep+1 ; indato m=ste p; for step2= 2:inda tom-2 elemDe c(ste p)={[ elemDec{step2} -1 elemDe c{inda tom-1}]}; elemDe cC(st ep)={ [union(elemDecC{step2},elemDecC{indatom-1})]}; step=s tep+1 ; end end otherw ise opt=0; elemDe cN=st ring2code(elemDec); elemDe cC=co dingFocal(elemDecN,Theta); end if ~opt sFoc=s ize(f ocal, 2); for foc= 1:sFo c [ind]= finde qcell(elemDecC,focal{foc}); if isempty (ind) ’Accid ent in decodingFo cal: el emDec does not be 2T’ pause else focalD ecod( foc)=elemDec (ind); end end else focalD ecod= cell( size(focal)); cmp=0; sFocal =size (foca l,2); sDThet a=siz e(DTh eta.c,2); i=1; while i’); for elem=2 :sElem ch=str cat(c h,’,<’); ch=str cat(c h,num2str(Sc od{focal{foc}(elem)})); ch=str cat(c h,’>’); end focalD ecod{ foc}=strcat(ch,’}’); end end F unction 21 - g e ner ationDThetar function functi on [DTh eta]= genera tionDThetar(Theta) % Genera tion of DThe tar: modified and adapted code from % Dezert & Smarand ache Chapt er 2 DSmT book % Vol 1 to generate DTeta % % [DThet a]=ge nerationDThetar(Theta) % % Input: % Theta = list of code d (and eve ntuall y reduced with constra int) of % the elemen ts of the dis cernm ent space % % Output : % DTheta = list of coded (and event ually redu ced with constrai nt in % this case some eleme nts can be the same) of the e lement s % of the DTh eta % % Copyri ght (c) 2008 Arna ud Martin n=size (Thet a,2); 46 step =1; for i=1:n basetm p(ste p)={[ Theta{i}]}; step=s tep+1 ; indato m=ste p; for step 2=1:i ndatom-2 basetm p(ste p)={intersect(basetmp{indatom-1},basetmp{step2})}; step=s tep+1 ; end end sBaseT mp=si ze(basetmp,2); step=1 ; for i=1:sB aseTmp if ~isem pty(b asetmp{i }) base(s tep)= basetmp(i); step=s tep+1 ; end end sBase= size( base,2); DTheta {1}=[ ]; step=1 ; nbC=2; stop=0 ; D_n1 =[0 ; 1]; sDn1=2 ; for nn=1:n D_n =[ ] ; cfirst =1+(n n==n) ; for i =1:s Dn1 Li=D_n 1(i,: ); sLi=si ze(Li ,2); if (2*sLi> sBase) && (L i(sLi -(sBa se-sLi))==1) stop=1 ; break end for j=i:sD n1 Lj=D_n 1(j,: ); if(and (Li,L j)==Li)&(or( Li,Lj)==Lj) D_n=[D _n ; Li Lj ] ; if size( D_n,1 )>step step=s tep+1 ; DTheta {step }=[]; for c=cfir st:nbC if D_n(e nd,c) if isemp ty(DT heta{s tep}) DTheta {step }=base{sBase+c-nbC}; else 47 DTheta {step }=union(DTheta{step},base{sBase+c-nbC}); end end end end end end end if stop break end D_n1=D _n; sDn1=s ize(D _n1,1 ); nbC=2* size( D_n1, 2); end Ac kno wledgmen t The author thanks P a scal Djikna vorian for the in tere s ting discussion on the generation of D Θ r , Flor entin Sma randache for his co mmen ts on the co dification and Jean Dezert for his advices on the re pr esentation of the DSm cardinality C M ( X ). References [1] A. Appriou. Uncertain data agg regation in classification an tracking pro - cess. In B. Bo uchon-Meunier, editor , Aggr e gation and F usion of Imp erfe ct Information , pages 231– 260. Spring er, 19 98. [2] A. A ppriou. Appro che g´ en´ erique de la g estion de l’incertain dans les pro - cessus de fusion m ultisenseur. T r aitement du sig nal , 24(4):307 –319 , 200 5. [3] J.A. Bar nett. Computationa l metho ds for a mathematical theory of evi- dence. In International Joint Confer enc e on Artificial Intel ligenc e (IJCAI) , pages 868 –875 , V ancouver, Canada, August 19 81. [4] M. B auer. Approximation alg orithms and decisio n making in the dempster- shafer theory of evidence. International Journ al of Appr oximate R e asoning , 17:217 –237 , 199 7. [5] M. Daniel. Cla ssical combination rules generalized to DSm hyper-p ow e r sets a nd their compar ison with the hybrid DSm rule. In F. Smaranda che and J. Dezert, editors, Applic ations and A dvanc es of DSmT for In forma- tion F u sion , volume 2, c ha pter 3, pa ges 89– 112. American Researc h P ress Rehob oth, 200 6. [6] A.P . Dempster. Up er a nd Low er probabilities induced by a multiv a lued mapping. Anals of Mathematic al Statistics , 38 :325–3 39, 1967 . 48 [7] T. Denœux. A k -Neares t Neighbor Classification Rule Based on Dempster- Shafer Theo ry . IEEE T r ansactions on Systems, Man, and Cyb ernetics - Part A: Systems and Humans , 25(5):80 4–81 3 , May 199 5. [8] T. Denœux. Analysis of evidence-theo ric decisio n rules for pattern classifi- cation. Pattern R e c o gnition , 30 (7):1095 – 1107 , 19 9 7. [9] T. Denœux. Inner a nd outer approximation of b elief structures using a hierarchical clustering approach. Int . Journal of Unc ertainty, F uzziness and Know le dge-Base d Systems , 9(4):437– 460, 2 001. [10] J. Dezert. F o undations for a new theor y o f plausible and para doxical r ea- soning. In formation & Se curity: An International Journal , 9, 20 02. [11] J. Dezert and F. Smarandache. The genera tion of the h yper -p ow er sets. In F. Smarandache and J. Dezer t, editors, Applic ations and Advanc es of DSmT for In formation Fusion , volume 1 , chapter 2 , pag es 37–48 . American Research Pr ess Rehob oth, 2004 . [12] J. Dezert and F. Smar a ndache. Partial order ing on hyper-p ow er s e ts. In F. Smarandache and J . Dezert, editors, Applic ations and A dvanc es of DSmT for Information F u sion , volume 1, chapter 3, pages 49 –60. American Research Pr ess Rehob oth, 2004 . [13] J. Dezert and F. Smar andache. A new pr obabilistic transfor mation of b elief mass assignment. In eleventh Intern ational Confer enc e on In formation F usion , Co logne, Ger many , June 200 8. [14] J. Dezert, F. Smarandache, and M. Daniel. The Generalized Pignistic T ransfor mation. In Seventh In ternational Confer enc e on Information F u- sion , Sto ckholm, Sweden, June 200 4. [15] P . Djiknav or ian and D. Gr enier. Reducing DSmT h ybrid rule complexity throught optimisation of the ca lculation algo r ithm. In F. Smaranda che and J. Dezert, editors, Applic ations and Advanc es of DSmT for Information Fusion , volume 2, chapter 15 , pages 3 65–43 0. American Resear ch Press Rehob oth, 200 6. [16] R. Haenni and N. Lehmann. Resource-b ounded and an ytime approxim a- tion of b elief function computations. International J ournal of Appr oximate R e asoning , 32 (1–2):103 –154 , 200 2. [17] R. Haenni and N. Lehmann. Implementin g belief function computations. International J ournal of Intel ligent Systems, Sp e cial issue on the Dempster- Shafer the ory of evidenc e , 1 8(1):31– 4 9, 200 3. [18] R. Kennes . Computational Asp ect o f the M¨ obius T ra nsformation of Graphs. IEE E T r ansactions on S yst ems, Man, and Cyb ernetics - Part A: Systems and Hu mans , 22 (2 ):201–2 2 3, 1 992. [19] A. Martin, A.-L. J ousselme, and C. Osswald. Conflict meas ur e for the discounting op era tion o n b elief functions. In International Confer enc e on Information F u sion , Colo gne, Germany , July 2 0 08. 49 [20] A. Martin and C. Oss wald. Generalize d prop ortional conflict redistribution rule applied to sonar imagery and radar targets classification. In F. Smaran- dache and J. D ezert, editors, Ap plic ations and A dvanc es of DSmT for In- formation F usion , volume 2, chapter 11, pages 289– 304. American Research Press Rehob oth, 2006 . [21] A. Ma rtin and C. Os swald. Human ex p er ts fusion for image classification. Information & Se curity: An International Journal, Sp e cial issue on F u sing Unc ertain, Impr e cise and Par adoxist Information (DSmT) , 2 006. [22] A. Mar tin a nd C. Ossw a ld. A new gener alization of the proportional con- flict redistr ibution rule stable in terms of decision. In F. Smarandache and J. Dezert, editors, Applic ations and A dvanc es of DSmT for In forma- tion F usion , volume 2, chapter 2, pages 69–8 8. Am erican Resea rch Press Rehob oth, 200 6. [23] A. Martin and C. Osswald. T oward a combination rule to deal with partial conflict a nd s p ecificity in b elief functions theory . In International Confer- enc e on Info rmation F usion , Qu´ eb ec, Ca nada, July 2007 . [24] A. Martin and I. Quidu. Decision suppor t with belief functions theory for seab ed characterization. In International Confer enc e on Information F usion , Co logne, Ger many , July 200 8. [25] P . O rp onen. Dempster’s rule of combination is # P -complete. Artificial Intel ligenc e , 44 :2 45–2 53, 199 0. [26] G. Shafer. A mathematic al the ory of evidenc e . Princeton Universit y Press, 1976. [27] G. Shafer and R. Logan. Implementing Dempst er’s Rule for Hierarchical Evidence. Artificial Intel ligne c e , 33:271 –298 , 1 987. [28] P .P . Shenoy a nd G. Shafer. Propag a ting b elief functions with lo cal compu- tations. IEEE Exp ert , 1(3):43– 51, 1 986. [29] F. Smar andache and J. Dezer t. Applic ations and A dvanc es of DSmT for Information F u sion , volume 1. American Res earch Pr e s s Rehob oth, 20 0 4. [30] F. Smar andache and J. Dezer t. Applic ations and A dvanc es of DSmT for Information F u sion , volume 2. American Res earch Pr e s s Rehob oth, 20 0 6. [31] F. Smar a ndache and J. Dezer t. P rop ortio na l conflict r edistribution rules for information fusio n. In F. Smara ndache and J. Dezert, editors, A pplic ations and Advanc es of DSmT for Information Fusion , volume 2, chapter 1 , pages 3–68. American Resear ch Press Rehob oth, 2006 . [32] Ph. Smets. Pra ctical uses of b elief functions. In K.B. Laskey and H. Prade, editors, Fifte enth Confer enc e o n Unc ertainty in Artificial Intel ligenc e , vol- ume 9 9 , pages 612–6 21, Sto ckholm, Sweden, July 19 9 9. [33] Ph. Smets. The a pplication of matrix calculs for b elief functions. In terna- tional Journal of Appr oximate R e asoning , 3 1 :1–30 , 200 2. 50 [34] Ph. Smets. Decision making in the tbm: the necessity of the pignistic transformation. International Journal of Appr oximate R e asonning , 38:13 3– 147, 20 05. [35] Ph. Smets. Analyzing the c o mbin ation of conflicting belief functions. In- formation F usion , 8:387 – 412, 2 006. [36] B. T ess em. Approximations for efficient computation in the theory of evi- dence. Artificial Intel ligenc e , 61:315 –329, 1 993. [37] F. V o orbra a k. A computationally efficient approximation o f dempster- shafer teor y . International Journal Man-Machine St udies , 30:525– 536, 1989. [38] N. Wilson. Algor ithms for Dem pster-Shafer theo r y . In D .M. Gabbay a nd Ph. Smets, editors, Hanb o ok of defe qsible re asoning and unc ertainty man- agement , volume 5 : Algo rithms for uncertaint y a nd Defeasible Reasoning, pages 421 –475 . Kluw er Academic Publisher, Boston, 2000 . 51

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment