Ancestral polytree

by

 

The code here provides the algorithm of learning ancestral polytree.

ConditionalIndependentMatric( LGObj,a )
function CIMatric = ConditionalIndependentMatric( LGObj,a )
LGObj = struct( LGObj );
VLen = LGObj.VarNumber;
CIMatric = zeros(VLen);
for p = 1:VLen
    for q = ( p+1 ):VLen
         [ MI,R,M ] = ConditionallyIndependent_MutualInformation( LGObj,p,q );
         CI = CITest_ChiTwoVar( MI, R, M, a );
         if CI == 1
             CIMatric(p,q) = 1;
             CIMatric(q,p) = 1;
         end
    end
end

end

Contact us