Graph as output of a Classifier
===

It seems that I have a very common task, but I'm missing some keywords that would help me to find the information. So I state my task.

There are Persons. A set of variables is known about each person. A pair of persons P1 and P2 can be in one of the following relationships (which are the classes) :

 1. Parent-child
 2. siblings 
 3. partners (the significant ones) 
 4. other (some indirect relative or non a family member)

By selecting some variables of the pairs (Pi, Pk) with known relationships, I can train a Naive Bayes Classifier to predict the class. This is good.

Now. I have a set of persons P1, P2, ... Pm, and I need to build the most probable graph representing the family tree. I could use my Bayes Classifier pairwise, but in this case I wouldn't use a lot of information that is stored in the graph / in the combinations of several nodes.

For example, nodes P1, P2, P3 and P4 are given. My Bayes Classifier thinks with a good probability of 0.9 that P2 is parent of P1, and P4 is parent of P3. As of the relationship between P1 and P3, it returns p=0.31 for siblings and p=0.34 for partners, so the result is quite unreliable. Now, if the classification of the relationship between P2 and P4 yields "partner" with a good probability of say 0.7, I could be more sure that P1 and P3 are in fact siblings. On the other hand, if P2 and P4 are "other" with probability of 0.8, it is safer for me to conclude that P1 and P3 are partners.

I could code this logic by hand, but I think there are a lot more cases and logical dependencies, especially if we want to build a relationship graph for around 10 or 20 persons. Therefore I would like to use some kind of a classifier or classifier system. 

But the output of this classifier system will be not a binary or scalar value, but a whole graph. What can I use or where can I start looking?

Thanks!
