The algorithm for learning tan models is a variant of

• Notes
• 6

This preview shows page 5 - 6 out of 6 pages.

The algorithm for learning TAN models is a variant of the Chow-Liu algorithm for learning tree-structured Bayes nets. Let C represent the class variable, and { X i } n i =1 be the features (non-class variables). 1. Compute the conditional mutual information given C between each pair of distinct variables, I ( X i ; X j | C ) = x i ,x j ,c ˜ P ( x i , x j , c ) log ˜ P ( x i , x j | c ) ˜ P ( x i | c ) ˜ P ( x j | c ) where ˜ P ( · ) is an empirical distribution (computed using the training data). Intuitively, this quantity represents the gain in information of adding X i as a parent of X j given that C is already a parent of X j . 2. Build a complete undirected graph on the features X 1 , . . . , X n where the weight of the edge between X i and X j is I ( X i ; X j | C ). Call this graph G F . 3. Find a maximum weighted spanning tree 1 on G F . Call it T F . 4. Pick an arbitrary node in T F as the root, and set the direction of all the edges in T F to be outward from the root. Call the directed tree T F . (Hint: Use DFS). 5. The structure of the TAN model consists of a na¨ ıve Bayes model on C, X 1 , . . . , X n augmented by the edges in T F . The task is breast cancer typing, classifying a tumor as either malignant or benign. The data is provided in breast.csv . 1 Kruskal’s or Prim’s algorithm can be used to find a maximum weighted spanning tree 5

Subscribe to view the full document.

7.1 Structure Learning Implement the above algorithm for learning the structure of a TAN model, and submit your code as tanstruct.m . Using the breast cancer data, draw the structure (directed acyclic graph) produced using this algorithm in your writeup. 7.2 Classification In this question you will compare the classification accuracy of na¨ ıve Bayes and TAN. First, randomly withhold 183 records as a test set. Then, using a training set of size m , for m = 100 , 200 , 300 , 400 , 500 1. Learn the structure of a TAN model and estimate the parameters using the following smoothing estimator. For the parameter corresponding to P ( x i | Pa i ) estimate it using θ x i | Pa i = α ˜ P ( x i | Pa i ) + (1 - α ) ˜ P ( x i ) α = m ˜ P ( Pa i ) m ˜ P ( Pa i ) + s where s is a smoothing parmeter. For this question, use s = 5. This is known as back-off smoothing. 2. Learn a na¨ ıve Bayes model and estimate the parameters using back-off smoothing. 3. Compare the classification accuracy of na¨ ıve Bayes and TAN on the test set. Plot classification error vs. the number of training samples in your writeup. Submit the code used to run these experiments as tancompare.m . 6
• Fall '07
• CarlosGustin
• Graph Theory, Bayesian network, Khalid, na¨ bayes

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern