(define play-tennis-dtree '(0 (sunny (1 (high no) (normal yes))) (overcast yes) (rain (2 (strong no) (weak yes))))) (define play-tennis-tdata '((yes (overcast high strong)) (no (sunny high weak)) (yes (sunny normal strong)) (no (rain high strong)) (yes (rain normal weak)))) (define play-tennis-examples (map cadr play-tennis-tdata)) (define play-tennis-answers (map car play-tennis-tdata)) (define play-tennis-anames '(outlook humidity wind)) (define restaurant-tdata ; example from figure 18.5 of R&N ; format: (will-wait (alt bar fri hun pat price rain res type est)) '((yes (yes no no yes some $$$ no yes french upto10)) (no (yes no no yes full $ no no thai upto60)) (yes (no yes no no some $ no no burger upto10)) (yes (yes no yes yes full $ no no thai upto30)) (no (yes no yes no full $$$ no yes french above60)) (yes (no yes no yes some $$ yes yes italian upto10)) (no (no yes no no none $ yes no burger upto10)) (yes (no no no yes some $$ yes yes thai upto10)) (no (no yes yes no full $ yes no burger above60)) (no (yes yes yes yes full $$$ no yes italian upto30)) (no (no no no no none $ no no thai upto10)) (yes (yes yes yes yes full $ no no burger upto60)))) (define restaurant-anames '(alternate bar fri hungry patrons price rain reservation type wait-estimate)) (define mushroom-anames '(cap-shape cap-surface cap-color bruises? odor gill-attachment gill-spacing gill-size gill-color stalk-shape stalk-root stalk-surface-above-ring stalk-surface-below-ring stalk-color-above-ring stalk-color-below-ring veil-type veil-color ring-number ring-type spore-print-color population habitat)) ; ; attribute value is p=poisonous, e=edible ; (define mushroom-tdata '((e (f f e t n f c b p t b s s p p p w o p k y d)) (p (f f y f f f c b h e b k k n p p w o l h v g)) (e (f s g f n f w b n t e s s w w p w o e n a g)) (p (x f g f f f c b p e b k k b n p w o l h y d)) (e (x f n t n f c b w t b s s w g p w o p k v d)) (p (f f g f f f c b h e b k k p b p w o l h y d)) (p (x y g f f f c b p e b k k b b p w o l h y g)) (p (x y g f f f c b g e b k k p b p w o l h y p)) (e (f y n t n f c b n t b s s w w p w o p k v d)) (e (f f g f n f w b n t e f s w w p w o e k a g)) (e (x y e t n f c b u t b s s g w p w o p k y d)) (e (f f n t n f c b u t b s s g g p w o p k y d)) (e (f y n t n f c b p t b s s g p p w o p n v d)) (p (x s w t f f c b w t b s f w w p w o p h s u)) (e (b s y t a f c b k e c s s w w p w o p k n g)) (e (x y e t n f c b p t b s s g p p w o p k y d)) (e (b y y t l f c b n e c s s w w p w o p k n m)) (p (f y y f f f c b g e b k k b p p w o l h y g)) (p (x y y f f f c b h e b k k b p p w o l h y d)) (e (f f n f n f c n k e e s s w w p w o p k y u)) (e (x y n t n f c b u t b s s g p p w o p k v d)) (p (x y y f f f c b h e b k k n p p w o l h y d)) (e (x f g t n f c b n t b s s p p p w o p n y d)) (p (f s b t n f c b w e b s s w w p w t p r v g)) (e (x y y t a f c b p e r s y w w p w o p k y g)) (e (x s y t l f c b w e c s s w w p w o p n s m)) (p (f s b t f f c b h t b f s w w p w o p h s g)) (e (x y n t n f c b w t b s s w g p w o p n v d)) (e (f y n t l f c b p e r s y w w p w o p n s p)) (e (x y e t n f c b n t b s s w g p w o p k v d)) (e (f f g t n f c b w t b s s g p p w o p n v d)) (p (f y g f f f c b p e b k k n b p w o l h v p)) (e (x f w f n f w b k t e s s w w p w o e k s g)) (e (x f e t n f c b u t b s s p p p w o p k v d)) (e (x y p t n f c b w e b s s w w p w t p w y p)) (p (f s b t f f c b w t b s f w w p w o p h v g)) (p (f s n t p f c n n e e s s w w p w o p n s u)) (e (f y g t n f c b n t b s s p p p w o p n v d)) (p (x f y f f f c b g e b k k p b p w o l h y p)) (e (x f g f n f c n p e e s s w w p w o p k v u)) (e (f f n t n f c b u t b s s w g p w o p k v d)) (p (x y y f f f c b g e b k k n n p w o l h v g)) (p (x f y f f f c b h e b k k n p p w o l h v g)) (e (f s g f n f w b h t e s s w w p w o e n s g)) (p (x s b t f f c b w t b s s w w p w o p h s g)) (e (f f e t n f c b n t b s s p p p w o p k v d)) (e (f y n t n f c b n t b s s p g p w o p k v d)) (e (f y e t n f c b n t b s s w g p w o p n v d)) (e (f y e t n f c b p t b s s w p p w o p k y d)) (p (f y g f f f c b h e b k k b n p w o l h v p)) (p (f s b t n f c b r e b s s w w p w t p r v m)) (e (f f n t n f c b u t b s s p p p w o p k v d)) (e (x f n f n f w b k t e f f w w p w o e n s g)) (p (f f y f f f c b p e b k k p b p w o l h y d)) (p (x y y f f f c b g e b k k n p p w o l h v g)) (e (f y n t l f c b w e r s y w w p w o p k y p)) (p (x y g f f f c b g e b k k n p p w o l h y p)) (p (f f y f f f c b p e b k k p p p w o l h y p)) (e (x y g t n f c b u t b s s w w p w o p k y d)) (e (f y y t a f c b w e r s y w w p w o p n s g)) (e (f f n f n f w b h t e f s w w p w o e k a g)) (e (x y n t n f c b u t b s s p p p w o p n y d)) (e (x y e t n f c b w t b s s p p p w o p k y d)) (e (x s n f n f w b k t e s f w w p w o e k a g)) (p (x f y f f f c b h e b k k b b p w o l h y g)) (p (c y w t n f w n w e b s s w w p w o p w c l)) (e (f f n t n f c b w t b s s p g p w o p n y d)) (p (x f g f f f c b h e b k k p n p w o l h v d)) (e (f f n f n f w b p t e f s w w p w o e k a g)) (e (x y n t n f c b u t b s s g g p w o p k y d)) (e (x y g t n f c b u t b s s g p p w o p k v d)) (e (f y c f n f w n w e b s s w n p w o e w v l)) (e (f f g t n f c b u t b s s p w p w o p n v d)) (p (b y y f n f w n y e c y y y y p y o e w c l)) (e (f y g t n f c b u t b s s g g p w o p k y d)) (p (x s g f c f w n g e b s s w w p w o p n s d)) (e (f y n t n f c b n t b s s w w p w o p n y d)) (e (x s y t l f c b w e c s s w w p w o p k s g)) (e (x f g f n f w b h t e s f w w p w o e n s g)) (e (x f e t n f c b n t b s s p p p w o p n v d)) (e (x y g t n f c b p t b s s g w p w o p k y d)) (e (x y g t n f c b n t b s s w p p w o p k v d)) (p (f s b t f f c b p t b f f w w p w o p h v g)) (e (x y e t n f c b n t b s s w w p w o p k v d)) (p (f y g f f f c b h e b k k n n p w o l h v d)) (p (f f y f f f c b g e b k k p b p w o l h y d)) (p (x f g f f f c b h e b k k p n p w o l h y g)) (p (f f g f f f c b p e b k k p n p w o l h v g)) (e (f f n f n f c n p e e s s w w p w o p k v u)) (e (f y e t n f c b w t b s s p g p w o p k y d)) (p (f y y f f f c b p e b k k b p p w o l h v d)) (e (f y g t n f c b w t b s s g w p w o p n v d)) (p (f y y f f f c b h e b k k p p p w o l h y g)) (e (f f g f n f w b p t e s f w w p w o e n s g)) (e (f y e t n f c b w t b s s p p p w o p k y d)) (p (f y g f f f c b g e b k k b n p w o l h y p)) (p (f y g f f f c b h e b k k p b p w o l h y d)) (e (f f e t n f c b p t b s s w p p w o p k v d)) (e (x s w f n f w b h t e f f w w p w o e k s g)) (e (k y n f n f w n w e b s f w n p w o e w v l)) (e (x s n f n f w b h t e f f w w p w o e k a g)) (e (f f g f n f c n k e e s s w w p w o p n v u)) (e (x y n t n f c b p t b s s p p p w o p n v d)) (e (x y y t a f c b n e c s s w w p w o p k n g)) (p (f f g f f f c b h e b k k p b p w o l h y p)) (p (f y y f f f c b g e b k k p b p w o l h v p)) (e (f y g t n f c b n t b s s p g p w o p k y d)) (e (x y w t a f c b g e c s s w w p w o p n s m)) (e (f y g t n f c b n t b s s g g p w o p n v d)) (p (f y y f f f c b p e b k k n n p w o l h v p)) (p (x y y f f f c b h e b k k n p p w o l h v d)) (e (x y g t n f c b n t b s s g w p w o p n y d)) (e (f y e t n f c b p t b s s g w p w o p k v d)) (p (f s w t p f c n n e e s s w w p w o p n s u)) (p (f s g t f f c b p t b s f w w p w o p h s g)) (p (f y g f f f c b g e b k k b p p w o l h y g)) (e (x y n t a f c b w e r s y w w p w o p k s p)) (e (f y n t l f c b n e r s y w w p w o p k y p)) (e (f y n t n f c b u t b s s p w p w o p k v d)) (e (x f n f n f w b h t e s s w w p w o e n a g)) (p (f f g f f f c b p e b k k n n p w o l h y p)) (p (f y y f f f c b h e b k k n b p w o l h v d)) (p (f s w t f f c b p t b f f w w p w o p h s u)) (e (b y w t l f c b n e c s s w w p w o p k n m)) (e (x y y t a f c b w e r s y w w p w o p n s g)) (e (x y y t l f c b g e c s s w w p w o p n s m)) (e (x f y t l f w n p t b s s w w p w o p n v d)) (e (x f y t l f w n w t b s s w w p w o p n v d)) (e (f f e t n f c b u t b s s g p p w o p k y d)) (p (x s w t f f c b h t b s f w w p w o p h v u)) (p (x f y f f f c b g e b k k p p p w o l h y g)) (e (f f g f n f w b h t e s f w w p w o e k a g)) (e (f y n t l f c b p e r s y w w p w o p k s g)) (e (f f g t n f c b u t b s s p p p w o p n v d)) (e (f y e t n f c b p t b s s p p p w o p k v d)) (p (f y y f f f c b h e b k k p p p w o l h v g)) (p (f s w t p f c n k e e s s w w p w o p n s u)) (e (x f n t n f c b p t b s s p w p w o p k v d)) (e (b s w t l f c b g e c s s w w p w o p k n m)) (p (c y y f n f w n y e c y y y y p y o e w c l)) (p (f s w t f f c b p t b s s w w p w o p h v u)) (e (f f n t n f c b p t b s s w p p w o p n v d)) (p (x s g t f f c b p t b f f w w p w o p h v u)) (e (x f g t n f c b u t b s s w p p w o p k y d)) (p (f s w t f f c b p t b s f w w p w o p h s u)) (e (x y g t n f c b p t b s s p w p w o p k y d)) (p (x y w t p f c n n e e s s w w p w o p k s g)) (e (f f g t n f c b w t b s s w g p w o p k v d)) (e (f y n t l f c b w e r s y w w p w o p k s g)) (p (x y g f f f c b p e b k k b p p w o l h v g)) (p (f f y f f f c b h e b k k p n p w o l h y g)) (e (f f w f n f w b h t e s s w w p w o e k a g)) (e (f f n f n f w b k t e s f w w p w o e k a g)) (e (x f e t n f c b w t b s s w p p w o p k v d)) (p (f f g f f f c b p e b k k n p p w o l h y p)) (p (x y g f f f c b p e b k k n n p w o l h v g)) (e (x f g t n f c b w t b s s w p p w o p k v d)) (e (f f w f n f w b n t e s f w w p w o e k s g)) (e (f f n t n f c b w t b s s g p p w o p k y d)) (e (x s w t l f c b w e c s s w w p w o p n n g)) (e (f f n f n f w n w e b f s w n p w o e w v l)) (e (x s n f n f w b p t e f s w w p w o e k a g)) (e (f y y t a f c b p e r s y w w p w o p n s g)) (e (x y n t n f c b w t b s s p g p w o p k y d)) (e (x f e t n f c b n t b s s g g p w o p k y d)) (e (x f n f n f c n n e e s s w w p w o p n v u)) (e (f y g t n f c b p t b s s p g p w o p n v d)) (e (b y y t a f c b n e c s s w w p w o p k n g)) (e (x y n t n f c b w t b s s p p p w o p k y d)) (e (f s g t n f c b w e b s s w w p w t p w y p)) (p (f f y f f f c b g e b k k b n p w o l h v g)) (e (x y g t n f c b p t b s s w g p w o p n v d)) (e (x f g f n f w b k t e s s w w p w o e k s g)) (e (f s g f n f w b n t e f f w w p w o e n s g)) (e (x f g t n f c b p t b s s p w p w o p k y d)) (e (x y e t n f c b p t b s s g p p w o p n v d)) (p (x y g f f f c b p e b k k p p p w o l h y p)) (e (x f g f n f w b n t e s f w w p w o e k s g)) (e (f f e t n f c b p t b s s g p p w o p k y d)) (e (x y w t a f c b k e c s s w w p w o p k n g)) (p (f f y f f f c b g e b k k p n p w o l h v p)) (e (f y e t n f c b p t b s s p w p w o p n y d)) (p (f y n t p f c n n e e s s w w p w o p k s u)) (e (x f n t n f c b p t b s s g p p w o p n v d)) (p (x y y f f f c b h e b k k b p p w o l h v d)) (e (f f n t n f c b w t b s s p g p w o p n v d)) (p (x y g f f f c b p e b k k p n p w o l h y p)) (e (f y g t n f c b n t b s s w w p w o p n y d)) (e (f f g t n f c b p t b s s g g p w o p k y d)) (e (x f g t n f c b w t b s s p p p w o p n v d)) (e (f f n t n f c b w t b s s p p p w o p n v d)) (p (f f g f f f c b h e b k k b p p w o l h y d)) (e (f y n t n f c b w t b s s p g p w o p k v d)) (e (x y n t n f c b n t b s s p w p w o p n v d)) (e (x s w f n f w b k t e f f w w p w o e n s g)) (p (f f g f f f c b g e b k k n b p w o l h v g)) (e (f f n f n f c n n e e s s w w p w o p n y u)) (e (f s w f n f w b n t e f s w w p w o e k s g)) (e (f f g t n f c b p t b s s p g p w o p k y d)) (e (b y w t a f c b g e c s s w w p w o p n n m)))) (define mushroom-test '((p (f s w t f f c b w t b f s w w p w o p h v u)) (e (f s n f n f w b k t e s f w w p w o e k s g)) (e (x s w t l f c b n e c s s w w p w o p n n m)) (e (x f g f n f w b h t e f f w w p w o e n s g)) (p (f y g f f f c b h e b k k b p p w o l h y d)) (e (f y g t n f c b w t b s s g w p w o p k v d)) (e (x f n t n f c b n t b s s p w p w o p k y d)) (e (x f g f n f w b p t e f s w w p w o e n a g)) (p (x s n t p f c n k e e s s w w p w o p k s u)) (p (x s n t p f c n w e e s s w w p w o p n s g)) (p (x s w t p f c n n e e s s w w p w o p k v u)) (e (f y g t n f c b w t b s s p w p w o p n y d)) (p (f s b t f f c b p t b s f w w p w o p h v g)) (e (f f g f n f c n k e e s s w w p w o p k y u)) (e (x y g t n f c b p t b s s g p p w o p k y d)) (e (x f g t n f c b u t b s s w w p w o p k y d)) (p (x y y f f f c b p e b k k n p p w o l h y d)) (p (x f y f f f c b h e b k k n p p w o l h v g)) (e (x f e t n f c b u t b s s p p p w o p k y d)) (p (f s w t f f c b p t b f s w w p w o p h s g)) (p (f s w t n f c b r e b s s w w p w t p r v g)) (e (x s g f n f w b p t e f f w w p w o e n a g)) (e (x s y t l f c b w e c s s w w p w o p k n g)) (e (f f g t n f c b p t b s s p w p w o p k v d)) (e (x y e t n f c b n t b s s p g p w o p n v d)) (e (x y w t l f c b g e c s s w w p w o p n n g)) (e (f f e t n f c b w t b s s w w p w o p n y d)) (e (x y g t n f c b p t b s s g p p w o p k v d)) (p (x f y f f f c b g e b k k b p p w o l h v p)) (p (f y y f f f c b h e b k k n n p w o l h v p)) (p (x s p f c f w n g e b s s w w p w o p k s d)) (e (x f e t n f c b n t b s s w p p w o p n y d)) (p (f y g f f f c b g e b k k n p p w o l h v g)) (p (x f y f f f c b g e b k k b p p w o l h v g)) (e (b y y t l f c b n e c s s w w p w o p k s m)) (e (f f g t n f c b w t b s s g p p w o p n v d)) (e (x y y t l f c b p e r s y w w p w o p n s g)) (e (f f n t n f c b w t b s s g g p w o p n y d)) (e (f y e t n f c b u t b s s w w p w o p k v d)) (p (f s p t n f c b r e b s s w w p w t p r v g)) (e (f y g t n f c b p t b s s w w p w o p k v d)) (p (x f g f c f c n n e b s s w w p w o p n v d)) (p (x s b t f f c b p t b f s w w p w o p h s g)) (e (x y y t l f c b n e r s y w w p w o p k y g)) (e (f y n t l f c b n e r s y w w p w o p k s g)) (e (x y n t n f c b n t b s s g w p w o p k y d)) (p (x f g f c f c n g e b s s w w p w o p n s d)) (p (f y y f f f c b p e b k k b p p w o l h v p)) (p (x s g t f f c b p t b f f w w p w o p h s u)) (e (x y g t n f c b n t b s s p w p w o p n v d)) (e (f f g t n f c b u t b s s w g p w o p k v d)) (e (f y n t n f c b u t b s s p p p w o p k v d)) (p (x s w t p f c n w e e s s w w p w o p n v u)) (p (f f g f f f c b h e b k k p b p w o l h v g)) (e (f s c t n f c b w e b s s w w p w t p w y p)) (e (x y y t a f c b p e r s y w w p w o p n s g)) (e (f y g t n f c b p t b s s p p p w o p k y d)) (p (x y y f f f c b p e b k k p p p w o l h v g)) (e (x f g t n f c b n t b s s p p p w o p k y d)) (p (f y g f f f c b h e b k k b b p w o l h y p)) (e (x f n f n f c n g e e s s w w p w o p n y u)) (e (f y y t a f c b p e r s y w w p w o p k y p)) (p (f f y f f f c b p e b k k p b p w o l h v d)) (p (f y y f f f c b p e b k k n b p w o l h v g)) (p (x f y f f f c b h e b k k p b p w o l h y p)) (e (x y n t a f c b w e r s y w w p w o p k y g)) (e (f f n f n f c n g e e s s w w p w o p k y u)) (p (x y w t p f c n n e e s s w w p w o p k v u)) (p (x y g f f f c b p e b k k p b p w o l h y p)) (p (x s n t p f c n k e e s s w w p w o p k v g)) (e (x s n f n f w b n t e s s w w p w o e k a g)) (p (f y y f f f c b h e b k k n p p w o l h y d)) (p (x s w f c f c n p e b s s w w p w o p n v d)) (e (f f g t n f c b w t b s s g w p w o p n y d)) (e (f f g t n f c b p t b s s w p p w o p k v d)) (e (x y e t n f c b u t b s s g p p w o p n y d)) (e (x f g t n f c b n t b s s p p p w o p n v d)) (e (f f n t n f c b n t b s s g g p w o p k y d)) (e (x y y t a f c b n e c s s w w p w o p n n m)) (e (f y y t l f c b n e r s y w w p w o p k s g)) (e (x f g t n f c b u t b s s w w p w o p n y d)) (e (f f g t n f c b n t b s s g g p w o p n v d)) (e (b s y t a f c b g e c s s w w p w o p k n g)) (e (b s w t l f c b k e c s s w w p w o p k s m)) (p (x y w t p f c n p e e s s w w p w o p k v u)) (e (f s y t l f w n w t b s s w w p w o p n v d)) (p (k y c f m f c b w e c k y c c p w n n w c d)) (e (x s y t a f c b g e c s s w w p w o p n s g)) (p (f f y f f f c b p e b k k b p p w o l h v d)) (e (x s n t n f c b w e b s s w w p w t p w y p)) (e (x f e t n f c b p t b s s w p p w o p k y d)) (e (x s g f n f w b k t e s s w w p w o e k a g)) (e (f f n f n f w b h t e s f w w p w o e k a g)) (p (b s p t n f c b w e b s s w w p w t p r v g)) (e (b y y t a f c b w e c s s w w p w o p n s m)) (e (x f g t n f c b u t b s s w p p w o p k y d)) (e (f f g t n f c b n t b s s w p p w o p k v d)) (e (f f g t n f c b p t b s s p g p w o p k y d)) (e (x f e t n f c b w t b s s p w p w o p n v d)) (e (x y g t n f c b u t b s s w g p w o p n y d)))) (define census-anames '(age workclass fnlwgt education education-num marital-status occupation relationship race sex capital-gain capital-loss hours-per-week native-country)) (define census-tdata '((<=50k (53 private 99476 hs-grad 9 divorced other-service not-in-family white female 0 0 38 united-states)) (<=50k (26 federal-gov 48099 bachelors 13 never-married exec-managerial not-in-family white female 0 0 40 united-states)) (>50k (43 local-gov 96102 some-college 10 married-civ-spouse protective-serv husband white male 0 1887 40 united-states)) (<=50k (29 private 151476 some-college 10 separated sales not-in-family white female 0 0 40 united-states)) (<=50k (41 private 89226 hs-grad 9 divorced craft-repair not-in-family white male 0 0 40 united-states)) (<=50k (17 private 263746 10th 6 never-married other-service own-child white male 0 0 24 united-states)) (<=50k (24 private 215443 hs-grad 9 separated other-service not-in-family white male 0 0 40 united-states)) (<=50k (17 self-emp-inc 254859 11th 7 never-married prof-specialty own-child white male 0 0 20 united-states)) (>50k (33 private 274222 bachelors 13 married-civ-spouse other-service husband asian-pac-islander male 7688 0 38 united-states)) (>50k (37 private 205339 some-college 10 never-married tech-support not-in-family white male 0 0 40 united-states)) (<=50k (45 self-emp-not-inc 204205 10th 6 married-civ-spouse craft-repair husband white male 0 0 65 united-states)) (<=50k (52 private 363405 hs-grad 9 separated adm-clerical other-relative white female 0 0 40 united-states)) (<=50k (35 private 236910 bachelors 13 married-civ-spouse exec-managerial husband white male 0 0 60 united-states)) (>50k (41 private 231689 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (>50k (51 private 293196 doctorate 16 married-civ-spouse prof-specialty husband white male 15024 0 60 iran)) (>50k (53 private 154785 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 50 united-states)) (>50k (72 self-emp-not-inc 52138 doctorate 16 married-civ-spouse prof-specialty husband white male 0 2392 25 united-states)) (<=50k (27 private 150025 5th-6th 3 never-married handlers-cleaners other-relative white male 0 0 40 guatemala)) (<=50k (17 private 115551 11th 7 never-married other-service own-child white female 0 0 20 united-states)) (<=50k (50 private 400004 some-college 10 married-civ-spouse sales husband white male 0 0 60 united-states)) (<=50k (76 private 316185 7th-8th 4 widowed protective-serv not-in-family white female 0 0 12 united-states)) (>50k (35 private 340428 bachelors 13 never-married sales unmarried white female 0 0 40 united-states)) (<=50k (36 private 284616 some-college 10 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (<=50k (21 private 256356 11th 7 never-married priv-house-serv other-relative white female 0 0 40 mexico)) (<=50k (34 private 19847 hs-grad 9 divorced adm-clerical unmarried white female 0 0 40 united-states)) (<=50k (24 private 102493 hs-grad 9 married-civ-spouse handlers-cleaners husband white male 0 0 40 united-states)) (>50k (38 private 364782 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (<=50k (24 local-gov 134181 bachelors 13 never-married prof-specialty own-child white female 0 0 50 united-states)) (>50k (46 private 283037 bachelors 13 married-civ-spouse exec-managerial husband white male 0 0 50 united-states)) (<=50k (33 private 170651 hs-grad 9 never-married other-service own-child white female 1055 0 40 united-states)) (<=50k (22 private 341368 some-college 10 never-married other-service not-in-family white male 0 0 50 united-states)) (<=50k (56 private 56331 hs-grad 9 never-married machine-op-inspct not-in-family white male 0 0 32 united-states)) (<=50k (26 private 292353 7th-8th 4 married-civ-spouse machine-op-inspct husband other male 0 0 40 united-states)) (<=50k (25 local-gov 44216 hs-grad 9 divorced adm-clerical not-in-family amer-indian-eskimo female 0 0 35 united-states)) (<=50k (48 private 62605 hs-grad 9 divorced adm-clerical not-in-family white female 0 0 35 united-states)) (<=50k (39 local-gov 305597 hs-grad 9 separated exec-managerial unmarried white male 0 0 40 united-states)) (<=50k (29 private 129856 assoc-voc 11 never-married adm-clerical own-child white female 0 0 40 united-states)) (<=50k (47 federal-gov 55377 hs-grad 9 never-married machine-op-inspct own-child black male 0 0 40 united-states)) (<=50k (81 self-emp-not-inc 137018 hs-grad 9 widowed adm-clerical not-in-family white female 0 0 20 united-states)) (<=50k (63 private 181863 bachelors 13 never-married sales not-in-family white male 0 0 27 united-states)) (<=50k (63 self-emp-not-inc 231777 bachelors 13 never-married transport-moving not-in-family white male 0 0 40 united-states)) (<=50k (38 private 203836 hs-grad 9 married-civ-spouse sales husband white male 3464 0 40 columbia)) (<=50k (26 private 152035 hs-grad 9 never-married adm-clerical own-child white female 0 0 40 united-states)) (>50k (63 private 106023 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (<=50k (23 private 129583 hs-grad 9 never-married handlers-cleaners own-child black female 0 0 16 united-states)) (>50k (36 private 166988 bachelors 13 married-civ-spouse prof-specialty wife white female 0 0 40 united-states)) (<=50k (44 private 378251 hs-grad 9 married-civ-spouse adm-clerical wife white female 0 0 38 united-states)) (>50k (43 local-gov 105862 some-college 10 married-civ-spouse adm-clerical wife white female 0 1902 40 united-states)) (<=50k (20 private 179423 some-college 10 never-married transport-moving own-child white female 0 0 40 united-states)) (<=50k (32 private 130304 hs-grad 9 married-civ-spouse prof-specialty husband white male 0 1485 48 united-states)) (<=50k (18 private 131033 11th 7 never-married other-service other-relative black male 0 0 15 united-states)) (>50k (51 private 159910 bachelors 13 divorced exec-managerial not-in-family black male 10520 0 40 united-states)) (<=50k (40 private 315321 hs-grad 9 divorced exec-managerial unmarried white female 0 625 52 united-states)) (<=50k (71 self-emp-not-inc 130731 hs-grad 9 widowed adm-clerical not-in-family white female 0 0 35 united-states)) (<=50k (26 private 209942 hs-grad 9 never-married handlers-cleaners own-child black male 0 0 40 united-states)) (>50k (33 private 262439 hs-grad 9 married-civ-spouse adm-clerical wife white female 0 0 35 united-states)) (>50k (25 private 40915 bachelors 13 never-married exec-managerial not-in-family white female 0 0 40 united-states)) (<=50k (20 private 368852 some-college 10 never-married other-service own-child white female 0 0 20 united-states)) (>50k (27 self-emp-inc 153546 assoc-voc 11 married-civ-spouse other-service wife white female 0 0 36 united-states)) (>50k (46 private 189680 some-college 10 married-civ-spouse sales husband white male 0 0 50 united-states)) (<=50k (28 private 208965 9th 5 never-married machine-op-inspct unmarried other male 0 0 40 mexico)) (<=50k (29 private 367706 some-college 10 never-married adm-clerical own-child black male 0 0 40 united-states)) (<=50k (30 self-emp-inc 117570 hs-grad 9 divorced other-service not-in-family white female 0 0 60 united-states)) (<=50k (26 private 117833 bachelors 13 never-married exec-managerial not-in-family white female 0 1669 50 united-states)) (>50k (30 private 55291 bachelors 13 married-civ-spouse prof-specialty husband white male 0 0 40 united-states)) (<=50k (47 local-gov 134671 some-college 10 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (>50k (57 self-emp-inc 42959 bachelors 13 married-civ-spouse sales wife white female 0 0 40 united-states)) (<=50k (32 self-emp-not-inc 65278 doctorate 16 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (>50k (50 private 93690 hs-grad 9 married-civ-spouse transport-moving husband white male 0 0 40 united-states)) (<=50k (46 self-emp-not-inc 176863 hs-grad 9 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (<=50k (19 private 100999 bachelors 13 never-married prof-specialty own-child white female 0 0 30 united-states)) (>50k (52 private 117674 some-college 10 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (<=50k (21 private 300812 some-college 10 never-married other-service own-child white male 0 0 25 united-states)) (<=50k (37 private 112554 hs-grad 9 married-civ-spouse sales husband white male 0 0 45 united-states)) (<=50k (52 self-emp-not-inc 194791 some-college 10 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (<=50k (21 private 34506 hs-grad 9 separated other-service own-child white female 0 0 35 united-states)) (<=50k (70 private 35494 hs-grad 9 married-civ-spouse exec-managerial husband white male 0 0 30 united-states)) (>50k (44 state-gov 174325 masters 14 married-civ-spouse prof-specialty husband black male 7688 0 40 united-states)) (<=50k (49 local-gov 249289 bachelors 13 divorced prof-specialty unmarried black female 0 0 40 united-states)) (>50k (62 self-emp-not-inc 171315 bachelors 13 married-civ-spouse prof-specialty husband white male 0 0 60 united-states)) (<=50k (23 private 308205 assoc-acdm 12 never-married other-service own-child white male 0 0 20 united-states)) (<=50k (17 private 139183 10th 6 never-married sales own-child white female 0 0 15 united-states)) (>50k (35 private 102976 masters 14 never-married exec-managerial not-in-family white male 0 0 40 united-states)) (>50k (31 self-emp-not-inc 181485 bachelors 13 never-married sales not-in-family black male 0 0 40 united-states)) (<=50k (43 private 218558 bachelors 13 married-spouse-absent prof-specialty not-in-family white male 3325 0 40 united-states)) (<=50k (25 private 251915 bachelors 13 never-married sales own-child white female 0 0 40 united-states)) (<=50k (40 private 181015 hs-grad 9 separated other-service unmarried white female 0 0 47 united-states)) (<=50k (23 private 580248 hs-grad 9 never-married tech-support not-in-family white female 0 0 40 united-states)) (<=50k (25 self-emp-not-inc 209384 hs-grad 9 never-married other-service other-relative white male 0 0 32 united-states)) (>50k (27 private 36440 prof-school 15 never-married prof-specialty not-in-family white female 0 0 65 united-states)) (<=50k (30 private 75755 assoc-voc 11 married-civ-spouse prof-specialty husband white male 0 0 40 united-states)) (<=50k (63 private 183608 10th 6 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (>50k (40 self-emp-not-inc 223881 prof-school 15 married-civ-spouse prof-specialty husband white male 99999 0 70 united-states)) (<=50k (24 private 278130 bachelors 13 never-married prof-specialty not-in-family white male 0 0 40 united-states)) (<=50k (17 private 130125 10th 6 never-married other-service own-child amer-indian-eskimo female 1055 0 20 united-states)) (<=50k (63 self-emp-not-inc 194638 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 32 united-states)) (<=50k (35 self-emp-not-inc 267776 hs-grad 9 never-married other-service other-relative white female 0 0 30 united-states)) (<=50k (53 private 166386 bachelors 13 married-civ-spouse machine-op-inspct wife asian-pac-islander female 0 0 40 china)) (>50k (44 private 59474 hs-grad 9 married-civ-spouse transport-moving husband white male 0 0 40 united-states)) (<=50k (73 private 247355 hs-grad 9 married-civ-spouse transport-moving husband white male 0 0 16 canada)))) (define census-test1 '((<=50k (18 private 304169 11th 7 never-married sales own-child white male 0 0 35 united-states)) (>50k (35 private 102976 masters 14 never-married exec-managerial not-in-family white male 0 0 40 united-states)) (<=50k (26 private 152035 hs-grad 9 never-married adm-clerical own-child white female 0 0 40 united-states)) (<=50k (52 self-emp-not-inc 194791 some-college 10 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (<=50k (70 private 35494 hs-grad 9 married-civ-spouse exec-managerial husband white male 0 0 30 united-states)) (<=50k (25 private 333677 9th 5 married-civ-spouse machine-op-inspct husband white male 0 0 45 united-states)) (<=50k (30 private 75755 assoc-voc 11 married-civ-spouse prof-specialty husband white male 0 0 40 united-states)) (<=50k (24 private 215443 hs-grad 9 separated other-service not-in-family white male 0 0 40 united-states)) (>50k (46 self-emp-not-inc 28281 bachelors 13 married-civ-spouse farming-fishing husband white male 0 0 40 united-states)) (<=50k (35 private 230054 7th-8th 4 married-civ-spouse machine-op-inspct husband white male 0 0 40 mexico)) (>50k (30 private 55291 bachelors 13 married-civ-spouse prof-specialty husband white male 0 0 40 united-states)) (<=50k (41 private 243607 5th-6th 3 married-civ-spouse adm-clerical husband white male 0 0 40 mexico)) (<=50k (33 private 161745 assoc-voc 11 married-civ-spouse farming-fishing husband white male 0 0 45 united-states)) (<=50k (30 private 306383 some-college 10 divorced handlers-cleaners not-in-family white male 0 0 50 united-states)) (<=50k (46 private 97883 bachelors 13 never-married sales not-in-family white female 0 0 35 united-states)) (<=50k (30 private 116508 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 40 germany)) (>50k (27 self-emp-inc 153546 assoc-voc 11 married-civ-spouse other-service wife white female 0 0 36 united-states)) (<=50k (39 private 33487 11th 7 married-civ-spouse machine-op-inspct husband white male 0 0 40 united-states)) (>50k (46 private 283037 bachelors 13 married-civ-spouse exec-managerial husband white male 0 0 50 united-states)) (<=50k (30 local-gov 352542 bachelors 13 divorced prof-specialty unmarried white female 0 0 40 united-states)) (>50k (47 private 357848 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (<=50k (18 private 104704 hs-grad 9 never-married adm-clerical own-child black male 0 0 40 united-states)) (<=50k (22 private 361487 hs-grad 9 never-married craft-repair not-in-family white male 0 0 40 united-states)) (<=50k (29 private 151476 some-college 10 separated sales not-in-family white female 0 0 40 united-states)) (>50k (40 private 572751 prof-school 15 married-civ-spouse craft-repair husband white male 5178 0 40 mexico)) (<=50k (31 private 196788 hs-grad 9 married-civ-spouse adm-clerical wife white female 0 0 40 united-states)) (<=50k (18 private 174732 hs-grad 9 never-married other-service other-relative black male 0 0 36 united-states)) (<=50k (48 private 62605 hs-grad 9 divorced adm-clerical not-in-family white female 0 0 35 united-states)) (<=50k (40 private 327573 assoc-voc 11 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (>50k (42 private 378384 prof-school 15 married-civ-spouse prof-specialty husband white male 0 1902 60 united-states)) (<=50k (38 self-emp-not-inc 200153 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 60 united-states)) (<=50k (52 private 363405 hs-grad 9 separated adm-clerical other-relative white female 0 0 40 united-states)) (<=50k (57 private 257200 hs-grad 9 married-civ-spouse machine-op-inspct husband white male 0 0 40 united-states)) (>50k (34 private 30497 bachelors 13 married-civ-spouse exec-managerial husband white male 15024 0 60 united-states)) (<=50k (38 self-emp-not-inc 182416 hs-grad 9 never-married sales unmarried black female 0 0 42 united-states)) (>50k (59 private 146391 assoc-voc 11 married-civ-spouse tech-support husband white male 7298 0 40 united-states)) (>50k (31 self-emp-not-inc 181485 bachelors 13 never-married sales not-in-family black male 0 0 40 united-states)) (<=50k (23 private 189832 assoc-acdm 12 never-married transport-moving unmarried white female 0 0 40 united-states)) (<=50k (21 private 256356 11th 7 never-married priv-house-serv other-relative white female 0 0 40 mexico)) (<=50k (29 private 95465 hs-grad 9 married-civ-spouse other-service husband white male 0 0 40 united-states)) (<=50k (31 private 235389 7th-8th 4 never-married handlers-cleaners not-in-family white female 0 0 30 portugal)) (<=50k (18 private 89478 some-college 10 never-married sales own-child white female 0 0 20 united-states)) (<=50k (25 local-gov 222800 bachelors 13 never-married prof-specialty not-in-family white male 0 0 40 united-states)) (>50k (39 private 218490 bachelors 13 married-civ-spouse sales husband white male 0 1848 40 united-states)) (<=50k (35 private 465326 bachelors 13 married-civ-spouse sales husband white male 0 0 40 united-states)) (<=50k (40 private 315321 hs-grad 9 divorced exec-managerial unmarried white female 0 625 52 united-states)) (>50k (34 private 173730 bachelors 13 married-civ-spouse exec-managerial husband white male 0 0 50 united-states)) (<=50k (21 private 34506 hs-grad 9 separated other-service own-child white female 0 0 35 united-states)) (<=50k (27 private 150025 5th-6th 3 never-married handlers-cleaners other-relative white male 0 0 40 guatemala)) (<=50k (51 private 53197 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 40 united-states)))) (define census-test2 '((>50k (49 private 186172 hs-grad 9 married-civ-spouse craft-repair husband white male 7688 0 45 united-states)) (>50k (51 private 138847 bachelors 13 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (<=50k (65 private 386672 assoc-voc 11 married-civ-spouse adm-clerical husband white male 0 0 15 united-states)) (<=50k (31 private 247328 9th 5 married-civ-spouse machine-op-inspct husband white male 3137 0 40 mexico)) (<=50k (26 federal-gov 48099 bachelors 13 never-married exec-managerial not-in-family white female 0 0 40 united-states)) (<=50k (31 private 196788 hs-grad 9 married-civ-spouse adm-clerical wife white female 0 0 40 united-states)) (<=50k (40 private 346964 hs-grad 9 divorced tech-support unmarried white female 0 0 40 united-states)) (<=50k (39 self-emp-not-inc 174330 some-college 10 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (<=50k (54 private 143865 hs-grad 9 divorced sales unmarried white female 0 0 35 united-states)) (<=50k (41 private 243607 5th-6th 3 married-civ-spouse adm-clerical husband white male 0 0 40 mexico)) (<=50k (25 private 159732 bachelors 13 never-married prof-specialty not-in-family white male 0 0 40 united-states)) (<=50k (26 private 292353 7th-8th 4 married-civ-spouse machine-op-inspct husband other male 0 0 40 united-states)) (<=50k (22 private 361487 hs-grad 9 never-married craft-repair not-in-family white male 0 0 40 united-states)) (<=50k (57 private 180920 10th 6 married-civ-spouse craft-repair husband white male 0 0 43 united-states)) (>50k (45 private 214627 doctorate 16 widowed prof-specialty unmarried white male 15020 0 40 iran)) (<=50k (55 private 52953 hs-grad 9 divorced other-service unmarried white female 0 0 40 united-states)) (<=50k (34 private 19847 hs-grad 9 divorced adm-clerical unmarried white female 0 0 40 united-states)) (<=50k (38 private 203836 hs-grad 9 married-civ-spouse sales husband white male 3464 0 40 columbia)) (<=50k (35 private 465326 bachelors 13 married-civ-spouse sales husband white male 0 0 40 united-states)) (>50k (38 local-gov 116580 bachelors 13 married-civ-spouse prof-specialty wife white female 0 0 20 united-states)) (<=50k (21 private 34506 hs-grad 9 separated other-service own-child white female 0 0 35 united-states)) (<=50k (20 private 368852 some-college 10 never-married other-service own-child white female 0 0 20 united-states)) (>50k (32 private 40142 bachelors 13 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (<=50k (35 self-emp-not-inc 462890 10th 6 married-civ-spouse transport-moving husband black male 0 0 50 united-states)) (<=50k (51 private 53197 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 40 united-states)) (<=50k (45 private 125194 11th 7 never-married machine-op-inspct not-in-family black female 0 0 40 united-states)) (<=50k (61 private 159046 7th-8th 4 married-civ-spouse transport-moving husband white male 0 0 40 united-states)) (<=50k (30 private 306383 some-college 10 divorced handlers-cleaners not-in-family white male 0 0 50 united-states)) (<=50k (44 private 54507 hs-grad 9 never-married machine-op-inspct not-in-family white female 0 0 40 united-states)) (<=50k (43 private 598606 9th 5 separated handlers-cleaners unmarried black female 0 0 50 united-states)) (<=50k (39 private 346478 some-college 10 never-married exec-managerial not-in-family white male 0 0 45 united-states)) (>50k (31 self-emp-not-inc 181485 bachelors 13 never-married sales not-in-family black male 0 0 40 united-states)) (<=50k (38 private 348739 prof-school 15 married-civ-spouse prof-specialty husband white male 0 0 60 united-states)) (<=50k (43 local-gov 108945 bachelors 13 divorced prof-specialty unmarried white female 0 0 48 united-states)) (<=50k (63 private 183608 10th 6 married-civ-spouse exec-managerial husband white male 0 0 40 united-states)) (<=50k (31 private 194055 hs-grad 9 married-civ-spouse transport-moving husband white male 0 0 50 united-states)) (>50k (25 private 40915 bachelors 13 never-married exec-managerial not-in-family white female 0 0 40 united-states)) (>50k (61 self-emp-inc 156542 prof-school 15 separated prof-specialty not-in-family white male 0 0 40 united-states)) (>50k (47 private 229737 hs-grad 9 married-civ-spouse craft-repair husband white male 0 0 45 united-states)) (<=50k (25 private 374163 hs-grad 9 married-spouse-absent farming-fishing not-in-family other male 0 0 40 mexico)) (<=50k (29 private 129856 assoc-voc 11 never-married adm-clerical own-child white female 0 0 40 united-states)) (<=50k (25 local-gov 222800 bachelors 13 never-married prof-specialty not-in-family white male 0 0 40 united-states)) (>50k (46 private 207940 some-college 10 married-civ-spouse craft-repair husband black male 0 0 40 united-states)) (>50k (40 self-emp-not-inc 223881 prof-school 15 married-civ-spouse prof-specialty husband white male 99999 0 70 united-states)) (<=50k (48 private 62605 hs-grad 9 divorced adm-clerical not-in-family white female 0 0 35 united-states)) (<=50k (67 self-emp-not-inc 116057 hs-grad 9 divorced exec-managerial not-in-family white female 3273 0 16 united-states)) (<=50k (31 private 119422 hs-grad 9 married-civ-spouse sales husband white male 0 0 40 united-states)) (<=50k (19 private 100999 bachelors 13 never-married prof-specialty own-child white female 0 0 30 united-states)) (<=50k (53 private 197492 hs-grad 9 divorced machine-op-inspct not-in-family white female 0 0 40 united-states)) (<=50k (28 private 259351 10th 6 never-married other-service other-relative amer-indian-eskimo male 0 0 40 mexico))))