68 **d oub l e** learnFrom ( ArrayList <Assignment <Prop>> weightedSamples ) ;
69 70 /∗∗
71 ∗ **Make a p r o p o s i t i o n samp l e a c c o r d i n g t o th e b a s i c b e l i e f a s s ign em e n t s t o r e d** 72 ∗ **w i t h i n <i>t h i s </ i >.**
73 ∗ **The produ c ed samp l e i s w e i gh t e d ( a t t h i s t ime , th e w e i gh t i s 1) , and , f o r t h i s** 74 ∗ **r e a s on , i s produ c ed a s an a s s i gnm e n t { @ l ink Ass ignment } w ith**
75 ∗ **v a l u e 1 .**
76 ∗ 77 ∗/
78 Assignment <Prop> makeSample ( ) ; **// w e i gh t may be n u l l**
79 **// i n su ch a c a s e , un i form w e i gh t i s c o n s i d e r e d**
80 81 /∗∗
82 ∗ I n i t i a l i z e th e samp led m ix e r . Are n e ed ed a s e n t r y th e b a s i c b **e l i e f a s s i gnm e n t s**
83 ∗ t o be mixed , p r ov id e d w i t h i n a r r a y <i>bbaIn </ i >, and th e w e i **g h t s s t o r e d w i t h i n**
84 ∗ <i>w e i gh t s </ i >. I t i s not n e c e s s a r y th a t th e w e i g h t s sum t o 1 **, but th e w e i g h t s** 85 ∗ **cannot be n e g a t i v e .**
86 ∗
87 ∗/
88 **b o o l e an** setMixer ( d oub l e [ ] weights , ArrayList <sB> bbaIn ) ;
89 90 /∗∗ 91 ∗ **Make a <i>random</ i> c h o i c e among th e b a s i c b e l i e f a s s i gnm en t s i n p r o p o r t i o n** 92 ∗ **t o t h e i r r e s p e c t i v e w e i g h t s .** 93 ∗ Both th e w e i g h t s and b a s i c b e l i e f a s s i gnm e n t s have been f i r s **t p r ov id e d t o** ←֓
method 94 ∗ { @ l ink Samp ledBBARe fereeFuser\#s e tM i x e r } . I t i s n e c e s s a r **y t o run th e method**
95 ∗ { @ l ink Samp ledBBARe fereeFuser\#s e tM i x e r } b e f o r e th e f i r s **t run o f**
96 ∗ **{ @ l ink Samp ledBBARe fereeFuser\#makeMixedChoice ( ) } .**
97 ∗ **The produ c ed samp l e i s w e i gh t e d ( a t t h i s t ime , th e w e i gh t i s 1) , and , f o r t h i s** 98 ∗ **r e a s on , i s produ c ed a s an a s s i gnm e n t { @ l ink Ass ignment } w ith**
99 ∗ **v a l u e 1 .**
100 ∗ 101 ∗/
102 sB makeMixedChoice **( ) ;**
103 104 }